?
Solved

Net User /add batch file

Posted on 2009-05-12
8
Medium Priority
?
1,235 Views
Last Modified: 2013-11-10
Hello
is it possible to use net user to create a user account on another computer in a workgroup?
ex. run net user /add from station 1 to create a user on station2 via a batch file.
0
Comment
Question by:schuitkds
[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
  • 3
8 Comments
 
LVL 8

Expert Comment

by:zoubi77
ID: 24368716
If you do not need to create a bunch of users, try using "Computer management". You can connect to any computer in domain and add groups and users
0
 
LVL 8

Expert Comment

by:zoubi77
ID: 24368737
But if you still need scripting tools than take a look at ADDuser tool from MS

http://support.microsoft.com/kb/199878

0
 

Author Comment

by:schuitkds
ID: 24368801
I need to create the same user on multiple machines in a workgroup environement.
0
Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

 
LVL 8

Expert Comment

by:zoubi77
ID: 24368912
than use adduser tool I mentioned in previous link. You can create file with user attributes and create that user on remote machine

C:\>AddUsers [\\computername] /c c:\Users.txt /p:e
0
 

Author Comment

by:schuitkds
ID: 24368959
no i need to does this in a batch file if possible
0
 
LVL 8

Expert Comment

by:zoubi77
ID: 24369205
It is possible. Go and download ADDUSERS
http://www.petri.co.il/download_free_reskit_tools.htm 

Than Create a comma-delimited text file, which contains the new users and groups to be created. Syntax is section-specific for each entry (line) in the different sections, as follows:

[Users]
User Name,Full name, Password, Description, HomeDrive, Homepath, Profile, Script

[Global]
Global Group Name, Comment, UserName, ...

[Local]
Local Group Name, Comment>, UserName, ...

The entries (lines) in the [Local] and [Global] group sections can have 0 or more UserName entries after the comment field. Each user name is added to that group. Lines must end with a comma (or the appropriate separator character). Here is the example from the Resource Kit Tools Help file for AddUsers.exe:

[User]
jimmy,James Edward Phillip II,,,,,,
alex,Alex Denuur,,,E:\,E:\users\alex,,
ron,Ron Jarook,hello,,E:\,E:\users\ron,,
sarah,Sarah Selly,,,,,,
mike,Mike Olarte,,,,,,

[Global]
TestTeam,Regression,ron,alex,
DevTeam,Conversion to Sources,mike,sarah,jimmy,

[Local]
UsersAM,Users A through M,alex,jimmy,mike,
UsersNZ,Users N through Z,ron,sarah


Creating the users (and groups) can be performed through a batch file or at the command line. The following command creates the users and groups listed in a text file called Users.txt. The "/p" switch creates the users with the Passwords Never Expire option enabled:

C:\>AddUsers [\\computername] /c c:\Users.txt /p:e

Once you crated users.txt file just use this command to and change computername. You can create batch file. You yust copy,paste&change computername

@Echo off

cd %path_to_addusers.exe_file%
AddUsers \\computer1 /c c:\Users.txt /p:e
AddUsers \\computer2 /c c:\Users.txt /p:e

%path_to_addusers.exe_file% is directory where you extract addusers.exe


0
 

Author Comment

by:schuitkds
ID: 24369934
okkkk   thats more software to upload to the remote sites then
i also need to hide the account for administrative purposes.
i
0
 
LVL 8

Accepted Solution

by:
zoubi77 earned 2000 total points
ID: 24371919
For hiding users on welcome screen follow this link - http://www.intelliadmin.com/blog/2006/09/hide-user-accounts-from-windows-xp.html

if you prefere scripting - http://www.dougknox.com/xp/scripts_desc/xp_hide_users.htm

as for creating users...you only need to download ONE single file - adduser.exe. On the PC that you downloaded file to, you create list of users and then run either adduser.exe (with parameters) or your own script (as I described in my posts)
0

Featured Post

Get 15 Days FREE Full-Featured Trial

Benefit from a mission critical IT monitoring with Monitis Premium or get it FREE for your entry level monitoring needs.
-Over 200,000 users
-More than 300,000 websites monitored
-Used in 197 countries
-Recommended by 98% of users

Question has a verified solution.

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

This is about my first experience with programming Arduino.
This is a fine trick which I've found useful many times, when you just don't want to accidentally run a batch script or the commands needs administrator rights.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Starting up a Project
Suggested Courses

777 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