sudo 事件记录在哪里?

Ay0*_*Ay0 36 logs sudo

当有人不在 sudoers 组中并尝试使用 sudo 时,会收到如下错误消息:

yzT is not in the sudoers file. This incident will be reported.

我试图找出此信息记录在哪个日志中,以检查谁尝试使用 sudo 运行命令,但找不到它。

第一次谷歌搜索说,/var/log/syslog但我在那里没有看到任何与 sudo 相关的信息。

Hoj*_*eri 53

在基于 redhat 的 linux 系统(如 centos 或 fedora)上,它位于:

  /var/log/secure
Run Code Online (Sandbox Code Playgroud)

对于像 ubuntu 这样的基于 debian 的系统,它位于:

  /var/log/auth.log
Run Code Online (Sandbox Code Playgroud)

  • 简单!阅读源代码。 (3认同)
  • 但如果不通过谷歌搜索,我怎么能自己知道呢? (2认同)