Improve company productivity with a Business Account.Sign Up

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2240
  • Last Modified:

Create Local User account via Command Line

Hi the command to create a local user account is

net user user Password /fullname:"User Name" /add

How to I add the switches so this password will not expire and user cannot change the password?

THanks
0
lurezero
Asked:
lurezero
  • 5
  • 5
2 Solutions
 
DarylxCommented:
/passwordchg:{yes | no} for changing the password.  I don't know about the password never expires bit.  Maybe you could do that with a GPO.
0
 
trungnt8Commented:
http://support.microsoft.com/kb/251394
/expires:{date | never}
/passwordchg:{yes | no}
0
 
DarylxCommented:
/expires is for the account expiry, not the password expiry.
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
lurezeroAuthor Commented:
the password change is working and is showing checked but the password expires:never is not checked when executed. is it supposed to be checked. can you give me a sample with the entire command set?
0
 
lurezeroAuthor Commented:
so i assume that if the password never expires is not checked is ok?
0
 
DarylxCommented:
I don't think you can set that option with the net user command.  That's why I said use a GPO or configure the local policy on the computer.  Are you creating the accounts on a PC or server?  Is it a domain PC or Server?
0
 
lurezeroAuthor Commented:
its a server that belongs to a workgroup....200 local accounts...so i need to config a local GPO?
0
 
lurezeroAuthor Commented:
i see a maximum password age on the local security policy...what is the value to set it to unlimited?
0
 
DarylxCommented:
You can configure the local security policy (if you want the password never expires setting to apply to all user accounts on that server).
0
 
DarylxCommented:
Set the maximum password age to 0 (zero).  That means it will never expire.
0
 
lurezeroAuthor Commented:
thats what i thought...thanks....
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get your problem seen by more experts

Be seen. Boost your question’s priority for more expert views and faster solutions

  • 5
  • 5
Tackle projects and never again get stuck behind a technical roadblock.
Join Now