10

So I'm testing out a small CentOS build (rackspace cloud). I set up my user and went to do some sudo'ing. Well, I forgot the step to add my user to the sudoers file with visudo. So of course, I get this error:

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

Never saw it before, so now I'm wondering. Where does this get reported? Does it just get sent to mail, or is it logged somewhere?

Thanks for any help

Derek Downey
  • 3,955
  • 4
  • 27
  • 29

2 Answers2

18

It will typically get logged /var/log/secure, and mail will be sent to root on the local system. You can control this behavior in your /etc/sudoers file. There are a suite of mail_* configuration options that determine when sudo sends out mail, and there are additional options that control how it logs to syslog.

larsks
  • 43,623
  • 14
  • 121
  • 180
16

XKCD Source: http://xkcd.com/838/

(for the real answer, look at larsks's answer instead).

wildpeaks
  • 465
  • 2
  • 11