Sunday, February 14, 2010

Change Windows password using Command Prompt

In Windows XP, Vista and 7 the net user command can be used to change the password of users, assign random passwords to users or change the password of the current user without knowing the users current password.

Assign a new password to local user guest. 
  • Open Command Prompt
  • In Command Prompt type net user guest password where password is the password you wish to assign the user with.
  • If you want to assign a new password to another user replace guest in the above command with the name of the respective user. 
Assign a random password of length 14 to local user guest 
  • Open Command Prompt
  • In Command Prompt type net user guest /random:14
  • Replacing 14 with the length of the password you require will generate a password of the required length.
  • The shortest password you can generate is 0 characters long and the longest is 256 characters.

Note: Administrative privilege would be required to change the passwords of users other than the user under which the net user command is executed.
  • Typing cmd.exe in the start menu search box in Vista & 7 and pressing Ctrl+Shift+Enter will launch Command Prompt with administrative privileges.
  • Alternatively, you can right-click the Command Prompt entry in the start menu and select Run As Administrator

No comments:

Post a Comment