Ldap-troubleshoting

Aus xinux.net
Zur Navigation springen Zur Suche springen

stop slapd: service slapd stop

dump the config database to a text file

slapcat -F /etc/ldap/slapd.d -b cn=config -l config.ldif

move the existing config database out of the way

mv /etc/ldap/slapd.d{,.old}

make a new, empty config database

mkdir /etc/ldap/slapd.d 
chown --reference=/etc/ldap/slapd.d.old /etc/ldap/slapd.d 
chmod --reference=/etc/ldap/slapd.d.old /etc/ldap/slapd.d

edit the dumped config.ldif

to remove your olcSecurity setting (or add olcRootDN and olcRootPW to cn=config, or any other changes you like)

load the edited LDIF into the new empty database

slapadd -F /etc/ldap/slapd.d -b cn=config -l config.ldif