如何更换openldap的baseDN

转载自 http://blog.xupeng.me/2009/08/09/change-base-dn-in-openldap/

 

  1. Stop the OpenLDAP server
    /etc/init.d/slapd stop
  2. Use slapcat to dump the database
    slapcat -l backup-openldap.ldif

    The OpenLDAP database will be dumped to file backup-openldap.ldif

  3. Use sed or something else to replace the default DN “dc=nodomain” to the one I want: “dc=xupeng,dc=local”
  4. Do the same thing as above to /etc/ldap/slapd.conf
  5. Use slapadd to restore the modified database dump:
    slapadd -l backup-openldap.ldif
  6. okay, now start the server, the base DN should has been changed to the new one.

你可能感兴趣的:(Blog)