This wikiHow teaches you how to change a PC's password from an administrator account by using Command Prompt. If you do not have administrator access to the computer you will not be able to change the password. For Mac computers, you can reset the computer's password using the Terminal.

Part 1
Part 1 of 2:

Opening Command Prompt

  1. 1
    Open your PC's Start menu. You can do this either by clicking the Windows logo in the bottom-left corner of the screen, or by pressing the Win key on your keyboard. The Start menu will open with your mouse cursor in the "Search" field.
  2. 2
    Type command prompt into the "Search" field. This will search your computer for the Command Prompt app. You should see it pop up at the top of the search menu.
    • On Windows 8, you can bring up the "Search" bar by hovering your mouse in the top-right corner of the screen and clicking the magnifying glass when it appears.
    • If you're using Windows XP, you'll instead click the Run app on the right side of the Start menu.
    Advertisement
  3. 3
    Right-click Command Prompt. It resembles a black box; right-clicking it will invoke a drop-down menu.
    • If you're using Windows XP, you'll instead type cmd into the Run window.
  4. 4
    Click Run as administrator. It's near the top of the drop-down menu. Doing so will open Command Prompt with administrator privileges.
    • You'll need to confirm this choice by clicking Yes when prompted.
    • If you're using Windows XP, you'll click OK to open Command Prompt.
  5. Advertisement
Part 2
Part 2 of 2:

Changing the Password

  1. 1
    Type net user into Command Prompt. Make sure you include the space between the two words.
  2. 2
    Press Enter. Doing so will display a list of all user accounts registered to your computer.
  3. 3
    Find the name of the account you wish to edit. If you're changing your own account password, it will be below the "Administrator" heading on the left side of the Command Prompt window; otherwise, the name will likely be beneath the "Guest" heading on the right.
  4. 4
    Type net user [name] * into Command Prompt. You'll replace [name] with the name of the account for which you wish to change the password.
    • When you type in the account name, you must do so exactly as it appears in the account name section of Command Prompt.
  5. 5
    Press Enter. This will run your command; you should see a new line appear with "Type a password for the user:" written.
    • If you instead see a group of lines that start with "The syntax of this command is:", type net user Administrator * in for an administrator account or net user Guest * for a guest account.
  6. 6
    Type in a new password. The cursor won't move while you do this, so be careful not to accidentally press the Caps Lock key.
  7. 7
    Press Enter. You'll be prompted to re-enter your password.
  8. 8
    Re-type your password. Again, it won't appear as you type, so take your time.
  9. 9
    Press Enter. As long as the two word entries match each other, you'll see "The command completed successfully" display beneath the second password entry. The next time you attempt to log onto your PC, you'll need to enter your updated password to continue.
  10. Advertisement

Community Q&A

  • Question
    How do I remove a password using cmd?
    Community Answer
    Community Answer
    Follow the steps listed above and when it prompts you to put in the password just press enter twice.
  • Question
    Will this work on Windows 8?
    Community Answer
    Community Answer
    Yes, this will work in Windows 8 or Windows 8.1. With any Admin account, after right clicking the Start screen box in the bottom left corner(for Windows 8.1) (or by clicking the very left corner) and clicking Command Prompt (Admin), you can achieve the same box - just agree to the User Account Control box by clicking the OK button from the dialog box. Otherwise, stay with the same process from that point forward.
  • Question
    I bought a computer from someone and now I can't reach him. There are two administrator passwords. How can I remove the administrators and passwords on what is now my computer?
    Community Answer
    Community Answer
    If you're on Windows 8/10, press and hold Shift key while you're clicking on Restart in Power Options. It will show a Recovery menu. There press advanced, command prompt, and wait. You need to type the same commands listed in the guide. Basically this is an admin command prompt, so you should have the privilege to change the admin password.
Advertisement

Warnings

  • Never change the password on a computer for which you don't have permission to do so.
    ⧼thumbs_response⧽
Advertisement

About This Article

Jack Lloyd
Written by:
wikiHow Technology Writer
This article was co-authored by wikiHow staff writer, Jack Lloyd. Jack Lloyd is a Technology Writer and Editor for wikiHow. He has over two years of experience writing and editing technology-related articles. He is technology enthusiast and an English teacher. This article has been viewed 1,811,863 times.
How helpful is this?
Co-authors: 60
Updated: November 3, 2022
Views: 1,811,863
Categories: Command Prompt
Advertisement