Sunday, October 16, 2005

Redirect crond(pam_unix) syslog messages

If you see too many of these lines:
root@s1 trungson]# tail /var/log/messages
Oct 16 12:36:01 s1 crond(pam_unix)[21821]: session closed for user root
Here is how to redirect it to a more appropriate place
[root@s1 trungson]# more /etc/syslog.conf
...
*.info;mail.none;authpriv.none;cron.none;auth.!=info    /var/log/messages
...
# Log cron stuff, add auth.info to redirect cron logging
cron.*;auth.info              /var/log/cron

1 Comments:

At 9:08 PM, Anonymous Andreas Wacker said...

very nice.
was looking for exactly this.

1 short blog entry can be so much more valuable than 15 pages of forums discussions like "try this, that and the other. I have not tried this myself".

While I am waiting the 5 minutes for cron to wake up I am browsing your blog.

...

nice blog.

and,yes, of course the auth.info messages go now into /var/log/cron

thanks a bunch!

 

Post a Comment

<< Home