Posted by vikas vohra | 0 comments

Importing Users with LDIFDE

Importing Users with LDIFDE

You can also use Ldifde.exe to import or export Active Directory objects, including users. The
Lightweight Directory Access Protocol Data Interchange Format (LDIF) is a draft Internet
standard for file format that can be used to perform batch operations against directories that
conform to t he LDAP standards. LDIF supports both import and export operations as well as
batch operations that modify objects in the directory. The LDIFDE command implements these
 batch operations by using LDIF files.

The LDIF file format consists of a block of lines that, together, constitute a single operation. Mul-
tiple operations in a single file are separated by a blank line. Each line comprising an operation
consists of an attribute name followed by a colon and the value of the attribute. For example,
suppose you wanted to import user objects for two sales representatives, named April Stewart
and Tony Krijnen. The contents of the LDIF file would look similar to the following example:

DN: CN=April Stewart,OU=People,DC=contoso,DC=com
changeType : add
CN: April  Stew art
objectClass: user
sAMAccount Name: april.stewart
given Name: April
sn: Stewart
displayName: Stewart,April
description: Sales Repre sentative in the USA
title: Sales Representative
department : Sales
company: Contoso,Ltd.

DN: CN=Tony Krijnen,OU=People,DC= contoso,DC=com
changeType: add
CN: Tony Krijnen
objectClass: user
sAMAccountName: tony.krijnen
userPrincipalName: tony.
givenName: Tony
sn: Krijnen
displayName: Krijnen,Tony
mail: tony.krijnen@
description: Sales Representative in The Netherlands
title: Sales Representative
department: Sales
company: Contoso,Ltd.