10

I have installed slapd on Ubuntu 12.04 and configured it with the following under /etc/ldap/slapd.conf:

modulepath /usr/lib/ldap
moduleload back_sock.la
database sock
socketpath /tmp/slapd.sock

However, if I start slapd with service slapd restart then, slapd is running but there is no socket file in /tmp. What am I missing?

Update: Output of netstat -nlp | grep slapd is:

tcp        0      0 0.0.0.0:389             0.0.0.0:*               LISTEN      860/slapd       
tcp6       0      0 :::389                  :::*                    LISTEN      860/slapd       
unix  2      [ ACC ]     STREAM     LISTENING     8303     860/slapd           /var/run/slapd/ldapi
3
  • Welcome to Ask Ubuntu! Can you share the output of sudo netstat -nlp | grep slapd? Please edit your question for this.
    – gertvdijk
    Feb 9, 2013 at 22:10
  • is app armour running ?
    – gnuyoga
    Jul 18, 2013 at 11:14
  • Do you see any slapd-related messages in /var/log/syslog during start/restart?
    – tlo
    Sep 22, 2013 at 15:07

1 Answer 1

2

The purpose of back_sock is to connect to an another socket that already exists. It's documented in the slapd-sock(5) manpage. It certainly does not create any socket.

If you review your logs, you'll only see errors when an action is attempted, because the sock backend opens the socket each time it needs to do some action, and closes it afterwards. You'll see an entry could not open socket in your logs if the socket cannot be opened for each action.

If you're trying to make slapd listen on a socket instead, you need to modify /etc/default/slapd, and adjust/add the slapi:// URL (remember you'll need to encode slashes as %2f, see slapd(8) for more details).

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .