Need to create 200 user accounts
I need to create over 200 user account on a Windows 2000 Server. I have all of the user information in a spreadsheet and I want to be able to import it in. What "free" options are available to me?
pjkelly
Windows Forum
I need to create over 200 user account on a Windows 2000 Server. I have all of the user information in a spreadsheet and I want to be able to import it in. What "free" options are available to me?
pjkelly
See the ms kb Article ID: Q199878.
it's included in the included in the Windows NT 4.0 Resource Kit, Supplement 3. The Addusers.exe tool for Windows NT is a 32-bit administrative utility that uses a comma-delimited text file to create, modify, and delete user accounts. Addusers is most beneficial when the information to be manipulated is maintained in a spreadsheet, such as one created with Microsoft Excel, that can be converted to a comma-delimited file. You must be a member of the Administrators group on the target computer to add accounts and a member of the Users group to write to accounts
by pjkelly
by stillatit
The NET command allows you to add accounts from the command line.
Add a column to your spreadsheet with the command and switches you want (type net help user at the command line to see a summary of commands).
Format your columns to the correctorder.
Add additional columns with switches as needed.
Export the spreadsheet to text, with a .bat extension.
You may want or need to do some global search and replaces on the file with Word, etc.
Execute the batch file.
Good luck.
by pjkelly
by pjkelly
by mr.mcse
Use the csvde utility. Basically do the following:
1.) Save your spreadsheet in CSV (Comma Save Value) format.
2.) Open the CSV file you just saved in a text editor.
3.) Create a header "attribute line" in the first line of the *.csv file.(See Example A Below)
4.) Create a Distinguished Name (dn:) entry for each line.
(This can be scripted so that you don't have to do it manually. If you are unsure, let me know, I'll send you an example script that would handle this.)
5.) Import the users in the CSV file using the csvde utility (See Example B Below)
========================
Example A (the CSV File)
========================
-- Creating the Atrribute Line --
NOTE:
This is a comma seperated list of attributes that defines each of the attributes you are importing.
Example Attribute Line:
------------------------------------
dn,sAMAccountName,userPrincipalName,telephoneNumber,department,userAccountControl,objectClass
------------------------------------Example User Inport Line:
------------------------------------
"CN=Scott Culp,OU=test,DC=host_name,DC=your_domain,DC=com",scottc,scottc@host_name.your_domain.com,555-1236,human resources,512,user
------------------------------------
The distinguished name (dn:) consists of the following:
cn = common name
ou = orginizational unit to place the user into (Must already exist! It can also be omitted)
dc = domain controller to import user into
by mr.mcse
(continued...)
========================
Example B (csvde Syntax)
========================
Assuming that:
-the *.csv file that you will use to import the users is called "import.csv"
-The csv file contains the example info given above.
-the domain controller host name is: host_name
-the domain is: your_domain.com
Running the following from a cmd line:
csvde -i -f import.csv
would do the following:
-Create an account for Scott Culp in the "test" OU on your_host domain controller inside yourdomain.com
-Make the logon UPN: scottc@yourdomain.com
-Make the NT4.0 compatile logon name: scottc
-Make the account active (512 = enable account, 514 = disable account)
-Add Department and Phone number entries in the appropriate cells of the account properties.
====================================
There are several attributes that can be used, obviously you will need to use the ones that pertain to the type of data that you will be importing with your accounts. All of theattributes that are listed above are required when importing new accounts except for the phone number and department.
Here is a basic explanation of csvde:
http://www.ip-pro.com/glossary/c/csvde.htm
I would also search MSKB with csvde as a keyword.
by pjkelly
Your idea sounds good but I'm not thrilled with the idea of including the entire dn. Also, how do I find out the names of the rest of the Attributes that I can use?
I'm still hoping for a GUI solution, though.
by mr.mcse
There is no built in GUI utility that will do what you want.
MS KB Q224543 will tell you how to find attributes in Active Directory.
You can use any one of several scripting languages to handle the creation of the dn automatically. (VBS, WSH, Perl, Javascript, etc..)
There really is no easier solution (built-in) and unfortunately it does inititally require a little work on your part. Once you do it you'll see that it really is easy.
You should be looking at purchasing third-party ldap applications/solutions to do what you ask in GUI.
by pjkelly
by pjkelly
by pjkelly
This discussion is closed to new replies.
Sort by Trending