3

In a fresh OpenLDAP Install on Debian 6 (or ubuntu 12.04) I would like to switch from modern cn=config style of configuration to traditional slapd.conf configuration. I have heard that it is possible, but so far I have not found a description, how-to or tutorial.

How can I do this, or where can I look?

1 Answer 1

4

Ok, found out myself. Beware that I did this on a fresh install, so no harm of dataloss. If you do this on a production system, make sure you can roll back :)

So, on debian 6 you can do this:

service slapd stop # stop the service
mv /etc/ldap/slapd.d /root # move the cn=config configuration
cp /usr/share/slapd/slapd.conf /etc/ldap/ # get new sample config
# make changes to sample config so that it can work
sed -i "s/@BACKEND@/hdb/" /etc/ldap/slapd.conf
sed -i "s/@SUFFIX@/dc=acme,dc=org/" /etc/ldap/slapd.conf
sed -i "s/# rootdn/rootdn/" /etc/ldap/slapd.conf
# manually execute "slappasswd" on the command line to generate a root pw
# then add the following line (without "#") after rootdn
# rootpw <crypted password>
sed -i "s/@ADMIN@/cn=admin,dc=acme,dc=org/" /etc/ldap/slapd.conf
mv /var/lib/ldap/* /root # remove old config database
service slapd start # start service again

Further configuration might be nessassary, but this gives you a system that you can configure via traditional slapd.conf

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .