What is the difference between LDAP schema and LDIF?

Gottlieb Notschnabel

Setting up an LDAP server I have to import a couple of schemas, for example eduPerson. There is an LDIF file issued by the developers, that says:

# This LDIF file can be used to add to add the eduPerson schema to 
# an OpenLDAP server > 2.4 that uses the new configuration format. 
# Put this file to /etc/ldap/schema/ and then execute the following 
# comand to add this schema:
# ldapadd -Y EXTERNAL -H ldapi:/// -f /etc/ldap/schema/eduperson.ldif

On the other hand, I've heard an LDAP administrator that he imports a schema by including it into the LDAP config (e.g. /etc/openldap/slapd.conf) and restarting the LDAP demon.

So from what I've researched, it seems to me that including the schema is the proper way and LDIF is rather used for importing data – not the schema itself. Is that correct? What are the differences between both and when should I use each of them?

Ludovic Poitou

LDIF is a standard text format to represent LDAP operation or data. Most directory servers uses LDIF for persisting some of their configuration, especially Schema, but LDIF can be used for other purpose such as Adding, Importing, Exporting, Modifying data.

Most of the schema definitions from different standards and products are distributed in LDIF files. How to load these files to the server is not defined in the LDAP specification and thus server defined.

You question seems to be specific to OpenLDAP, and the answer may vary depending on the version of OpenLDAP.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at


Login to comment