I am following these instructions to install OpenLDAP on Debian 6.0.
The instructions tell me to run slapindex
as root, but it sounds like Debian does not like the idea:
WARNING!
Runnig as root!
There's a fair chance slapd will fail to start.
Check file permissions!
Google leads me to a discussion that suggests running slapindex
as openldap
. I find it strange as slapindex
is not in the $PATH of openldap
.
Which user should I run slapindex
as?
If not root
, why is slapindex
in /usr/sbin
?
You sure can use both
root
andopenldap
as user runningslapindex
, but if you do it as root, please don't forget to change the OpenLDAP data directory permissions back toopenldap:openldap
if you do so. For example,Why
slapindex
is under/usr/sbin
, I don't know. Perhaps because it is a very powerful and potentially dangerous tool which should be used those capable of being root, anyway.According to the FHS (Filesystem Hierarchy Standard) /usr/sbin are used for Non-essential system binaries, e.g., daemons for various network-services.
On CentOS, after executing slapindex as root you should change owner of the index in /var/lib/ldap to the ldap user, which is by default ldap. You could try to use su instead