Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




14.4. Configure and Optimize Logcheck

You need to configure the /usr/bin/ script file, Since we are using an alternate path for the files i.e. not /usr/local/etc, we need to change the path entries for logcheck.hacking, logcheck.violations, logcheck.ignore, logcheck.violations.ignore, and logtail in the main script. The script file for Logcheck /usr/bin/ allows you to set these options that modify the path entries and operation of the program. It is well commented and very basic.

  1. Edit the file vi /usr/bin/ and change the following:

    1.          LOGTAIL=/usr/local/bin/logtail
      To read:

    2.          TMPDIR=/usr/local/etc/tmp
      To read:

    3.          HACKING_FILE=/usr/local/etc/logcheck.hacking
      To read:

    4.          VIOLATIONS_FILE=/usr/local/etc/logcheck.violations
      To read:

    5.          VIOLATIONS_IGNORE_FILE=/usr/local/etc/logcheck.violations.ignore
      To read:

    6.          IGNORE_FILE=/usr/local/etc/logcheck.ignore
      To read:

  2. After installing Logcheck, place an entry into root's crontabs to make Logcheck run as a cronjob, you should edit your local crontab file for root and set Logcheck to run once per hour recommended, although you can do it more frequently, or less frequently. To add Logcheck in your cronjob you must edit the crontab and add the following line as root:
             [root@deep] /#crontab -e
             # Hourly check Log files for security violations and unusual activity.
             00 * * * * /usr/bin/

Note: Remember, Logcheck does not report anything via email if it has nothing useful to say.

These are the files Installed by the program Logcheck on your sytem, for your future referance.

/etc/logcheck /usr/bin/
/etc/logcheck/tmp /usr/bin/logtail
/etc/logcheck/logcheck.hacking /var/log/messages.offset
/etc/logcheck/logcheck.violations /var/log/secure.offset
/etc/logcheck/logcheck.violations.ignore /var/log/maillog.offset

  Published under the terms of the Open Publication License Design by Interspire