Is there any way to change the Windows 7 password using the command prompt?

4

2

How would I change the password of Windows 7 using the command prompt if the existing password isn't known, but I have admin rights?

chetan

Posted 2012-08-01T12:46:56.693

Reputation: 49

2Obligatory reminder: resetting your password (as opposed to changing it) will render anything encrypted using your Windows credentials unrecoverable. This includes things like files encrypted using EFS. – CBHacking – 2015-09-30T04:35:15.877

@CBHacking Does the net user approach "reset" or "change" the password? Or what did you mean with that comment? – ygoe – 2016-09-07T15:02:29.870

Answers

5

Type this command net user (your username) * Then type new password, and confirm it. You are done. See the image. In the image zack is my username. When you type the password the command prompt won't show the cursor moving as you type. Just type new password and press enter.

enter image description here

Thu Yein Tun

Posted 2012-08-01T12:46:56.693

Reputation: 459

1

Use the "net user" command.

C:\>net user /?
The syntax of this command is:

NET USER
[username [password | *] [options]] [/DOMAIN]
         username {password | *} /ADD [options] [/DOMAIN]
         username [/DELETE] [/DOMAIN]
         username [/TIMES:{times | ALL}]


C:\>

See also here: http://technet.microsoft.com/en-us/library/8935e4a8-3624-46a1-b47a-c7735802b456
and here http://support.microsoft.com/kb/251394

a_horse_with_no_name

Posted 2012-08-01T12:46:56.693

Reputation: 143

1

Yes you could change the password with net user <username> <newpassword>.

Here further informations.

hofmeister

Posted 2012-08-01T12:46:56.693

Reputation:

0

Some examples

Changing the password

There are two ways of changing the password in Command Prompt:

  1. The silent way

Net User "User's name" "New password"

  1. The Interactive way

Net User "User's name" *

Here asterisk (*) prompts the user for password input making it invisible on the screen and unrecordable in Command Prompt's (cmd.exe) history.

Notes

  • Always double quote the name and the password to escape special characters such as spaces.
  • The current user's name is contained withing %UserName% environment variable.
  • Windows is case-insensitive operating-system hence letter cases do not matter in variable names; meaning %USERNAME% and %username%, and even %uSErNaMe% gives the same result.
  • The above is true for Windows commands (their names) as well, meaning net, Net, and NET all are same.

Making the user administrator

To make a user administrator you should add the user into the Administrators group what is done as follows in command-line "style":

Net LocalGroup Administrators "User's name" /Add

Activating the system's Administrator user

Windows has a special user named Administrator who is deactivated by default and who you call when you Run an executable file as Administrator. That user can be activated to login with as follows (in CLI style):

Net User Administrator /Active:Yes

It might be called the "ultimate" user which you can login without creating a separate user, but it's not recommended. Furthermore, it ignores UAC and the related, and has troubles with things such as the new metro interface and its tiles, by default, without reconfiguration.

user373230

Posted 2012-08-01T12:46:56.693

Reputation: