Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding Bulk User Accounts

Status
Not open for further replies.

punta30

Technical User
Dec 18, 2002
8
0
0
AU
Firstly - Tek-Tips is a very useful site and I appreciate the expert help available.

I have to add about 200 user accounts to a Win2000 server with AD. User data is in an off network data base. It would also be helpful to add sets of users to specific OU's

I have found the script suggested by ShackDaddy on Nov 28 2001. (see below). Is there additional script that will add a user to an OU.

Any suggestion for alternative methods, available utitities, etc??

Thanks

_______________________


Following is the script by ShackDaddy in an answer to a post by vahid_jingil

You can write a command-line script that uses the 'net user' command. Type 'net user /?' at the command-line for options.

A script I wrote to create individual users is as follows. You could edit it to take input from a text file or something.

----------
net users %1 %2 /add /fullname:%3 /domain
net group %4 %1 /add /domain
md \\server1\users\%1
md \\server1\users\%1\exchange
wait 10
rmtshare \\server1\%1$=e:\users\%1
rcmd \\compdc net accounts /sync
wait 50
net users %1 /HOMEDIR:\\athenaserver1:LOGIN.BAT /DOMAIN
cacls \\server1\users\%1 /G Administrator:F %1:F
cacls \\server1\users\%1 /G EVERYONE:R
------------

I name the file something like 'newuser.cmd' and supply it with arguments like 'newuser vahid password1 "Vahid Vajpai" Programming'.

This script:
-creates a user & sets a password
-puts the user in a group
-creates a directory
-shares the directory out
-synchronizes the domain accounts
-sets the home directory and login script
-sets permissions on their home directory

Hope this helps.

ShackDaddy
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top