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
It will typically get logged
/var/log/secure
, and mail will be sent toroot
on the local system. You can control this behavior in your/etc/sudoers
file. There are a suite ofmail_*
configuration options that determine whensudo
sends out mail, and there are additional options that control how it logs to syslog.Source: http://xkcd.com/838/
(for the real answer, look at larsks's answer instead).