LDIF | |
Extension: | .ldif |
Genre: | Data interchange |
Standard: | RFC 2849 |
The LDAP Data Interchange Format (LDIF) is a standard plain text data interchange format for representing Lightweight Directory Access Protocol (LDAP) directory content and update requests. LDIF conveys directory content as a set of records, one record for each object (or entry). It also represents update requests, such as Add, Modify, Delete, and Rename, as a set of records, one record for each update request.
LDIF was designed in the early 1990s by Tim Howes, Mark C. Smith, and Gordon Good while at the University of Michigan. LDIF was updated and extended in the late 1990s for use with Version 3 of LDAP. This later version of LDIF is called version 1 and is formally specified in RFC 2849, an IETF Standard Track RFC. RFC 2849 is authored by Gordon Good and was published in June 2000. It is currently a Proposed Standard.
A number of extensions to LDIF have been proposed over the years. One extension has been formally specified by the IETF and published. RFC 4525, authored by Kurt Zeilenga, extended LDIF to support the LDAP Modify-Increment extension. It is expected that additional extensions will be published by the IETF in the future.
Each content record is represented as a group of attributes, with records separated from one another by blank lines. The individual attributes of a record are represented as single logical lines (represented as one or more multiple physical lines via a line-folding mechanism), comprising "name: value" pairs. Value data that do not fit within a portable subset of ASCII characters are marked with '::' after the attribute name and encoded into ASCII using base64 encoding. The content record format is a subset of the Internet Directory Information type.RFC 2425
The OpenLDAP utilities include tools for exporting data from LDAP servers to LDIF content records, importing data from LDIF content records to LDAP servers, and applying LDIF change records to LDAP servers .
LDIF is one of the formats for importing and exporting address book data that the address books in Netscape Communicator and in the Mozilla Application Suite support.
Microsoft Windows 2000 Server and Windows Server 2003 include an LDIF based command line tool named LDIFDE for importing and exporting information in Active Directory.
JXplorer is a cross platform open source java application that can browse and do basic editing of LDIF files.
This is an example of a simple directory entry with several attributes, represented as a record in LDIF:
dn: CN=Jane Smith,OU=Accounting,DC=example,DC=comchangetype: modifyreplace: employeeIDemployeeID: 5678-replace: employeeNumberemployeeNumber: 76543-replace: extensionAttribute6extensionAttribute6: JSmith14-Note: the "-" character between each attribute change is required. Also note that each directory entry ends with a "-" followed by a blank line. The final "-" is required by Microsoft's LDIFDE tool, but not needed by most ldif implementations.
This is an example of an LDIF file that adds a telephone number to an existing user: