Information Technology Reference
In-Depth Information
1. If necessary, log on to your server as Administrator.
2. Click Start , type notepad in the Start Search text box, and press Enter .
3. In Notepad, type the following, pressing Enter after each line:
In the following example, take care to type the second and third lines on
one line, and then type the fourth and fifth lines on one line.
dn,SamAccountName,userPrincipalName,objectClass
"cn=CSV User1,ou=TestOU,dc=w2k8adXX,dc=com",CSVUser1,
CSVUser1@w2k8adXX.com,user
"cn=CSV User2,ou=TestOU,dc=w2k8adXX,dc=com",CSVUser2,
CSVUser2@w2k8adXX.com,user
5
4. Click File , Save As from the menu. In the Save as type list box, click All Files (*.*) . In the
File name text box, type C:\csvusers.csv , and then click Save . Exit Notepad.
5. Open a command prompt window. Type cd \ and press Enter . Type csvde -i -f csvusers.csv
and press Enter .
6. Close the command prompt window, and open Active Directory Users and Computers. Click
the TestOU OU and verify that the users were created. Leave Active Directory Users and
Computers open for the next activity.
Creating Users with LDIFDE The LDIF format is considerably different from the CSV
format, but the idea is the same. Instead of a header line followed by data records, each object
consists of a series of lines, and each line specifies an action or attribute. Following is an exam-
ple of a file for creating a user:
dn: cn=LDF User1,ou=TestOU,dc=w2k8adXX,dc=com
changetype: add
ObjectClass: user
SamAccountName: LDFUser1
UserPrincipalName: LDFUser1@w2k8adXX.com
Aside from the format of data in the file, the data is no different from what's in a CSV file,
except the changetype entry, which can be add, modify, or delete (depending on what you're
doing with objects). One common use of LDIFDE is exporting users from one domain and
importing them into another domain.
Activity 5-14: Using LDIFDE to Create Users
Time Required: 10 minutes
Objective: Create a text file to use with LDIFDE 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 LDIFDE 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.
1. If necessary, log on to your server as Administrator.
2. Click Start , type notepad in the Start Search text box, and press Enter .
3. In Notepad, type the following, pressing Enter after each line:
dn: cn=LDF User1,ou=TestOU,dc=w2k8adXX,dc=com
changetype: add
ObjectClass: user
SamAccountName: LDFUser1
UserPrincipalName: LDFUser1@w2k8adXX.com
 
Search WWH ::




Custom Search