LDAP data interchange format (LDIF)
This information describes the LDAP data interchange format (LDIF), as used by the ldapmodify, ldapsearch and ldapadd utilities.
The LDIF specified here is also supported by the server utilities provided with the IBM Directory.
LDIF is used to represent LDAP entries in text form. The basic form of an LDIF entry is:
dn: <distinguished name> <attrtype> : <attrvalue> <attrtype> : <attrvalue> ...A line can be continued by starting the next line with a single space or tab character, for example:
dn: cn=John E Doe, o=University of Higher Learning, c=USMultiple attribute values are specified on separate lines, for example:
cn: John E Doe cn: John DoeIf an <attrvalue> contains a non-US-ASCII character, or begins with a space or a colon ':', the <attrtype> is followed by a double colon and the value is encoded in base-64 notation. For example, the value " begins with a space" would be encoded like this:
cn:: IGJlZ2lucyB3aXRoIGEgc3BhY2U=Multiple entries within the same LDIF file are separated by a blank line. Multiple blank lines are considered a logical end-of-file.
For more information, see the following:
- Example: LDIF
Here is an example of an LDIF file containing three entries.
- Version 1 LDIF support
The client utilities (ldapmodify and ldapadd) have been enhanced to recognize the latest version of LDIF, which is identified by the presence of the "version: 1" tag at the head of the file. Unlike the original version of LDIF, the newer version of LDIF supports attribute values represented in UTF-8 (instead of the very limited US-ASCII).
- Examples: Version 1 LDIF
Here is an example of an LDIF file useing the optional charset tag.
Parent topic:
Reference
Related reference
ldapmodify and ldapadd
ldapsearch