Komerad Posted March 31, 2008 Share Posted March 31, 2008 (edited) Hi, the only way I know to do this is : Alt+ctrl+del, change password... Now as alt+ctrl+del is a problem I need to find another way... I do not have admin rights on the box. The domain is not the standard domain so I do need to change to domain field aswel. Asking the user to press alt+ctrl+del himself is not done as the password needs to be changed 16 times hences why i want to automate it. Is there any way to do this? Edited March 31, 2008 by Komerad Link to comment Share on other sites More sharing options...
rudi Posted March 31, 2008 Share Posted March 31, 2008 Hi. [How to change User Password for Domain User?] In a CMD box type "net user ?" NET USER <username> <passwd> /DOMAIN I don't have a domain environment here, so check out if "/DOMAIN" is a switch or the domain name, and if "<username>" will have to be replaced by the username or e.g. by yourdomain\username Regards, Rudi. Earth is flat, pigs can fly, and Nuclear Power is SAFE! Link to comment Share on other sites More sharing options...
DarkMatter Posted March 31, 2008 Share Posted March 31, 2008 You could also invoke the NetUserChangePassword function inside netapi32.dllhttp://msdn2.microsoft.com/en-us/library/a...650(VS.85).aspx [sub]Quantum mechanics: The dreams stuff is made of[/sub] Link to comment Share on other sites More sharing options...
Developers Jos Posted March 31, 2008 Developers Share Posted March 31, 2008 Here is a COM version on how this can be done: ; Init objects $oMyError = ObjEvent("AutoIt.Error", "MyErrFunc"); Install a custom error handler ; $Password = "test" $objUser = ObjGet("WinNT://" & @LogonDomain & "/" & @UserName) ; Read in lines of text until the EOF is reached $objUser.SetPassword($Password) $objUser.SetInfo ; ; ; This is my custom error handler Func MyErrFunc() $HexNumber = Hex($oMyError.number, 8) ConsoleWrite("We intercepted a COM Error !" & @CRLF & _ "Number is: " & $HexNumber & @CRLF & _ "Linenbr is: " & $oMyError.scriptline & @CRLF & _ "Description is: " & $oMyError.description & @CRLF & _ "Windescription is: " & $oMyError.windescription) SetError(1); something to check for when this function returns EndFunc ;==>MyErrFunc SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Komerad Posted April 1, 2008 Author Share Posted April 1, 2008 The 'NET USER' is not realy an option as only admins can use it. ============================ This : NetUserChangePassword function inside netapi32.dll I need to check. ============================ Here is a COM version on how this can be done: Your script works but : The user/password/domain are not the ones that the boxes use. Basicly this script i need is ment to change your own pasword on another domain. Example : On computer A that is connected with domain A with user A using password A I want to be able to change : The password for user B on domain B Using the alt+ctrl+del it also asks for the old password. Wich i think will always be needed as I (user A on computer A) am not admin. I do know password of user B on domain B. Can it be modified with SetUser, SetDomain old pass? 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