如何更换openldap的baseDN
转载自 http://blog.xupeng.me/2009/08/09/change-base-dn-in-openldap/
-
Stop the OpenLDAP server
/etc/init.d/slapd stop -
Use slapcat to dump the database
slapcat -l backup-openldap.ldifThe OpenLDAP database will be dumped to file backup-openldap.ldif
-
Use sed or something else to replace the default DN “dc=nodomain” to the one I want: “dc=xupeng,dc=local”
-
Do the same thing as above to /etc/ldap/slapd.conf
-
Use slapadd to restore the modified database dump:
slapadd -l backup-openldap.ldif -
okay, now start the server, the base DN should has been changed to the new one.