13.8. Upgrading to OpenLDAP Version 2.0

In OpenLDAP Version 2.0, the on-disk storage format used by the slapd LDAP server has changed. If you are upgrading LDAP from Red Hat Linux 7.0 or earlier, you will need to extract the existing LDAP directories to an LDIF file using the following command:

ldbmcat -n > <ldif_file>

In the above command, change <ldif_file> to the name of the output file. Next type the following command to import this file into OpenLDAP 2.0:

slapadd -l <ldif_file>

ImportantImportant
 

You must be the root user to use /usr/sbin/slapadd. However, the directory server runs as the ldap user. Therefore the directory server will not be able to modify any files created by slapadd. To correct this issue, after you have finished using slapadd, type the following command:

chown -R ldap /var/lib/ldap