Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Create Local User account via Command Line

Posted on 2009-03-31
11
Medium Priority
?
2,183 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 400 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
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

Get your Conversational Ransomware Defense e‑book

This e-book gives you an insight into the ransomware threat and reviews the fundamentals of top-notch ransomware preparedness and recovery. To help you protect yourself and your organization. The initial infection may be inevitable, so the best protection is to be fully prepared.

Question has a verified solution.

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

Scenerio: You have a server running Server 2003 and have applied a retail pack of Terminal Server Licenses.  You want to change servers or your server has crashed and you need to reapply the Terminal Server Licenses. When you enter the 16-digit lic…
While rebooting windows server 2003 server , it's showing "active directory rebuilding indices please wait" at startup. It took a little while for this process to complete and once we logged on not all the services were started so another reboot is …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 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