Monday, September 2, 2013

Change Local or domain user Password from the Command Prompt

One can change Local User / domain user Password from the Command Prompt by using 'net user' command. This is very usefull specially when you work on remote machines and access RDP within RDP(where ALT+CTRL+END doesn't work) and want to change you domain user password. In my case I wanted to change my domain user pwd on a Server 2008 remote machine, where Alt+Ctrl+End or Del is the only way to change your pwd(i couldn't find any other :P ).

To change a user's password at the command prompt, one should have administrator or required rights.

Syntx:- C:\Users\nMohammad>net user nMohammad * /domain

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:
C:\Users\nMohammad>net user nMohammad asd#123 /domain, where "asd#123" is a new password.
When you do so, the password changes without prompting you again.

To change password of a administrator or local user account do this,

C:\Users\nMohammad>net user nMohammad asd#1234,  where "asd#123" is a new password.

Note:- In case if you don't have sufficient privilage, when attempt to change the password you will get a "Access is denied" error message.


No comments:

Post a Comment