Last Updated: February 25, 2016
· emi420

Send an email when someone uses sudo

To keep track when any user uses sudo on your Linux system.


You will need an e-mail server, like sendmail:

apt-get install sendmail 

1 - create this file:

sudo nano /etc/sudoers.d/my_sudoers

2 - Add this content:

Defaults    mail_always
Defaults    mailto=""

1 Response
Add your response


This could be very useful but in my opinion it's very funny! :P

But again, very useful, for tracking and event viewing! ;)

Nice ProTip! :)

over 1 year ago ·