on September 11, 2011
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*12@
net user John pq12d*12@
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 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:
- Add new user account
- Enable or disable user account
Last Updated :
24 Apr, 2025
If you are a Windows user, one of the easiest ways to change your password is through the Command Prompt (CMD). This is especially helpful for users who prefer command-line tools or face issues accessing the standard settings menu.
In this article, we’ll guide you through the steps to change your Windows password using CMD, along with a few troubleshooting tips.
Prerequisites:
1. Administrative Rights
2. Familiar with the existing User Accounts
3. Backup the unsaved data
Using «net user» Command to Change the Password
Step 1: Open command prompt as Administrator
Go to the Search Menu, type CMD and select «Run as Administrator».
Step 2: Enter «net user» to fetch Password
net user <username> <newpassword>
Step 3: Run the command to change the password
net user [username] [newpassword]
Replace «[username]» with the username of the account whose password you want to change, and «[newpassword]» with the new password you want to set.
Step 4: Reopen to Confirm
Close the Command Prompt and log in with the new password.
How to Privately Change a Password using CMD
Use this method to change the password for any particular user. Here’s how you can do it:
Step 1: Go to Run & open Command Prompt
Go to the Search Menu, type CMD and select «Run as Administrator».
Step 2: List All Users to Choose
net user
Step 3: Change the password for any particular user
net user USERNAME NEWPASS
If your desired user name has more tan one word then follow this pattern:
For Example: Username — ALPHA GTR
net user "ALPHA GTR" NEWPASS
Now, what if you’re looking to remove a password using Command prompt? Let’s see how you can get it done.
Using PowerShell — Additional Method (1)
Step 1: Go to Start and type PowerShell
Step 2: Type the following command to Change the Password
$username = 'UserNameHere'; $password = Read-Host -AsSecureString; net user $username $password
Note: Replace UserNameHere with the desired user account.
Step 3: Close the PowerShell > Restart > Log in
While in «Safe Mode» — Additional Method (2)
Step 1: Restart your PC and hit F8 several times to enter Windows Boot Mode
Step 2: Safe Mode with Command Prompt > net user
net user <username> <newpassword>
Step 3: Exit and Restart as usual
Steps to Remove a Password Using CMD
If you wish to remove the password for any particular account, you can set the password to blank by removing the password in the command line. Let’s check it out:
Step 1: Go to Run & open Command Prompt
Go to Search Menu > type CMD > select "Run as Administrator"
Step 2: Run this Command to Remove Password
net user USERALPHA ""
Hence, this will clear your previously saved password for the account — USERALPHA
Tips & Tricks
While using CMD to change your password is usually a reliable method, there are a few common issues users may face:
1. Admin Access: Make sure to have admin access.
Without administration access, you won’t be able to perform any of the above-mentioned action.
2. Invalid Username: Do remember the names of user accounts
net user
command to list all the exact username.
3. Password Policy Restrictions: Domain restrictions or Specific Password Policies
Make sure the new password meets the system’s password requirements.
Conclusion
Changing password in Windows helps in managing and maintaining privacy. By following the different methods and steps, you can easily reset your password or remove it from your Windows 10 or 11.
Also Read
- How to Find the Wi-Fi Password Using CMD in Windows 11/10 ?
- Useful CMD commands for daily use in Windows OS
Things You Should Know
- To change a password in the Command Prompt, type «net user [username] [new password] and press «Enter.»
- For a more discreet option, you can type «net user [username} *» and press «Enter.» Then enter the new password twice.
- You must have administrative access to change a password using the Command Prompt.
-
It’s the icon with the Windows logo in the taskbar at the bottom of the screen.
-
This displays the Command Prompt in the Windows Start 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
-
It has an icon that resembles a black screen with a white cursor. Right-clicking it will invoke a drop-down menu.[1]
- If you’re using Windows XP, you’ll instead type cmd into the Run window.
-
It’s near the top of the drop-down menu. Doing so will open Command Prompt with administrator privileges.[2]
- 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.
Advertisement
-
1
Type net user into the Command Prompt and press ↵ Enter. Make sure you include the space between the two words.[[3]
[Image:Change a Computer Password Using Command Prompt Step 5 Version 4.jpg|center]] -
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.
- You can also add a new user using the Command Prompt.
-
You’ll need to replace «[username]» with the name of the account for which you wish to change the password. Type the account name exactly as it appears in the account name section of the Command Prompt.[4]
- 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.
-
The cursor won’t move or show the password. This is to hide the password from anyone who may be looking.[5]
EXPERT TIP
Brandon Phipps is a Technology Specialist based in Bakersfield, CA. He is the owner of Second Star Technologies and specializes in Managed IT Services for small and mid-sized businesses in Bakersfield, CA. With over 23 years of experience, he offers expert cloud computing, cybersecurity, and network management solutions. Brandon is a committed community member and coach who leads and innovates in tech and sports coaching. His dedication to local businesses and communities is evident in his hands-on, tailored approach to IT solutions.
Secure your digital life with online password best practices. Choose a long, easy-to-remember passphrase as your password. You should also avoid using the same password for multiple services or websites.
-
Again, it won’t appear as you type, so take your time. Make sure you enter the password exactly as you entered it the first time.[6]
- For a quicker (but less discreet) option, type net user [username] [new_password] into the Command Prompt and press Enter. Replace «[username]» with the account name you wish to change the password for, and replace «[new_password]» with the password you want to set.[7]
- You can also find your Wi-Fi password using the Command Prompt
- For a quicker (but less discreet) option, type net user [username] [new_password] into the Command Prompt and press Enter. Replace «[username]» with the account name you wish to change the password for, and replace «[new_password]» with the password you want to set.[7]
Advertisement
Add New Question
-
Question
How do I remove a password using cmd?
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?
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?
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.
See more answers
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
-
If you do not have an administrative account, you will need to contact an administrator to have your password changed.
-
If the PC you are trying to log into has a BIOS password, you will either need the master password to reset the BIOS password, or you can remove the CMOS battery from the motherboard.
Thanks for submitting a tip for review!
Advertisement
-
Never change the password on a computer for which you don’t have permission to do so.
Advertisement
About This Article
Article SummaryX
1. Open the Command Prompt.
2. Type «net user [username] *» and press Enter.
3. Enter the new password and press Enter.
4. Enter the password again and press Enter.
Did this summary help you?
Thanks to all authors for creating a page that has been read 2,276,557 times.
Is this article up to date?
Sign in to your MUO account
Need to change a user password in Windows 10 or 11? You can do this through the Settings app, but it’s much faster and takes fewer clicks to change a password through the command line instead.
Even if you’re new to text commands on Windows, changing the user password with the net user command is simple. We’ll show you how to change a Windows password using the command line with this handy method.
Use the Net User Command to Change a Windows Password
To change another Windows user’s password via the command line, you need administrator privileges. See how to check if your Windows account is an admin if you’re not sure. If you aren’t using an admin account because you’ve lost your administrator password and can’t make any changes, follow our tips for resetting a lost Windows admin password.
Also, keep in mind that this method only works for local accounts in Windows 10 and 11. It won’t work if you use a Microsoft account to sign in to Windows; you’ll need to change the password using Microsoft’s web account management page instead. See our guide to securing your Microsoft account for help with this and other security measures.
Now, here’s how to change passwords via CMD using net user:
-
Open an administrator Command Prompt window. To do this, type cmd into the Start menu, then right-click on the Command Prompt entry and choose Run as administrator.
- You can also use PowerShell or the Windows Terminal to perform this; you’ll find a shortcut to those by right-clicking the Start button or hitting Win + X.
-
Type the following net user command and press Enter to list all the users on your system. When they appear, take note of the account name you want to change the password for:
net user
-
To change a password, type the net user command shown below, replacing USERNAME and NEWPASS with the actual username and new password for the account. If the username is more than one word, you’ll need to place it inside quotes, as shown:
net user USERNAME NEWPASS
net user "USER NAME" NEWPASS
- After you press Enter to run this command, you’ll see a message that it completed successfully. Now you can use the new password to log into this account, just like if you had changed it via the graphical interface.
If you see an Access denied message when you try this, make sure that you started the Command Prompt (or other command line window) as an Administrator. Standard users can’t change the password for other accounts. If you see an error that the username wasn’t found, make sure you typed it correctly.
How to Privately Change a Password With Net User
You might want to prevent people around you from seeing the new password that you type when using net user. Thus, for more privacy, you can use a slightly different command to prevent the new password from appearing in plain text onscreen.
To do this, follow the above instructions, but during step 3, enter an asterisk instead of the password. Be sure to still replace USERNAME with the actual username:
net user USERNAME *
Windows will then ask you to type a new password twice. However, with this method, the passwords don’t appear as you type—making sure anybody nearby won’t see them.
Change Your Windows Password More Conveniently
Now you know how to use the net user command to change passwords in Windows. It’s a quick way to change passwords without sorting through menus, plus you can change multiple passwords in quick succession without your hands leaving the keyboard.
Give it a try next time you need to change a user password. And when you set a new one, make sure to choose a strong password that’s not easy to guess or crack.
The `net user` command in CMD allows you to change a user’s password by using the syntax below.
net user username newpassword
Replace `username` with the actual user’s name and `newpassword` with the desired new password.
Understanding the Basics of the `net user` Command
What is the `net user` Command?
The `net user` command is a powerful tool integrated within the Windows Command Prompt that enables users to manage accounts on a machine or across a network. It provides functionalities such as adding, deleting, and modifying user accounts. Understanding how to utilize this command effectively is essential for any system administrator or user looking to manage account settings.
Syntax of the `net user` Command
The basic syntax for the `net user` command is structured as follows:
net user [username] [new_password] [/domain]
Each parameter has its significance:
- username: This represents the specific account for which you want to change the password.
- new_password: This is the new password you wish to assign to the specified user.
- /domain: This optional switch indicates that the command should execute in a domain context, which is particularly useful in network environments.
Cmd Change Password Windows 7: A Simple Step-by-Step Guide
Steps to Change a User Password Using `cmd`
Step 1: Open cmd as Administrator
To execute the `cmd net user change password` command effectively, it’s crucial to run the Command Prompt with administrative privileges. Here’s how you can do this:
- Search for «cmd» or «Command Prompt» in the Windows Start menu.
- Right-click on the «Command Prompt» option.
- Select «Run as administrator.»
Running Command Prompt as an administrator grants you the necessary permissions to make changes to user accounts.
Step 2: Identify the Username
Before changing a password, you should confirm the exact username for which you intend to modify the password. Use the following command to display the list of user accounts on the system:
net user
This command will output a list of all existing user accounts. It’s essential to know the precise username to ensure the correct account is targeted when changing the password.
Step 3: Changing the Password
Basic Password Change Command
Once you have identified the correct username, you can change the password using the command. Here’s an example of how to structure the command:
net user username new_password
Replace username with the actual user’s name and new_password with the desired password. When this command is executed, the password for that particular user account will be updated instantly.
Important: Ensure that the new password meets complexity requirements, which often include a mix of uppercase letters, lowercase letters, numbers, and special characters.
Handling Password Complexity Requirements
Most Windows systems enforce password complexity requirements. Here are some tips:
- Length: Aim for at least eight characters.
- Character Variety: Include uppercase letters, lowercase letters, numbers, and special symbols.
- Avoid Simple Patterns: Refrain from using easily guessable details such as birthdays or common words.
By adhering to these guidelines, you’ll create a robust password that enhances security.
Step 4: Confirming the Password Change
To ensure that the password change was successful, the next step is to log in to the user account using the new password. If you can successfully access the account, then the password has been successfully updated. However, if you experience difficulties logging in, it indicates a potential issue, possibly with the syntax used or the permissions granted.
Master Cmd Net User Commands for Quick User Management
Common Issues and Troubleshooting
Error Messages You May Encounter
While executing the command, users may confront various error messages. Common issues include:
- «System error 8647»: Indicates a possible syntax error or that the username does not exist.
- «The password does not meet the password policy requirements»: This suggests that the new password does not comply with the system’s password complexity requirements.
Carefully reviewing the command and ensuring the username is correct can often resolve these issues.
Permissions Problems
If you encounter permissions-related errors, it may be due to insufficient privileges. In such cases, ensure that you are running Command Prompt as an administrator. Additionally, consider checking the account permissions of the user whose password you are attempting to change.
How to Change Password with Cmd: A Quick Guide
Additional Options with `net user`
Changing Passwords for Other Users
In instances where you need to change another user’s password, the command remains largely the same, with an added `/domain` option for network settings:
net user username new_password /domain
This is especially useful in corporate environments where user accounts are managed across a network.
Forcing a User to Change Their Password at Next Login
In some situations, it’s advisable to set a policy requiring users to update their passwords at the next login. You can achieve this by executing:
net user username /logonpasswordchg:yes
This command helps enforce security measures in environments where password management is critical.
Change Password Through Cmd: A Simple Step-by-Step Guide
Security Best Practices
Importance of Strong Passwords
A robust password serves as the first line of defense against unauthorized access. Choosing a strong, unique password for each account mitigates risks associated with brute force attacks and unauthorized access.
Regularly Updating Passwords
It’s advisable to change passwords periodically. Implementing a regular schedule for updating passwords can significantly enhance security. Consider setting reminders or utilizing password management tools to assist with this.
Cmd SSH with Password: A Quick Guide to Accessing Systems
Conclusion
Being proficient in using the `cmd net user change password` command is invaluable for anyone managing user accounts. By following the guidelines outlined in this guide, you can confidently and securely change user passwords, ensuring enhanced security across systems.
Change Password in Cmd for Windows 7: A Simple Guide
FAQs
Frequently Asked Questions about `cmd net user change password`
- What if I forget the username? Utilize the `net user` command to list all user accounts on the system.
- Can I change my password without administrative privileges? You cannot change another user’s password without sufficient permissions, but you can change your own depending on your account type.
By mastering the `cmd net user change password` command, you become better equipped to handle user account management efficiently and securely.