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).
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 viasudo 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
.