cron logging under RHEL 4

David Tonhofer, m-plify S.A. d.tonhofer at m-plify.com
Tue May 23 20:51:49 UTC 2006


--On Wednesday, May 24, 2006 7:50 AM +1200 Steve Phillips <steve at focb.co.nz> wrote:

> Does anyone know how to turn off the logging messages from cron under redhat RHEL 4 ? I am refering to the messages in /var/log/messages that indicate a user has logged in/out every time a user crontab is called.. these tend to fill up the log files when a user has a number of cron entries that are called every minute.
>
> example..
>
> May 23 14:49:01 wibble crond(pam_unix)[13740]: session opened for user bot by (uid=0)
> May 23 14:49:01 wibble crond(pam_unix)[13740]: session closed for user bot

Hi Steve,

First off, why should that be a problem? If you have enough disk space,
and logrotate configured, I wouldn't worry.

But otherwise, check out the man page of "syslog.conf" where you find the
instructions to edit /etc/syslog.conf.

However... these are not messages by cron but by the 'pam' subsystem.
They are logged to syslog with facility 'auth', so you might want
to make all messages logged with facility 'auth' and low urgency go
to nowhere. Like this I think:

auth.debug;auth.info;auth.notice   /dev/null

But this may not be what you want as you may want to see other messages.
So the following can also be done: edit /etc/pam.d/crond and make
pam NOT log.... but I'm unsure how to do this. Anyone?


Best,

-- David







More information about the redhat-list mailing list