luvshines
October 20th, 2010, 11:15 PM
I am trying to setup LDAP server on Ubuntu 10.04 and am sticking to the old /etc/ldap/slapd.conf file configuration.
I had to comment ldapi:/// from /etc/default/slapd since it was giving 'Address already in use error'. Also had to juggle with pid directory and file issues :)
After that I was able to start the slapd daemon (service slapd start) but now I am running into multiple issues:
1. Can't stop the service with service slapd stop
## Service stop returns 0, maybe because start-stop-daemon is not giving error
#service slapd stop
Stopping OpenLDAP: slapd.
# echo $?
0
## ps says that slapd is running
# ps aux | grep slapd
openldap 16312 0.0 0.2 29140 4152 ? Ssl 03:19 0:00 /usr/sbin/slapd -h ldap:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
## This says no such process
# start-stop-daemon --stop --oknodo --retry TERM/10 --pidfile /var/run/slapd/ldap/slapd.pid --exec /usr/sbin/slapd
No /usr/sbin/slapd found running; none killed.
2. Can't slapcat it. I think it is running the HDB database. I have always worked with BDB database so don't know if that can be issue
## As root user
#slapcat
Available database(s) do not allow slapcat
## As non-root user
#slapcat
ldif_read_file: Permission denied for "/etc/ldap/slapd.d/cn=config.ldif"
slapcat: bad configuration file!
Will switching to BDB database resolve this ??
Also can't I slapcat at non-root user ??
I had to comment ldapi:/// from /etc/default/slapd since it was giving 'Address already in use error'. Also had to juggle with pid directory and file issues :)
After that I was able to start the slapd daemon (service slapd start) but now I am running into multiple issues:
1. Can't stop the service with service slapd stop
## Service stop returns 0, maybe because start-stop-daemon is not giving error
#service slapd stop
Stopping OpenLDAP: slapd.
# echo $?
0
## ps says that slapd is running
# ps aux | grep slapd
openldap 16312 0.0 0.2 29140 4152 ? Ssl 03:19 0:00 /usr/sbin/slapd -h ldap:/// -g openldap -u openldap -f /etc/ldap/slapd.conf
## This says no such process
# start-stop-daemon --stop --oknodo --retry TERM/10 --pidfile /var/run/slapd/ldap/slapd.pid --exec /usr/sbin/slapd
No /usr/sbin/slapd found running; none killed.
2. Can't slapcat it. I think it is running the HDB database. I have always worked with BDB database so don't know if that can be issue
## As root user
#slapcat
Available database(s) do not allow slapcat
## As non-root user
#slapcat
ldif_read_file: Permission denied for "/etc/ldap/slapd.d/cn=config.ldif"
slapcat: bad configuration file!
Will switching to BDB database resolve this ??
Also can't I slapcat at non-root user ??