HOME

TheInfoList



OR:

The LDAP Data Interchange Format (LDIF) is a standard
plain text In computing, plain text is a loose term for data (e.g. file contents) that represent only characters of readable material but not its graphical representation nor other objects ( floating-point numbers, images, etc.). It may also include a lim ...
data interchange format for representing
Lightweight Directory Access Protocol The Lightweight Directory Access Protocol (LDAP ) is an open, vendor-neutral, industry standard application protocol for accessing and maintaining distributed directory information services over an Internet Protocol (IP) network. Directory serv ...
(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 Tim Howes (born September 21, 1963) is a software engineer, entrepreneur and author. He is the co-creator of the Lightweight Directory Access Protocol (LDAP), the Internet standard for accessing directory servers. He co-founded enterprise soft ...
, Mark C. Smith, and Gordon Good while at the
University of Michigan The University of Michigan (U-M, U of M, or Michigan) is a public university, public research university in Ann Arbor, Michigan, United States. Founded in 1817, it is the oldest institution of higher education in the state. The University of Mi ...
. 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 The Internet Engineering Task Force (IETF) is a standards organization for the Internet standard, Internet and is responsible for the technical standards that make up the Internet protocol suite (TCP/IP). It has no formal membership roster ...
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.


Content record format

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 ASCII ( ), an acronym for American Standard Code for Information Interchange, is a character encoding standard for representing a particular set of 95 (English language focused) printable character, printable and 33 control character, control c ...
characters are marked with '::' after the attribute name and encoded into ASCII using
base64 In computer programming, Base64 is a group of binary-to-text encoding schemes that transforms binary data into a sequence of printable characters, limited to a set of 64 unique characters. More specifically, the source binary data is taken 6 bits ...
encoding. Comments can be added beginning the line by a pound-sign ("#", ASCII 35).


Tools that employ LDIF

The
OpenLDAP OpenLDAP is a free, open-source implementation of the Lightweight Directory Access Protocol (LDAP) developed by the OpenLDAP Project. It is released under its own BSD-style license called the OpenLDAP Public License. LDAP is a platform-independ ...
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 Netscape Communicator (or ''Netscape 4'') is a discontinued Internet suite produced by Netscape Communications Corporation, and was the fourth major release in the Netscape line of browsers. It was first in beta in 1996 and was released in Jun ...
and in the
Mozilla Application Suite The Mozilla Application Suite (originally known as Mozilla, marketed as the Mozilla Suite) is a discontinued cross-platform integrated Internet suite. Its development was initiated by Netscape Communications Corporation, before their acquisition ...
support. Microsoft
Windows 2000 Server Windows 2000 is a major release of the Windows NT operating system developed by Microsoft, targeting the server and business markets. It is the direct successor to Windows NT 4.0, and was Software release life cycle#Release to manufacturing (RT ...
and
Windows Server 2003 Windows Server 2003, codenamed "Whistler Server", is the sixth major version of the Windows NT operating system produced by Microsoft and the first server version to be released under the Windows Server brand name. It is part of the Windows NT ...
include an LDIF based command line tool named LDIFDE for importing and exporting information in
Active Directory Active Directory (AD) is a directory service developed by Microsoft for Windows domain networks. Windows Server operating systems include it as a set of processes and services. Originally, only centralized domain management used Active Direct ...
.
JXplorer JXplorer is a free, open-source software, open-source client for browsing Lightweight Directory Access Protocol (LDAP) servers and LDAP Data Interchange Format (LDIF) files. It is released under an Apache-equivalent license. JXplorer is written ...
is a cross platform open source java application that can browse and do basic editing of LDIF files.


LDIF fields

; dn: distinguished name :This refers to the name that uniquely identifies an entry in the directory. ; dc: domain component :This refers to each component of the domain. For example www.mydomain.com would be written as DC=www,DC=mydomain,DC=com ; ou: organisational unit :This refers to the organisational unit (or sometimes the user group) that the user is part of. If the user is part of more than one group, you may specify as such, e.g., OU= Lawyer,OU= Judge. ; cn: common name :This refers to the individual object (person's name; meeting room; recipe name; job title; etc.) for whom/which you are querying.


Examples of LDIF

This is an example of a simple directory entry with several attributes, represented as a record in LDIF: # Add a directory "The Postmaster" dn: cn=The Postmaster,dc=example,dc=com objectClass: organisationalRole cn: The Postmaster This is an example of an LDIF record that modifies multiple single-valued attributes for two different directory entries (this format is used by Microsoft's LDIFDE tool): dn: CN=John Smith,OU=Legal,DC=example,DC=com changetype: modify replace: employeeID employeeID: 1234 - replace: employeeNumber employeeNumber: 98722 - replace: extensionAttribute6 extensionAttribute6: JSmith98 - dn: CN=Jane Smith,OU=Accounting,DC=example,DC=com changetype: modify replace: employeeID employeeID: 5678 - replace: employeeNumber employeeNumber: 76543 - replace: extensionAttribute6 extensionAttribute6: 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: dn: cn=Peter Michaels, ou=Artists, l=San Francisco, c=US changetype: modify add: telephonenumber telephonenumber: +1 415 555 0002 An example of LDIF containing a control: version: 1 dn: o=testing,dc=example,dc=com control: 1.3.6.1.1.13.1 false cn changetype: add objectClass: top objectClass: organisation o: testing


RFCs

* — The LDAP Data Interchange Format (LDIF) - Technical Specification * — Lightweight Directory Access Protocol (LDAP): Technical Specification Road Map * — LDAP Modify-Increment Extension


References

{{Reflist


External links


MSDN : Windows 2003 : Using the LDIFDE Tool

MSDN : Active Directory : LDIF Scripts
Internet Standards