Solved

Create Local User account via Command Line

Posted on 2009-03-31
11
2,157 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 

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
 
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

Visualize your virtual and backup environments

Create well-organized and polished visualizations of your virtual and backup environments when planning VMware vSphere, Microsoft Hyper-V or Veeam deployments. It helps you to gain better visibility and valuable business insights.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
ADCs have gained traction within the last decade, largely due to increased demand for legacy load balancing appliances to handle more advanced application delivery requirements and improve application performance.
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…

734 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