sudo+rsyslog配置

1.yum install -y sudo rsyslog

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

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

4.tail -1 /etc/sudoers

5.visudo -c

6./etc/init.d/rsyslog restart

7.ll /var/log/sudo.log    出现sudo.log

8.su - jiangfang

9.sudo useradd c

10.cat /var/log/sudo.log   有记录在其中

 

posted on 2018-08-15 08:49  Covers  阅读(98)  评论(0编辑  收藏  举报