Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
up vote 4 down vote accepted

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

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.