Chapter 13. Lightweight Directory Access Protocol (LDAP) 209The job of migrating a user database into a format that is LDAP readable falls to a group of migrationscripts installed in the same directory. Using Table 13-1, decide which script to run to migrate the userdatabase.Run the appropriate script based on the existing name service.The README and the migration-tools.txt files in the /usr/share/openldap/migration/directory provide more details on how to migrate the information.Existing name service Is LDAPrunning?Script to Use/etc flat files yes migrate_all_online.sh/etc flat files no migrate_all_offline.shNetInfo yes migrate_all_netinfo_online.shNetInfo no migrate_all_netinfo_offline.shNIS (YP) yes migrate_all_nis_online.shNIS (YP) no migrate_all_nis_offline.shTable 13-1. LDAP Migration Scripts13.8. Migrating Directories from Earlier ReleasesBeginning with the release of Red Hat Linux 9, OpenLDAP uses Sleepy Cat Software’s BerkeleyDB system as its on-disk storage format for directories. Earlier versions of OpenLDAP used GNUDatabase Manager (gdbm). For this reason, before upgrading an LDAP implementation to Red HatEnterprise Linux 3 from Red Hat Enterprise Linux 2.1 or Red Hat Linux 7.x through 8, perform thefollowing steps:1. Before upgrading the operating system, run the command /usr/sbin/slapcat -lldif-output. This outputs an LDIF file called ldif-output containing the entries from theLDAP directory.2. Upgrade the operating system, being careful not to reformat the partition containing the LDIFfile.3. Re-import the LDAP directory to the upgraded Berkeley DB format by executing the command/usr/sbin/slapadd -l ldif-output.ImportantIf an LDAP directory is not exported before upgrading to Red Hat Enterprise Linux 3 from Red HatEnterprise Linux 2.1 or Red Hat Linux 7.x through 8, use the command /usr/sbin/slapcat-gdbm-l ldif-output to extract the older directory (replacing ldif-output with the file name for theLDIF output). This command creates an LDIF file suitable for importing with the slapadd command.