Last Updated: May 04, 2019
·
1.424K
· 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

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 ·