Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Script for resetting passwords

Status
Not open for further replies.

KeyserSoze1877

Programmer
Sep 6, 2001
95
US
I have the need to reset and unlock accounts in a AD Group. These are test accounts and will be locked up purposely and have their passwords reset.

I would like to create a script in VB or whatever that goes to this group and resets the passwords and unlocks the account if it's locked.

Anyone point me to a thread or offer a good starting point?

Thanks.

---------------
Keyser Soze
"There are no stupid questions, just stupid people.
 
here is a smple to get you started.

Code:
'==========================================================================
'
' NAME: ResetPasswords.vbs
'
' AUTHOR: Mark D. MacLachlan , The Spider's Parlor
' URL: [URL unfurl="true"]http://www.thespidersparlor.com[/URL]
' DATE  : 1/30/2004
'
' COMMENT: <comment>
'
'==========================================================================

UserName = InputBox("What Account Needs To Be Reset?","Change PWD?")
NewPass =  InputBox("Type New Password","Change PWD?")

Set objUser = GetObject _
("LDAP://cn="& UserName & ",ou=Users,dc=thespidersparlor,dc=com")
objUser.SetPassword NewPass
objUser.setInfo
Wscript.Echo "Password Changed"

I hope you find this post helpful. Please let me know if it was.

Regards,

Mark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top