Get Notified When Users Run “sudo”

# visudo

Paste the following into your config:

###### Get every alert when user fired an command with sudo ####
Defaults        syslog=auth, insults, syslog_goodpri=alert
Defaults        logfile=/var/log/sudo.log
Defaults        timestamp_timeout=0, log_year, tty_tickets
Defaults        mailto="@YourDomain.com", mail_always, mail_badpass, mail_no_user

Leave a Reply