How to change password using the command line

Author: Carl Weaver
Date Of Creation: 23 February 2021
Update Date: 1 July 2024
Anonim
How to Change your Account Password Using Command prompt on Windows 10?
Video: How to Change your Account Password Using Command prompt on Windows 10?

Content

This article explains how to change the password for an administrator account in Windows using the command line. If you do not have administrative access to the computer, the password cannot be changed. On Mac OS X, the password can be reset using the terminal.

Steps

Part 1 of 2: How to open a command prompt

  1. 1 Open the start menu. To do this, click on the Windows logo in the lower left corner of the screen or press the key ⊞ Win on keyboard. When the Start menu is open, the mouse cursor will be in the search bar.
  2. 2 In the search bar, enter command line. The system will find the command line utility and display its icon above the search bar.
    • To open the search bar in Windows 8, move your mouse pointer to the upper-right corner of the screen and click the magnifying glass icon that appears.
    • In Windows XP, click Run on the right side of the Start menu.
  3. 3 Right click on the command line icon. It looks like a black square. A context menu will open.
    • In Windows XP, in the Run window, type cmd.
  4. 4 Click on Run as administrator. This option is at the top of the drop-down menu. A command prompt will open with administrator rights.
    • In the window that opens with a proposal to confirm your actions, click "Yes".
    • In Windows XP, click OK to open the Command Prompt.

Part 2 of 2: How to change your password

  1. 1 At the command prompt, enter net user. Remember to put a space between the two words.
  2. 2 Click on ↵ Enter. A list of all user accounts that are registered on the computer is displayed.
  3. 3 Find the name of the account you want to change the password for. If you change the password for your account, its name will be displayed in the "Administrator" section on the left side of the command line window; otherwise, the account name will most likely appear in the Guest section on the right.
  4. 4 At the command prompt, enter net user [name] *. Replace [name] with the name of the account you want to change the password for.
    • Enter the account name as it appears in the appropriate section of the command line.
  5. 5 Click on ↵ Enter. The room will be completed. A new line “Type a password for the user:” will appear on the screen.
    • If multiple lines appear on the screen that begin with "The syntax of this command is", enter net user Administrator * (for an administrator account) or net user Guest * (for a guest account).
  6. 6 Enter a new password. The cursor does not move while entering the password, so check if the key is pressed. ⇬ Caps Lock.
  7. 7 Click on ↵ Enter. You will be prompted to re-enter your password.
  8. 8 Enter the password again. The password is not displayed as you type, so take your time.
  9. 9 Click on ↵ Enter. If the passwords entered match, the message “The command completed successfully” is displayed. Now, to log into your account on your computer, enter your new password.

Tips

  • If you do not have access to an administrator account, most likely you will not be able to use the command line.

Warnings

  • Never change your password if you are not authorized to do so.