How to Change Computer Password Via Command Line

Table of contents:

How to Change Computer Password Via Command Line
How to Change Computer Password Via Command Line

Video: How to Change Computer Password Via Command Line

Video: How to Change Computer Password Via Command Line
Video: How to Disable and Enable Touch Screen on Dell, HP, Lenovo, Asus, and Windows 10 PC? 2024, November
Anonim

This wikiHow teaches you how to change the administrator account password through the Command Prompt. Without having administrator access to the computer, you cannot change the account password. On Mac computers, you can reset your computer password through Terminal.

Step

Method 1 of 2: Opening Command Prompt

Change a Computer Password Using Command Prompt Step 1
Change a Computer Password Using Command Prompt Step 1

Step 1. Open the “Start” menu on the computer

You can access it by clicking the Windows logo in the lower-left corner of the screen, or by pressing the Win key on your keyboard. The “Start” menu will be opened and the cursor will be placed in the “Search” field.

Change a Computer Password Using Command Prompt Step 2
Change a Computer Password Using Command Prompt Step 2

Step 2. Type command prompt into the "Search" field

The computer will search for the Command Prompt program. You can see it at the top of the search menu (“Search”).

  • In Windows 8, you can bring up the " Search " bar by hovering over the top right corner of the screen and clicking the magnifying glass icon that appears.
  • If you are using Windows XP, click application Run on the right side of the “Start” menu.
Change a Computer Password Using Command Prompt Step 3
Change a Computer Password Using Command Prompt Step 3

Step 3. Right-click the Command Prompt icon

The icon looks like a black box. Once the icon is right-clicked, a drop-down menu will appear.

If you are using Windows XP, type cmd into the Run application window

Change a Computer Password Using Command Prompt Step 4
Change a Computer Password Using Command Prompt Step 4

Step 4. Click Run as administrator

It's at the top of the drop-down menu. A Command Prompt window with administrator rights will be opened afterwards.

  • You need to confirm your selection by clicking “ Yes ” when prompted.
  • If you are using Windows XP, click " OK ” to open a Command Prompt window.

Method 2 of 2: Changing Password

Change a Computer Password Using Command Prompt Step 5
Change a Computer Password Using Command Prompt Step 5

Step 1. Type net user into the Command Prompt window

Make sure you include a space between the two words.

Change a Computer Password Using Command Prompt Step 6
Change a Computer Password Using Command Prompt Step 6

Step 2. Press Enter key

A list of all registered users on the computer will be displayed.

Change a Computer Password Using Command Prompt Step 7
Change a Computer Password Using Command Prompt Step 7

Step 3. Find the name of the account you want to edit

If you wish to change the account password yourself, the account will be displayed under the " Administrator " heading, on the left side of the Command Prompt window. Otherwise, the account name will be displayed under the " Guest " heading, on the right side of the window.

Change a Computer Password Using Command Prompt Step 8
Change a Computer Password Using Command Prompt Step 8

Step 4. Type net user [name] * in the Command Prompt window

Replace “[name]” with the name of the account whose password you want to change.

When typing an account name, you must enter it as it appears in the account name section of the Command Prompt window

Change a Computer Password Using Command Prompt Step 9
Change a Computer Password Using Command Prompt Step 9

Step 5. Press Enter key

The command will be executed. You can see a new line with the words " Type a password for the user: ".

If you see a group of lines starting with " The syntax of this command is: ", type net user Administrator * for administrator accounts or net user Guest * for guest accounts

Change a Computer Password Using Command Prompt Step 10
Change a Computer Password Using Command Prompt Step 10

Step 6. Enter the new password

The cursor won't move as you type, so make sure you don't hit the Caps Lock key on your keyboard.

Change a Computer Password Using Command Prompt Step 11
Change a Computer Password Using Command Prompt Step 11

Step 7. Press Enter key

You will be asked to re-enter your password.

Change a Computer Password Using Command Prompt Step 12
Change a Computer Password Using Command Prompt Step 12

Step 8. Re-type the password

Again, the entries won't be shown as you type so don't rush into it.

Change a Computer Password Using Command Prompt Step 13
Change a Computer Password Using Command Prompt Step 13

Step 9. Press Enter key

As long as the two entries match, you should see the message " The command completed successfully " under the second password entry. The next time you try to access your computer, you will need to enter a new password before you can continue.

Tips

  • Without an administrator account, you may not be able to use the Command Prompt at all.
  • If you don't have administrator access, you can enter recovery mode. In this mode, you can access the administrator command line segment.
  • If you forcibly shut down your computer (without the “Shut Down” option), enter startup recovery mode and exit while you are in the middle of getting an error report. On the report, there is a link to the text file that will be opened in Notepad. With this file, you can access the file menu. From that menu, you can assign sticky keys functions to the Command Prompt program. When going to the computer, press the “Shift” key five times to load the Command Prompt program with administrator rights (instead of enabling the sticky keys feature). Now, you can reset the administrator account password if you are locked out.

Recommended: