Solved

Create Local User account via Command Line

Posted on 2009-03-31
11
2,128 Views
Last Modified: 2012-06-27
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
Comment
Question by:lurezero
  • 5
  • 5
11 Comments
 
LVL 10

Expert Comment

by:Darylx
ID: 24030264
/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
 
LVL 5

Assisted Solution

by:trungnt8
trungnt8 earned 100 total points
ID: 24030346
http://support.microsoft.com/kb/251394
/expires:{date | never}
/passwordchg:{yes | no}
0
 
LVL 10

Expert Comment

by:Darylx
ID: 24030428
/expires is for the account expiry, not the password expiry.
0
 

Author Comment

by:lurezero
ID: 24030531
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
 

Author Comment

by:lurezero
ID: 24030593
so i assume that if the password never expires is not checked is ok?
0
IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

 
LVL 10

Expert Comment

by:Darylx
ID: 24030602
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
 

Author Comment

by:lurezero
ID: 24030638
its a server that belongs to a workgroup....200 local accounts...so i need to config a local GPO?
0
 

Author Comment

by:lurezero
ID: 24030651
i see a maximum password age on the local security policy...what is the value to set it to unlimited?
0
 
LVL 10

Expert Comment

by:Darylx
ID: 24030655
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
 
LVL 10

Accepted Solution

by:
Darylx earned 400 total points
ID: 24030670
Set the maximum password age to 0 (zero).  That means it will never expire.
0
 

Author Comment

by:lurezero
ID: 24030686
thats what i thought...thanks....
0

Featured Post

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Recently, I had the need to build a standalone system to run a point-of-sale system. I’m running this on a low-voltage Atom processor, so I wanted a light-weight operating system, but still needed Windows. I chose to use Microsoft Windows Server 200…
I've always wanted to allow a user to have a printer no matter where they login. The steps below will show you how to achieve just that. In this Article I'll show how to deploy printers automatically with group policy and then using security fil…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

746 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now