Single Machine sudo log audit

Source: Internet
Author: User
Tags syslog rsyslog

#####################################################

This article is from "Old boy Linux operation and maintenance training" students-xudong he

If reproduced, please be sure to keep this article link and this content copyright information.

Welcome to the vast number of operations and colleagues to Exchange Linux/unix website operation and Maintenance technology!

qq:345078833

E-mail:[email protected]

#####################################################

Old boy Linux OPS training Center

Training consultation: qq:80042789 70271111

Training Tel: 18600338340 18911718229

Old boy teacher qq:49000448 31333741

Website address: http://www.etiantian.org

Old boy Blog: http://oldboy.blog.51cto.com

old boy Exchange Group 246054962 208160987 226199307 44246017

Website operation and Maintenance Exchange Group: 114580181 45039636 37081784
#####################################################

R Pm–qa | egrep "Sudo|rsyslog"

Yum–y Install sudo syslog

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

Tail-l/etc/sudoers

Visudo-c #检查sudoers文件语法

echo "Local2.debug/var/log/sudo.log" >>/etc/rsyslog.conf

Restart Syslog Kernel Logger

/etc/init.d/rsyslog restart

You can use the normal user sudo test to see if sudo has log printing.

Ll/var/log/sudo.log

600 permissions

Sudo-l to view your permissions.

Test:

Create a normal user and grant sudo permission to the user. Whether the test was successful. If unsuccessful: Check that the sudo-c syntax is correct.

This article from the "Clear Sky" blog, declined reprint!

Single Machine sudo log audit

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.