Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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

http://www.debian-administration.org/article/OpenLDAP_installation_on_Debian

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:

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: bugs.debian.org/cgi-bin/bugreport.cgi?bug=432662

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
show 1 more comment

1 Answer 1

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

SLAPD_USER="openldap"
SLAPD_GROUP="openldap"

and then restart your server.

Hope it helps!

share|improve this answer
add comment

Your Answer

 
discard

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.