If I just run slapd
with no arguments (as root) it starts and works fine. When I try to start it using /etc/init.d/slapd start
however, it dies immediately.
I see from looking at the init script that there's a configuration file at /etc/sysconfig/ldap
, but I haven't been able to find a working combination of settings. Does anybody know what I need to do?
I went back to the default init script and tried running with debugging, but I didn't see anything helpful. Main details were:
daemon --pidfile=/var/run/slapd.pid --check=slapd /usr/sbin/slapd -h '" ldap:///"' -u ldap
/bin/bash -c 'ulimit -S -c 0 >/dev/null 2>&1 ; /usr/sbin/slapd -h " ldap:///" -u ldap'`.
After trying to start manually using
/usr/sbin/slapd -u ldap
and discovering it didn't work, I eventually thought to try turning off selinux (setenforce 0
; I have another question about making it work with selinux enabled) which allowed it to run as theldap
user (and therefore allowed the standard init script to work).The man page says that the default URL when
-h
is not given isldap:///
(TCP on all interfaces on default port). So to get the equivalent behavior to running slapd with no arguments you need to setin
/etc/sysconfig/ldap
.