https://www.windows-commandline.com/change-user-password-in-windows-command-line/
Change user password in Windows command line
Change user password in Windows command line
We can change a user password from Windows command line using net user
command. The command is explained below with examples.
How to change local user password
net user loginid newpassword
For example, if you want to reset the password for the user John on the local computer, you can run the below command. Let’s say the new password is pq12d*12@
net user John pq12d*12@
You may not want to provide the new password in the command prompt for obvious security reasons. Net use command allows to reset the password so that none around your desk can see it. You need to provide * in the place of password while executing net use command. You will be prompted to type the password and the password you enter won’t be printed on the screen. But you need to feed the password twice to make sure that you have entered the password you intended to.
example:
C\>net user John * Type a password for the user: Retype the password to confirm: The command completed successfully.
How to change domain user account password
If you want to change password for a domain account, you can do it by running the below command.
net user loginid * /domain
Next, you will be prompted twice to enter the password and on successful completion your domain account password will be reset. You can also provide the password in the command itself as explained above.
In case the domain is not reachable then you will get the below error when you try to run the above command.
System error 1355 has occurred. The specified domain either does not exist or could not be contacted.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.