Google Answers Logo
View Question
 
Q: Adding a new user through command prompt ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Adding a new user through command prompt
Category: Computers > Programming
Asked by: compuplus-ga
List Price: $5.00
Posted: 07 Apr 2003 11:16 PDT
Expires: 07 May 2003 11:16 PDT
Question ID: 187228
How can I add a new computer user using shell or the command prompt.
I have windows xp.
I think the command is user but i don't know the parameters and arguments.
Answer  
Subject: Re: Adding a new user through command prompt
Answered By: deadlychiapet-ga on 07 Apr 2003 13:47 PDT
Rated:5 out of 5 stars
 
Hi there,

The command for adding a user from the command line is:
net user <username> <password> /add (/domain)

(Before we go any further, if I enclose a command below in quotes,
dont enter the quotes when typing the command.)

An example might be "net user DeadlyChiapet somepassword /add" which
would add a user named "DeadlyChiapet" with the password
"somepassword". If the computer is on a domain you can use the /domain
switch when adding the name. You can get the correct syntax of the net
user command (or almost any command line command) by typing "net user
/?" or "net user /help". The best reference for this command is
actually the built in Windows XP help file on the subject. It tells
you exactly how to use the command and includes examples along with
all the parameters you can use with it. There's two ways to get there.

1. You can get there by clicking Start>Help and Support to open up the
Help app. Search for "net user" without the quotes, click the tab for
Full-text Search Matches, and click on the net user entry to bring up
its page.
2. OR just visit Microsoft's TechNet site at
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winxppro/proddocs/net_user.asp
to see it on the web.

I've also included an article (linked below) that describes how to
automate this task if that's what you need to do.

Hope this is what you're looking for! If you need any further
clarification please ask before rating this answer.

Deadlychiapet-ga

Additional links:
How can I add a user from the command line?
http://www.windows2000faq.com/Articles/Index.cfm?ArticleID=15064

Google search terms used:
add user command line
"net user" command

Request for Answer Clarification by compuplus-ga on 07 Apr 2003 15:15 PDT
Thank you very much. However when i do that the user is automatically
a limited user. do you know how to make him an administrator.
the main thing is i want the new users to be able to use any program
installed on the computer.

Clarification of Answer by deadlychiapet-ga on 07 Apr 2003 20:31 PDT
Hi again,

If you want to make the user an Administrator you'll have to run a
second command after the first which moves the user to the
Administrators group. You could also add the user to the Power Users
group which should accomplish your goal of letting the user run any
program, but without totally compromising security. The command to do
so is:

net localgroup Administrators /add <username> or
net localgroup "Power Users" /add <username> (quotes needed here)

For example, you might enter "net user SomeUser /add" and then "net
localgroup Administrators /add SomeUser". More on the net localgroup
command can be found on Microsoft TechNet at:
http://www.microsoft.com/technet/treeview/default.asp?url=/technet/prodtechnol/winxppro/proddocs/net_localgroup.asp

Hope that solves your problem!
Deadlychiapet-ga
compuplus-ga rated this answer:5 out of 5 stars and gave an additional tip of: $2.00
Thanks alot you were a big help

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy