Remove a user's password using "net" command'
Is it possible to remove a user's password using the net command?
I tried "net user <name> *" and just hitting return twice, but this does not work as expected. Is there any other way to do this? (I'd gladly take non-net commands, as long as they are built-in in XP SP3).
Edit: Seems, I did not make my intention clear. I don't just want to change the password, but remove it completely (so that the user may log in without having to supply a password).
I'm familiar with the "net"-reference and have searched online for several hours, but could not find a hint on how to do this.
34 Answers
The command to set a password to blank is simply this:
net user username ""Execute it in a Command Prompt (cmd) that is Run as Administrator.
Note: There's a nice vbs script that tests which account has a blank password here.
6Run net user <username> /passwordreq:no in an command prompt opened under the Administrator account's context (In Win XP hold down shift and right click on cmd.exe to Open as another user, then enter in the "Administrator" account's password; Win Vista+ just right click and select Run as Administrator). Then run net user <username> <password>
This has the advantage over net user <username> "" that it allows one to change the user in question's password from something to nothing, in lusrmgr.msc and other GUI user management tools, as well as using the net user command in future.
More info:
NOTE: Yes, this is very similar to jordyonrust's answer as I haven't had much success with editing other's answers to correct minor mistakes/omissions (the latter more often when I need to make more than a couple of character changes to correct a mistake and the additional information "changes the intent of the answer too much").
net user <username> passwordreq:[yes or no] Used to determine if the account needs a password. Not sure it works. Maybe this will do?
You also might find this interesting: Net.exe reference
1the command is
net user USERNAME PASSWORDif you leave the password blank it may remove the password, however I have a minimum password policy on this machine and I cant set a password with 0 characters
1