Thursday, October 17, 2013

Enable OpenLDAP Logs

Summary: This posts demonstrates how to enable logging for OpenLDAP. Click here for more information about the log levels. The example here sets the log level to 256, which log connections, operations, and results.


1. Use a text editor to open your OpenLDAP configuration file "slapd.conf":vi /usr/local/etc/openldap/slapd.conf

2. Add the following line at the end of slapd.conf file:
#Log Level for OpenLDAP
loglevel 256

3. Restart OpenLDAP service:
#Stop the sladp by terminating the process id 
ps -ef | grep slapd
kill [pid]

#Start slapd 
/usr/local/libexec/slapd

4. Add the following lines to "/etc/rsyslog.conf" or "/etc/syslog.conf":
#Enable OpenLDAP  logs 
local4.*       /var/log/openldap.log

5. Restart the rsyslog or syslog service:
service rsyslog restart

No comments:

Post a Comment