Disable CRON session logging on Debian 6

Voici comment déactiver les logs d’ouvertures de sessions par CRON afin d’eviter la pollution/flood dans les fichiers /var/log/auth.log et /var/log/syslog

debian6 CRON[27984]: pam_unix(cron:session): session opened for user root by (uid=0)
debian6 CRON[27982]: pam_unix(cron:session): session opened for user root by (uid=0)
debian6 CRON[27986]: pam_unix(cron:session): session closed for user root
debian6 CRON[27987]: pam_unix(cron:session): session closed for user root

Edit /etc/rsyslog.conf file

nano /etc/rsyslog.conf

Modifier:

auth,authpriv.*         /var/log/auth.log
*.*;auth,authpriv.none,cron.none                -/var/log/syslog
cron.*                          /var/log/cron.log

Edit /etc/pam.d/cron file

nano /etc/pam.d/cron

Commenter la ligne:

# @include common-session-noninteractive
/etc/init.d/rsyslog restart
/etc/init.d/cron restart

Continer à suivre les cronjobs

tail -f /var/log/cron.log

3 Replies to “Disable CRON session logging on Debian 6”

Comments are closed.