CentOS 6 – Enable logging for OpenLDAP

[root@cmlin02 openldap]# vi /etc/rsyslog.conf 

...
# LDAP
local4.* /var/log/ldap.log

 ...
[root@cmlin02 openldap]# /etc/init.d/rsyslog restart
Shutting down system logger:                               [  OK  ]
Starting system logger:                                    [  OK  ]
[root@cmlin02 openldap]# 
[root@cmlin02 openldap]# touch /var/log/ldap.log
[root@cmlin02 openldap]# service slapd restart
[root@cmlin02 log]# tail -100f /var/log/ldap.log 
...

Jul 25 10:43:24 cmlin02 slapd[10271]: conn=1019 op=196 SRCH attr=cn
Jul 25 10:43:24 cmlin02 slapd[10271]: <= bdb_equality_candidates: (member) not indexed
Jul 25 10:43:24 cmlin02 slapd[10271]: <= bdb_equality_candidates: (uniqueMember) not indexed
Jul 25 10:43:24 cmlin02 slapd[10271]: conn=1019 op=196 SEARCH RESULT tag=101 err=0 nentries=1 text=

CentOS named debug logging

I need to debug my DNS and the best way to do so is via logging. Therefore:

[root@cmlin02 ~]# vi /etc/named.conf

...

logging {
  channel "default_syslog" {
    #syslog local6;
    file "/var/log/named/named.log" versions 3 size 5m;
    severity debug;
  };

  category default { default_syslog; };
  category general { default_syslog; };
  category config { default_syslog; };
  category security { default_syslog; };
  category resolver { default_syslog; };
  category xfer-in { default_syslog; };
  category xfer-out { default_syslog; };
  category notify { default_syslog; };
  category client { default_syslog; };
  category network { default_syslog; };
  category update { default_syslog; };
  #category queries { default_syslog; };
  category lame-servers { default_syslog; };
};
...
[root@cmlin02 ~]# service named restart
Stopping named: .                                          [  OK  ]
Starting named:                                            [  OK  ]
[root@cmlin02 ~]# tail -f /var/log/named/named.log 
...

Enable debug logging in OSX

So I wanted to increase my logging while attempting to setup LDAP auth in OSX.

HOWTO: Edit /etc/syslog.conf & add
*.*     /var/log/debug.log

cmosx01:~ cmuser$ vi /etc/syslog.conf
...

*.*                     /var/log/debug.log

Now you can tail -f /var/log/debug.log & see what’s going on.

cmosx01:~ cmuser$ tail -f /var/log/debug.log 
Jun 20 13:33:22 cmosx01 sshd[9043]: USER_PROCESS: 9045 ttys001
Jun 20 13:33:32 cmosx01 su[9051]: in pam_sm_authenticate(): authentication failed
Jun 20 13:33:34 cmosx01 su[9051]: in pam_sm_authenticate(): OpenDirectory - The authtok is incorrect.
Jun 20 13:33:34 cmosx01 su[9051]: BAD SU user to root on /dev/ttys001
Jun 20 13:34:45 cmosx01 launchproxy[9053]: /usr/libexec/sshd-keygen-wrapper: Connection from: 192.168.0.32 on port: 50189
Jun 20 13:34:45 cmosx01 sshd[9055]: Connection closed by 192.168.0.32