Change user password in Windows command line

We can change a user password from Windows command line using net use 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*[email protected]

net user  John  pq12d*[email protected]

 

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 your domain user account password:

If you want to change the password for your domain account then 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 changed. 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.”

If you see any issues with net use command, please write in the comments section below about the problem you have encountered.

 

Fonte: https://www.windows-commandline.com/change-user-password-in-windows-command-line/

Recomendações: Thiago Antoniazi

.