Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't get any information in my log file for openldap on my Centos 6 server. This is how i configured it. SELinux is disabled at the moment.

First created a folder where I'd like to store the log files.

mkdir /var/log/slapd
chmod 755 /var/log/slapd/
chown ldap:ldap /var/log/slapd/

Then did the configuration.

ldapsearch -D "cn=admin,cn=config" -w secret -b cn=config cn=config
dn: cn=config
replace: olcLogFile
olcLogFile: /var/log/slapd/slapd.log
replace: olcLogLevel
olcLogLevel: conns filter config acl stats shell

Just to be safe I restarted the service

service openldap restart

It does create the file, but don't write anything into the file. Of course I did some searches and updates to the LDAP-server, so it gets connections and stuff to log.

$ ls -alh
total 12K
drwxr-xr-x. 2 ldap ldap 4.0K Oct 25 14:27 .
drwxr-xr-x. 6 root root 4.0K Oct 25 14:10 ..    
-rw-r--r--. 1 ldap ldap    0 Oct 25 14:33 slapd.log

My LDAP-setup can be found here (now slightly modified on my own server)

How do I configure LDAP on Centos 6 for user authentication in the most secure and correct way?

share|improve this question
up vote 17 down vote accepted

I haven't tried olcLogFile but by default, OpenLDAP log all information to syslog's local4 facility.

Add the following line to /etc/syslog.conf:

local4.*                        /var/log/ldap.log

Restart the syslog service and check out this log.

share|improve this answer
Thanks. It worked like a charm. It was /etc/rsyslog.conf on my box. Same, same but different. – Arlukin Oct 25 '11 at 23:31
Depend on which syslog daemon is in use. – quanta Feb 23 '13 at 16:22
I created a file called /etc/rsyslog.d/slapd.confand put the contents inside this file. I didn't modify /etc/rsyslog.conf – Halil Sep 17 '15 at 7:46

olcLogFile is only used on Windows because it lacks syslog.

The way to do log on your system is which that @quanta answered.

share|improve this answer

Your Answer


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.