≡ Menu

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*[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.


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.

Related Posts:

37 comments… add one
  • Dee

    hi on my VISTA computer i get this
    “System error 1355 has occurred.
    The specified domain either does not exist or could not be contacted.”

    • admin

      Make sure that your system can contact the domain controller(DC) machine. see if ‘ping ip-of-DC’ works..
      ex: ping

  • Anonymous

    Any command to show the password of a user?

    • Raul

      Nope. Only reset or add password is available via command prompt on windows. Another trick is to reset the password in seconds (such as PassMoz LabWin) and add a new password to the computer so you can know what is the password is.

  • stingray

    when i enter in my case:
    net user Stingray*; to make sure my password isn’t printed on the screen it says “The syntax of the command is: and then it gives me a whole bunch of different options. it doesn’t let me put in a password

    • admin

      you should have whitespace between user name and *. The command should be
      net user stingray *

  • zeromido

    “The user name could not be found.
    More help is available by typing NET HELPMSG 2221.”
    Is this happened because my username contains spaces (example : John’s Family) ?
    What to do ?

  • rey

    i have a problem after retyping the new password. It says

    System error 5 has occurred.
    Access is denied.

    pls Help..

    • admin

      Looks like you don’t have admin privileges on the system to change password of another user.

    • Irshad

      right click command prompt and run as administrator.
      select command prompt Ctl+Shift+Enter
      the execute the command.

    • zyakxx

      In this case you have to open the cmd as run administrator and try it again it will happen,

  • peter

    C:\>net user Peter Norton Jr *
    The syntax of this command is:

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]
    C:\>NET USER ASPNET newpassword:*
    System error 5 has occurred.

    Access is denied.

    C:\>NET USER ASPNET newpassword *
    The syntax of this command is:

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]
    this is what i m getting when trying to change password ?
    help please

    • Genuine Dev

      please run cmd as administrator.
      And you can reset password.

  • Iovan Iorgovan

    How can you change the password in command line and also prompt the user to change it at his next login?
    I know for sure this option exists in GUI mode “User must change password at next logon”.

    • Curioususer

      Any updates on this query im curious as well tia!

  • bruce

    net user John pq12d*[email protected]

    This cmd command worked like a charm!

  • Tami

    I’ve tried many times but never get changed successfully comment.

    Net user TST Main VLRIPCITY

  • Mapopa Ndengu

    This comment goes to those who are having issues with changing passwords for user accounts that have spaces in between (James Clark, for example). The white space in between breaks down the user name into two and affects the syntax structure i.e. net user username password.therefore the line: net user James Clark 12234, is the same as: user James, password: Clark 12234. in which the user James does not exist on the computer. try an underscore between the usernames e.g. net user James_Clark 12234.


  • gokousahil

    i want to know how to login using cmd with password(i have password) without changing it.

  • Melissa

    I receive an error that says the system is not authoritative for the specified account and therefore cannot complete the operation please retry the operation using the provider associated with this account. if this is an online provider please use their providers online site. This is a local account on a Windows 10 computer so I’m a bit confused.

  • oktrik

    the command net user user_name* need to verify for password complexity and this wont work if use script such as php as we need to reenter the password ,instead using net user user_name new_password will change the password without prompt

  • Surbhi Rastogi

    I am not a Domain Admin.
    How can i change my domain user password.

  • Kylito

    Hi ALL
    I have a PC on the domain…but off the network…user cannot login and i recive password reset cause cant login into VPN
    Is it possible to reset domain password via cmd
    or even reset the local password via cmd.
    referring to cmd on automatic repair / advanced troubleshooting screen

  • Luca

    I really need to know how to do that when running INVOKE command, error 5 previleges still.

  • farthan

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]
    username [/TIMES:{times | ALL}]

    next what i want to do dns server not authoritative for zone please guide me what i can do for the password reset.

  • Danny Hartfield

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]
    username [/TIMES:{times | ALL}]

    I keep getting this message I’m trying to change my password

  • Fadyabouelsoud

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]
    username [/TIMES:{times | ALL}]

    I keep getting this message I’m trying to change my password

  • reza

    i have a problem please help me .
    when i want to change my password my keyboard does’n work

  • engelbert R ramirez

    [username [password | *] [options]] [/DOMAIN]
    username {password | *} /ADD [options] [/DOMAIN]
    username [/DELETE] [/DOMAIN]
    username [/TIMES:{times | ALL}]
    I’m getting the same thing. You haven’t replied to these answers, do you not know?

  • Vaish

    I am able to change password/unlock using Active Directory utility but not able change password from command line

    • Srini

      Have you tried with /domain, since this seems to be for a active directory account and not local one.

  • Karim

    How can i do if my username include a point : for example Q.S ?

    • Bjarne Zeb Jørgensen

      use “Q.S”

    • putri

      thanks Bjarne, it works! for those with space between their names and or including [dot], try “[your name]”

  • shayan

    how do i enter my login is if it is two words? ex: firstname lastname

  • Lani

    I can redo password but it won’t let me type anything.

  • Anonymous

    For those trying to do this with spaces in the user’s name such as John Smith, you need to use quotes, so instead of “net user John Smith *” you need to do “net user “John Smith” *”

Cancel reply

Leave a Comment