What happens currently when running the script? Nothing?

Curtis McKay
Network Administrator
Belleville Township High School District 201
[email protected]<mailto:[email protected]>

From: [email protected] 
[mailto:[email protected]] On Behalf Of Bill Purcell
Sent: Monday, August 23, 2010 9:10 AM
To: [email protected]
Subject: [tech-geeks] password reset

What is wrong with this script?


I want to be able to have someone reset password to 
p...@550rd1<mailto:p...@550rd1> and make them change it next login...


strUser = InputBox ("Enter User Name")
strPassword = " p...@550rd1<mailto:p...@550rd1>"
On Error Resume Next
Set objUser = GetObject("LDAP://cn=strUser<ldap://cn=strUser/>, ou=one, ou=two, 
ou=three, ou=us, dc=where, dc=pvt")
objUser.SetPassword strPassword
objUser.Put "PwdLastSet", -1
objUser.SetInfo
If Err.Number <> 0 Then
MsgBox "Error: An Incorrect User Name Was Entered!"
Err.Clear
Else
MsgBox "The Password Has Been Changed For " & "\" & UCase(strUser)
End If


TIA
--
Bill Purcell
ROE #10
| Subscription info at http://www.tech-geeks.org |

Reply via email to