Information Technology Reference
In-Depth Information
To see the same output from LDIFDE, use the following command (see Figure 5-21):
ldifde -f MktUsers -d "ou=Marketing,dc=w2k8ad99,dc=com" -r
"(objectClass=user)"
Figure 5-21
An export file created by LDIFDE
As mentioned, LDIFDE is more powerful because of its capability to modify Active Directory
objects. One method is exporting the objects you want to modify, making changes to the attributes
you're modifying, and importing the file. Each object in the exported file has an associated action
specified by the changetype line (the second line of output in Figure 5-21). To modify objects, change
the action in the changetype line to “modify.” LDIFDE is also useful for bulk moving of users from
one domain to another. Users can be exported from one domain and imported to the other domain.
Creating Users with CSVDE You can use a regular text file to import users (and other
objects) into Active Directory with CSVDE, but the file must be formatted correctly. A CSV file
must have a header record (the first line of a file) listing attributes of the object to be imported.
For a user, it normally includes at minimum the distinguished name, the SAM account name, the
UPN, and the object class attribute. Here's an example of a header record:
dn,SamAccountName,userPrincipalName,objectClass
To find a list of any object's attributes, open the Attribute Editor tab of its
Properties dialog box. To see this tab, you must enable Advanced Features
on Active Directory Users and Computer's View menu.
A data record for this CSV file looks like this:
"cn=New User,ou=TestOU,dc=w2k8adXX,dc=com",NewUser,
NewUser@w2k8adXX.com,user
You add a data record for each user you need to create. Creating this file manually is no time
saver compared with using DSADD in a batch file or even using Active Directory Users and
Computers. If you have a database of several hundred users you need to create, however, with a little
experience in Access or other database programs, you could create this file from the database easily.
A major drawback of CSVDE is that you can't set passwords with it, so all accounts are disabled
until you create a password for each account that meets complexity requirements. As a workaround,
you can temporarily set the password policy for the domain to allow blank passwords.
Activity 5-13: Using CSVDE to Create Users
Time Required: 10 minutes
Objective: Create a text file to use with CSVDE to import users.
Description: You have a large database of users, and you need to create user accounts for them.
You have heard of the CSVDE program but haven't used it. You want to create a CSV file man-
ually to import a test user before writing code to create the file with a database program.
 
Search WWH ::




Custom Search