LDAP Data Interchange Format

The LDAP Data Interchange Format (LDIF) is used to represent LDAP entries in text form. The ldif2ldbm(1M) tools can be used to convert from LDIF format to the LDBM format used by slapd(8). The ldbmcat(1M) tool can be used to do the reverse conversion.

The basic form of an LDIF entry is:

 
[id]
 
dn: distinguished name
 
attrtype: attrvalue
 
attrtype: attrvalue
 
...
 

where id is the optional entry ID (a positive decimal number). By default, the database creation tools supply the ID for you. The ldbmcat(1M) program, however, produces an LDIF format that includes id so that new indexes created are consistent with the existing database. A line may be continued by starting the next line with a single space or tab character, for example,

 
dn: cn=Ann Jones, o=XYZ Corpo
 
ration, c=US
 

Multiple attribute values are specified on separate lines, for example,

 
cn: Ann Jones
 
cn: Annie Jones
 

If an attrvalue contains a non-printing character, or begins with a space or a colon (:), the attrtyp 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 blank lines.




Copyright © 1999 Sun Microsystems, Inc. All Rights Reserved.