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?
4 Answers
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.
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
Yes you could change the password with net user <username> <newpassword>
.
Here further informations.
Some examples
Changing the password
There are two ways of changing the password in Command Prompt:
- The silent way
Net User "User's name" "New password"
- 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
, andNET
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.
net user
approach "reset" or "change" the password? Or what did you mean with that comment?