A.1. About the LDIF File Format

A.1. About the LDIF File Format

LDIF consists of one or more directory entries separated by a blank line. Each LDIF entry consists of an optional entry ID, a required distinguished name, one or more object classes, and multiple attribute definitions.

The LDIF format is defined in RFC 2849, The LDAP Data Interchange Format (LDIF). Directory Server is compliant with this standard.

The basic form of a directory entry represented in LDIF is as follows:

dn: distinguished_name 
objectClass: object_class 
objectClass: object_class 
...
 attribute_type[;subtype]:attribute_value 
...

Table A.1, “LDIF Fields” describes the LDIF fields shown in the previous definition.

Field Definition
[id] Optional. A positive decimal number representing the entry ID. The database creation tools generate this ID automatically. Never add or edit this value yourself.
dn: distinguished_name Specifies the distinguished name for the entry.
objectClass: object_class Specifies an object class to use with this entry. The object class identifies the types of attributes, or schema, allowed and required for the entry. See Chapter 9, Extending the Directory Schema for information on customizing the schema.
attribute_type Specifies a descriptive attribute to use with the entry. The attribute should be defined either in the schema. See Chapter 9, Extending the Directory Schema for information on customizing the schema.
[subtype] Optional. Specifies subtype, language, binary, or pronunciation. Use this tag to identify the language in which the corresponding attribute value is expressed or whether the attribute value is binary or a pronunciation of an attribute value. For information on attribute subtypes, see Section 2.1.3.8, “Adding an Attribute Subtype”. For a complete list of the supported subtypes tags, see Table D.2, “Supported Language Subtypes”.
attribute_value Specifies the attribute value to be used with the attribute type.
Table A.1. LDIF Fields

NOTE

The LDIF syntax for representing a change to an entry in the directory is different from the syntax described in Table A.1, “LDIF Fields”. For information on using LDIF to modify directory entries, see Chapter 2, Creating Directory Entries.


Note: This documentation is provided {and copyrighted} by Red Hat®, Inc. and is released via the Open Publication License. The copyright holder has added the further requirement that Distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyright holder. The CentOS project redistributes these original works (in their unmodified form) as a reference for CentOS-5 because CentOS-5 is built from publicly available, open source SRPMS. The documentation is unmodified to be compliant with upstream distribution policy. Neither CentOS-5 nor the CentOS Project are in any way affiliated with or sponsored by Red Hat®, Inc.