# Solved: net user question



## scrfix (May 3, 2009)

Just testing some items here. Not for anything but my curiousity.

Is there a way to delete a password from someone's account via the command line?

I know that I can change it via net user %username% <new password> but if I wanted to remove it, how would you accomplish that?

*Updated*
All I receive from the /? is

The syntax of this command is:
NET USER
[username [password | *] [options]] [/DOMAIN]
username {password | *} /ADD [options] [/DOMAIN]
username [/DELETE] [/DOMAIN]
username [/TIMES:{times | ALL}]

That doesn't tell me whether or not the /DELETE will delete the username or the password.


----------



## Squashman (Apr 4, 2003)

net user Squashman ""



scrfix said:


> That doesn't tell me whether or not the /DELETE will delete the username or the password.


Do you ever Google search or use Microsoft's knowledge base.
http://support.microsoft.com/kb/251394


----------



## scrfix (May 3, 2009)

I actually did search Google about it after I posted and found out about the delete however did not find out about the "".

Thanks,


----------



## scrfix (May 3, 2009)

The other thing I could not find is whether or not there is a way to detect a password on the user account. I thought I asked about that before but I went over older posts and could not find it. I don't care what the password is, just curious if there is a way to detect if the current user account has a password associated with it.


----------



## Squashman (Apr 4, 2003)

I thought I had a solution using a third party utility but I think you would have to lower your security level of the pc's to make it work.

It is a little utility called AUTH. But it won't check for blank passwords but I think it is a system error that it is giving me. It basically trys to authenticate to the computer and tells you if the authentication was successful. Now if you could use it with blank passwords it would work like a charm.


```
C:\Users\username\Downloads\Auth>auth.exe /d:GREEN-MEN /u:username /p:

Auth V01.01.00cpp Joe Richards ([email protected]) August 2001

Authenticating GREEN-MEN\username
Logon failure: user account restriction. Possible reasons are blank passwords no
t allowed, logon hour restrictions, or a policy restriction has been enforced.


C:\Users\username\Downloads\Auth>net user username password
The command completed successfully.


C:\Users\username\Downloads\Auth>auth.exe /d:GREEN-MEN /u:username /p:password

Auth V01.01.00cpp Joe Richards ([email protected]) August 2001

Authenticating GREEN-MEN\username
Logon Successful.
```
I think the only way to make this work would be to set a group policy but you are not using all XP pro or Vista Business computers so that is out of the question.
http://www.theeldergeek.com/blank_password_network_access.htm


----------



## Squashman (Apr 4, 2003)

Of course if you setup account restrictions like we showed you in another thread you wouldn't have to worrry about blank passwords.


----------



## Squashman (Apr 4, 2003)

I am guilty of my own advice. Why didn't I just google search first. It was the first hit on a google search: test for blank passwords
http://www.microsoft.com/technet/scriptcenter/resources/qanda/oct05/hey1006.mspx


----------



## Squashman (Apr 4, 2003)

scrfix said:


> I actually did search Google about it after I posted and found out about the delete however did not find out about the "".
> 
> Thanks,


You are at a CMD prompt! Have you forgotten the CARDINAL rule! Try setting someones password with the *net user* command and put a space in it without quotes!


----------

