Eva Posted March 8, 2013 Share Posted March 8, 2013 Hi guys, not sure if i am at the place here, but that's my first post. I m having the following issue: i m trying to change an ad user password, provided that i know the current one (no admin rights). The following code is perfectly working when I change my personal pass, when logged in with my username of course. (username and both passwords stored in an ini file) Local $var = IniReadSection(@ScriptDir & "\param.ini","account") ;MsgBox(0,"",@ScriptDir) Local $objUser, $username, $oldpw, $newpw If @error Then MsgBox(4096, "", "Error occurred, probably no INI file or wrong path.") Else $username = $var[1][1] $oldpw = $var[2][1] $newpw = $var[3][1] EndIf $objUser = ObjGet("LDAP://cn=" & $username & ",OU=T-Account,OU=User,OU=Administration,dc=dekager,dc=dekabank,dc=intern") MsgBox (0,"",@UserName & " " & $objUser.displayname) $objUser.ChangePassword($oldpw, $newpw) if @error Then MsgBox(4096,"","Error occured") Else MsgBox(0,"","Password changed: " & $username) EndIf But when I tried the same code with another user account (logged in as that user) all I got was an error message, namely my error message "error occured". I really don't see any reasonable explanation, so any help would be much appreciated Thank u in advance BurlBrighenti 1 Link to comment Share on other sites More sharing options...
Bert Posted March 8, 2013 Share Posted March 8, 2013 Put in your msgbox @error to see the error code. (replace "Error occured") The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
Eva Posted March 8, 2013 Author Share Posted March 8, 2013 Thanks for the tip. I get error -2147352567 Link to comment Share on other sites More sharing options...
Bert Posted March 8, 2013 Share Posted March 8, 2013 https://www.google.com/search?num=100&hl=en&client=firefox-a&hs=6Uz&rls=org.mozilla%3Aen-US%3Aofficial&q=2147352567&oq=2147352567&gs_l=serp.12...5487.5487.0.7106.1.1.0.0.0.0.82.82.1.1.0.les%3B..0.0...1c.1.5.serp.bHyvelobHR4 The Vollatran project My blog: http://www.vollysinterestingshit.com/ Link to comment Share on other sites More sharing options...
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