nadr-w
Last Updated: February 25, 2016
·
1.26K
· emi420

Send an email when someone uses sudo

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

Requirements:

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="youremail@domain.com"

1 Response
Add your response

5863

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 ·