Security

Change User Password from the Command Prompt

How can I change my user-account password from a Command Prompt?

You can change a Windows User Account password that is on any Windows computer from any other Windows computer regardless of whether the User Account is on a workstation, a stand-alone server, or a Windows domain controller. Additionally, it makes no difference whether the password being changed from a workstation, a stand-alone server, or a Windows domain controller. This is true for any NT 4.0, W2K, XP Pro and Windows Server 2003 computer.

To change a user’s password at the command prompt, log on as an administrator and type:

Sponsored Content

Maximize Value from Microsoft Defender

In this ebook, you’ll learn why Red Canary’s platform and expertise bring you the highest possible value from your Microsoft Defender for Endpoint investment, deployment, or migration.

​net user danielp * /domain

(This is only an example, use your own username)

When you are prompted to type a password for the user, type the new password, not the existing password. After you type the new password, the system prompts you to retype the password to confirm. The password is now changed.

Alternatively, you can type the following command:

​net user danielp 123456 /domain

When you do so, the password changes without prompting you again. This command also enables you to change passwords in a batch file.

Note: If you type these commands on a member server or workstation and you don’t add the /domain switch, the command will be performed on the local SAM and NOT on the DC SAM.

For example, to change the administrator’s password type:

​net user administrator 123456

Note: Non-administrators receive a "System error 5 has occurred. Access is denied" error message when they attempt to change the password.

Related articles

You may find these related articles of interest to you:

Links

How to Change User Password at Command Prompt- 149427

Related Topics:

External Sharing and Guest User Access in Microsoft 365 and Teams

This eBook will dive into policy considerations you need to make when creating and managing guest user access to your Teams network, as well as the different layers of guest access and the common challenges that accompany a more complicated Microsoft 365 infrastructure.

You will learn:

  • Who should be allowed to be invited as a guest?
  • What type of guests should be able to access files in SharePoint and OneDrive?
  • How should guests be offboarded?
  • How should you determine who has access to sensitive information in your environment?

Sponsored by: