My logwatch reports, within the CRON section, contain thousands of entries like those below. How can I either reduce the number of log entries OR have logwatch ignore them?

Jan 30 18:49:01 ota3 CRON[14054]: pam_unix(cron:session): session opened for user zzz by (uid=0)

Jan 30 18:49:03 ota3 CRON[13055]: pam_unix(cron:session): session closed for user root

Jan 30 18:49:08 ota3 CRON[14054]: pam_unix(cron:session): session closed for user zzz

Jan 30 18:50:01 ota3 CRON[14108]: pam_unix(cron:session): session opened for user zzzr by (uid=0) 
up vote 4 down vote accepted

Go to the /etc/pam.d directory. Open the file common-session-noninteractive in an editor. Look for the following line:

session required pam_unix.so

Above this line, add the following:

session [success=1 default=ignore] pam_succeed_if.so service in cron quiet use_uid

Save the file and exit. Restart crond using something like service cron restart or /etc/init.d/cron restart.

Source: http://languor.us/cron-pam-unix-cron-session-session-opened-closed-user-root-uid0

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.