LDAP Data Interchange Format - Examples of LDIF

Examples of LDIF

This is an example of a simple directory entry with several attributes, represented as a record in LDIF:

dn: cn=The Postmaster,dc=example,dc=com objectClass: organizationalRole 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.

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: organization o: testing

Read more about this topic:  LDAP Data Interchange Format

Famous quotes containing the words examples of and/or examples:

    It is hardly to be believed how spiritual reflections when mixed with a little physics can hold people’s attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.
    —G.C. (Georg Christoph)

    No rules exist, and examples are simply life-savers answering the appeals of rules making vain attempts to exist.
    André Breton (1896–1966)