Simple log audit for Linux

Source: Internet
Author: User
Tags syslog system log rsyslog

Production Environment Log Audit solution

The so-called log audit, is to record all systems and related user behavior, and can automatically analyze, process, display (including text or video)

1): Full log audit via environment variables and Rsyslog service (information too large, not recommended)

2) sudo configuration Rsyslog Service, log audit (less information, good results)

3) Embed a monitor in the Bash interpreter to allow all audited system users to use the modified Special bash program to increase the monitor as an interpreter.

4) Saiji's fortress machine: Commercial Products

In this document, we learn the second method: sudo log audit, the so-called Suod log audit, do not record the operation of ordinary users, only remember to perform sudo command operation

1 Installing sudo and syslog services

Use commands like Yum to install sudo and syslog services online (syslog for Rsyslog service in centos6.4)

2 Configuring/etc/sudoers

Configure the following line in the/etc/sudoers

Defaults Logfile=/var/log/sudo.log

3 Configuring the System log/etc/(R) syslog.conf

Add the following line of configuration files in/etc/syslog.conf

Local2.debug/var/log/sudo.log

4 Restart Syslog Service

/etc/init.d/rsyslog restart

Users who use the sudo command can then be found in/var/log/sudo.log.

It is a very practical method to be tested.

Simple log audit for Linux

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.