lurezero
asked on
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
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
/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.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
/expires is for the account expiry, not the password expiry.
ASKER
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?
ASKER
so i assume that if the password never expires is not checked is ok?
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?
ASKER
its a server that belongs to a workgroup....200 local accounts...so i need to config a local GPO?
ASKER
i see a maximum password age on the local security policy...what is the value to set it to unlimited?
You can configure the local security policy (if you want the password never expires setting to apply to all user accounts on that server).
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
thats what i thought...thanks....