Missing Messages and Secure logs files on CentOS
21,558
check if have any rule for store in /var/log/messages or /var/log/secure in /etc/rsyslog.conf like
# Don't log private authentication messages!
*.info;mail.none;authpriv.none;cron.none /var/log/messages
# The authpriv file has restricted access.
authpriv.* /var/log/secure
if does not have , add this line and restart your rsyslog service.
/etc/init.d/rsyslog restart
or
service rsyslog restart
Related videos on Youtube
Author by
Tom Hert
Updated on September 18, 2022Comments
-
Tom Hert over 1 year
I'm having troubles with CentOS release 6.4 (Final). I'm looking for log files in
/var/log/
and I'm obviously missing two files:/var/logs/messages
/var/log/secure
I was checking if rsyslog is running (
service rsyslog status
) and it's OK. My rsyslog config file is called/etc/rsyslog.conf
, folder/etc/rsysconf.d/
is empty.Can anyone shed some light on what's going on?
-
c4f4t0r about 10 yearslsof | grep messages?
-
Tom Hert about 10 yearsthe result of
lsof | grep messages
is blank. No response. And I'm getting the same result forlsof | grep secure
-
Tom Hert about 10 yearsI have there following lines:
# Log anything (except mail) of level info or higher. # Don't log private authentication messages! *.info;mail.none;authpriv.none;cron.none /var/log/messages# The authpriv file has restricted access. authpriv.* /var/log/secure