LDAP browsers


Migrate OpenLDAP to another server and/or version

  1. Copy database contents to a file:
    /etc/init.d/slapd stop (not required in all circumstances, but it's safe to do that if unsure)
    slapcat > database.ldif
  2. If migrating from a server with an old OpenLDAP version (configuration is in slapd.conf) to a newer version (configuration in a directory, like /etc/openldap/slapd.d), do the following to create the structure:
    slaptest -f /etc/openldap/slapd.conf -F /etc/openldap/slapd.d
  3. Recreate the database in the new server:
    slapadd -l database.ldif

List all objects

ldapsearch -h <host> -b <searchbase> -s sub "objectclass=*" -D <username> -W

where:

  • <host> is the hostname or IP address of the LDAP server
  • <searchbase> is the starting point of the search, usually an Organization Unit, like "ou=People,dc=example,dc=com"
  • <username> is the distinguished name of the account used to authenticate to LDAP, like "cn=admin,dc=example,dc=com"