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

I'm installing ldap server on debian machine. Here is the link to the guide I am following:

I installed all the needed packages and edited all the neccessary config files.

sudo invoke-rc.d slapd stop
sudo slapindex
sudo chown openldap:openldap /var/lib/ldap/*
sudo invoke-rc.d slapd start

But when I try to restart server with newly added options I got this warning:

Runnig as root!
There's a fair chance slapd will fail to start.
Check file permissions!

I searched for it and found a bug report here:

So I tried to run the command to execute ldapindex as openldap user and it seemed to work nicely, but ldap did not saved my new configs.

Any suggestions?

share|improve this question
Is the /var/lib/ldap directory itself owned by openldap:openldap? In your example you only changed the contents of the directory, not the directory itself ... :-) – Janne Pikkarainen Oct 29 '10 at 12:04
And why are you trying to run slapd as root? Does the init script really tell it to do so or have you altered some config files? – Janne Pikkarainen Oct 29 '10 at 12:05
@Janne Pikkarainen: slapd runs as root by default. – Rizo Oct 29 '10 at 13:24
@Janne Pikkarainen: I think the problem is the the ldap config file, not the lib directory... But I'm not sure. I tested different combinations but nothing works. I also downloaded the src and tryed to compile it, but got the same error. – Rizo Oct 29 '10 at 13:25
@Rizo: Does it? At least on my Debian Lenny it runs as openldap user. Although it might be that I have configured the slapd.conf looooong time ago ... :-) – Janne Pikkarainen Nov 1 '10 at 7:45

As far as I remember from our LDAP install (long time ago), you should edit the /etc/default/slapd and add the following:


and then restart your server.

Hope it helps!

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.