Export LDAP schema without data

7,262

Configuration for reasonably modern versions of OpenLDAP are accessible at the cn=config suffix, provided you're authenticating with a dn that has read privileges to it. If local root is also the rootdn you should be able to dump the ldif via sudo ldapsearch -H ldapi:/// -Y EXTERNAL -b cn=config

If that method does not work, within the filesystem these files will likely be under /etc/openldap/slapd.d/. If your system is older the configuration will be in a single file, likely /etc/openldap/slapd.conf.

Share:
7,262

Related videos on Youtube

StephenKing
Author by

StephenKing

Running mobile core networks at EMnify. AWS user and Subject Matter Expert for Advanced Networking - Specialty Certification PhD in computer science (communication networks) from the University of Wuerzburg, Germany.

Updated on September 18, 2022

Comments

  • StephenKing
    StephenKing over 1 year

    For testing purposes, I need a copy of our LDAP server without any personal data.

    What is the best way, to export this from an existing OpenLDAP server?

    I tried ldapsearch and Apache Directory Studio, but I did not find a way to skip actual data (if there is such a thing in LDAP).