We want to get a notification for all unauthorized sudo access via e-mail to our team DL .. whats the way to do it ?
Add these lines to your man sudoers (Linux) file
Defaults mailto="list@your.company"
Defaults mail_badpass # Send mail on bad password
Defaults mail_no_perms # Send mail if the user may not run this command
Defaults mail_no_user # Send mail if the user isn't allowed to use sudo
The options have to appear one per line.
1 Like