sudo logging record (Rsyslog)

Source: Internet
Author: User
Tags rsyslog

1, check the software

Rpm-qa|egrep "Sudo|rsyslog"

2, edit sudoers

echo "Defaults Logfile=/var/log/sudo.log" >>/etc/sudoers

Tail-1/etc/sudoers
Visudo-c

3, edit Rsyslog and restart service
[Email protected] ~]# tail-1/etc/rsyslog.conf
Local2.debug/var/log/sudo.log

Etc/init.d/rsyslog restart

4, inspection

[Email protected] ~]# tail-f/var/log/sudo.log
Jul 01:08:50:LANNY:TTY=PTS/1; Pwd=/home/lanny; User=root;
COMMAND=/BIN/SU-

[[email protected] ~]$ sudo echo "Kaifa01 all= (All) Nopasswd:all" >>/etc/sudoers
-bash:/etc/sudoers:permission denied

5, principle

sudoers------>local2.debug (device)----->rsyslog write to File

6, centralized log processing scheme

6.1inotify+rsync

6.2rsyslog comes with

sudo logging record (Rsyslog)

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.