MK-2 Posted August 13, 2008 Posted August 13, 2008 This is the script I have that shows users and then lets you input a password into a box and reset it via that. But I made it output to a msgbox to see its working and all passwords are reset to '25': $passbox = GUICtrlCreateInput("", 750, 65, 50, 20) Func UpdatePass() $leftfqdn = ReadFQDNFromGUILeft() $leftsam = _ADDNToSamAccountName ($leftfqdn) $ObjUser = ObjGet("LDAP://" & $leftfqdn) $objUser.SetPassword (GUICtrlRead($passbox)) $objUser.Put ("pwdLastSet", 0) $objUser.SetInfo () MsgBox(0, "", "Password has been reset to " & $passbox & @CRLF & "User will be asked to change password at next logon") EndFunc everything else i need it to do works, i can update descriptions and usernames etc, its just the password is coming up as that. its driving me mental!
superfletch Posted August 14, 2008 Posted August 14, 2008 Bit of a guess here as I'm not great with AutoIt: Perhaps try $objUser.SetPassword (GUICtrlRead & ($passbox))
MK-2 Posted August 14, 2008 Author Posted August 14, 2008 can't do that, as the guictrlread needs to be told what to read, the annoying thing is that two lines above i have it being used and works: $ObjUser.Put ("sAMAccountName", GUICtrlRead($userbox)) $objUser.Put ("homeDirectory", GUICtrlRead($homebox)) $objUser.Put ("scriptPath", GUICtrlRead($logonbox)) its only the password one thats messing about
MK-2 Posted August 14, 2008 Author Posted August 14, 2008 grrrrrrrrr, i dont think it was the actual function going wrong, it was my msgbox! changed the msgbox to read MsgBox(0, "", "Password has been reset to " & GUICtrlRead($passbox) & @CRLF & "User will be asked to change password at next logon") and it worked. stupid thing!!!
vwmomo Posted May 6, 2014 Posted May 6, 2014 Hey MK-2 I know this is an old post but I was wondering if you has the full script and #includes for resetting a users password. Ive been playin with this for a while and still cant get it to work with partially my script and yours. I tried finding the functions as well and cant find those either.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now