The LDIF specification defined in RFC 2849 describes a well-defined file-based format for representing directory entries. The format is intended to be both human and machine parseable, which adds to its usefulness. LDIF is the de facto standard for importing and exporting a large number of objects in a directory and is supported by virtually every directory vendor including Microsoft.
The -f
switch specifies the name of the file to
use to save the entries to, -s
is the DC to query,
-l
is the comma-separated list of attributes to
include, -p
is the search scope,
-r
is the search filter, and -d
is the base DN. If you encounter any problems using
ldifde
, the -v
switch enables
verbose mode and can help identify problems.
Recipe 4.25 for importing objects using LDIF, RFC 2849 (The LDAP Data Interchange Format (LDIF)—Technical Specification), and MS KB 237677 (Using LDIFDE to Import and Export Directory Objects to Active Directory)
Get Active Directory Cookbook now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.