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!

Creating Active Directory Users in Bulk

Status
Not open for further replies.

AndyMac

MIS
Nov 15, 2000
27
0
0
GB
I am trying to use the utility CSVDE provided with the Windows 2000 resource kit to create large numbers of users automatically. Users are created and placed in the appropriate OU with no problems. However, unlike when created individually and manually, the home directory for the user is not created immediately with permissions user:f,administrators:f. it is created when the user logs in with permission User:f, preventing access by the administrator. Is this a 'feature'? Is there a better utility for user creation and integration into AD?
 
I'm doing the same thing with W2K Server. I can create users in a particular ou with a User Logon Name using a .vbs imported file. What are the other possible attributes that I can assign a value? Or I should say, what are the correct attributes for setting password, first name, last name, display name, description, user profile path and home folder on a server (not local hard drive)?
 
objectClass,DN,sAMAccountName,displayName,userprincipalname,givenName,sn,mail,description,telephonenumber
 
If you want to add more attributes to the imported contacts than the example in this article provides,
install the Active Directory Schema snap-in. You can use the Active Directory Schema snap-in to view the
Object Class of a contact. This is helpful for finding the exact names of object attributes you want to add.
For example, to include the "home phone number" attribute, add a file header field that is named homePhone,
and then enter the phone numbers in the data fields beneath the homePhone header.

The Active Directory Schema snap-in provides the attribute names, descriptions, and provides a reference for
whether or not the attributes are mandatory or optional. To install the Active Directory Schema snap-in, add
the additional Windows 2000 Administrative tools by running Adminpak.msi from the %systemroot%\System32 folder.
Once the additional administrative tools are installed, the Active Directory Schema snap-in can be added to the
Microsoft Management Console (MMC).

Once a file has been constructed that conforms to the necessary structure, use Csvde.exe in Import mode to import
the information into the Active Directory. To import a CSV file, type csvde -i -f <path>\<filename> at a command
prompt, and then press ENTER, where the -i switch changes the Csvde.exe utility to Import mode, and the -f switch
requires the full path to the file name that is being imported. To see a list of available options for Csvde.exe,
type csvde /? at a command prompt, and then press ENTER.
 

works well. used it myself

one thing: substitue ocn.connect &quot;Excel&quot; with sCnStr = &quot;Provider=MSDASQL;&quot; & _
&quot;Driver={Microsoft Excel Driver (*.xls)};&quot; & _
&quot;DBQ=\\SEVER\PATH\UserNames.xls&quot;
oCn.Open sCnStr

Create an Excel file called UserNames.xls. The first row should be UserID, FullName, etc.... The following rows should be your data.

good luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top