Thank you, But I need to Add static password for validation in HTA Program
and post the validation of password. Current logon user need to be added  in
local administrator group.

 

Regards

Rajan

 

From: [email protected] [mailto:[email protected]]
On Behalf Of Miller, Todd
Sent: 11 November 2013 20:47
To: [email protected]
Subject: RE: [mssms] HTA program for add a user in Local administrator group

 

Here is the VBScript code I use to verify user's password. 

 

                                CONST ADS_SCOPE_SUBTREE = 2

                                CONST ADS_SECURE_AUTHENTICATION = &H0001

                                CONST ADS_SERVER_BIND = &H0200

                                Set objContainer = GetObject("LDAP:")

                                If DebugMode = True then msgbox ("Created
LDAP object")

                                ' Set USername and Password

                                strPassword =
oEnvironment.Item("UserPassword")

                                strUsername =
oEnvironment.Item("UserDomain") & "\" & oEnvironment.Item("UserID")

                                ' Bind to the root of the directory using
previously entered credentials

                                err.clear

 

                                strADSPath =
"LDAP://myDCaddress.edu/dc=mysubdomain,dc=mydomain,dc=edu"

                                on error resume next

                                If DebugMode = True then msgbox ("Querying
lDAP")

                                Set adsMyObject = objContainer.OpenDSObject
(strADsPath, strUsername, strPassword, ADS_SECURE_AUTHENTICATION +
ADS_SERVER_BIND)

                                if err.number = 0 then

                                                PasswordOK = TRUE

                                                If DebugMode = True then
MSGBOX ("Password verified")

                                else 

                                                MSGBOX ("You have entered an
invalid password. Error= " & err.number)

                                                err.clear

                                End If

 

 

 

From: [email protected] <mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Mark Mears
Sent: Thursday, November 07, 2013 2:05 PM
To: [email protected] <mailto:[email protected]> 
Subject: RE: [mssms] HTA program for add a user in Local administrator group

 

Sounds like an idea for an Orchestrator runbook activity!

 


Thanks,

  _____  


 

Mark Mears

 <mailto:[email protected]%0d> [email protected]

Phone: (757) 945-2651

 

 <http://www.cireson.com/> 


 

 <http://twitter.com/teamcireson>   Check out our System Center App Store:
www.cireson.com/app-store

 


  _____  

 

 

From: [email protected] <mailto:[email protected]>
[mailto:[email protected]] On Behalf Of Rajan K
Sent: Thursday, November 7, 2013 2:34 PM
To: [email protected] <mailto:[email protected]> 
Subject: [mssms] HTA program for add a user in Local administrator group

 

Hi,

 

                I need a HTA program for password validation and add an user
in Local administrator group using SCCM 2007 RAP.

 

                Any ideal?

 

==========================================================================

 

<HTML>

<HEAD><TITLE>Password Validation</TITLE>

<SCRIPT LANGUAGE="VBScript"> 

 <!--

Sub Submit_OnClick

   Dim TheForm

   Dim password 

   Set TheForm = Document.ValidForm

   If TheForm.Text1.Value = "password" Then

       MsgBox "access granted"

     Else

       MsgBox "access denied"

     

 

`Current user need to be added in local administrator/ prompt for user
input. 

   End If

End Sub

    Sub RunProgram 

  Set oShell = CreateObject("WScript.Shell")

oShell.Run _"NET.EXE LOCALGROUP /ADD Administrators ""NT
Authority\Interactive""" _, 0, True

   End Sub

 

-->

</SCRIPT>

</HEAD>

<BODY>

<H3>Password Validation</H3><HR>

<FORM NAME="ValidForm">

Enter your password: 

 <INPUT NAME="Text1" TYPE="TEXT" SIZE="10">

<INPUT NAME="Submit" TYPE="BUTTON" VALUE="Submit">

</FORM>

</BODY>

</HTML>

 

============================================================================
==============

 

Regards

Rajan

 

 

 

  _____  

Notice: This UI Health Care e-mail (including attachments) is covered by the
Electronic Communications Privacy Act, 18 U.S.C. 2510-2521, is confidential
and may be legally privileged.  If you are not the intended recipient, you
are hereby notified that any retention, dissemination, distribution, or
copying of this communication is strictly prohibited.  Please reply to the
sender that you have received the message in error, then delete it.  Thank
you. 

  _____  

 



<<image001.png>>

<<image002.jpg>>

Reply via email to