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
Share:
21,558

Related videos on Youtube

Tom Hert
Author by

Tom Hert

Updated on September 18, 2022

Comments

  • Tom Hert
    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
      c4f4t0r about 10 years
      lsof | grep messages?
    • Tom Hert
      Tom Hert about 10 years
      the result of lsof | grep messages is blank. No response. And I'm getting the same result for lsof | grep secure
  • Tom Hert
    Tom Hert about 10 years
    I 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