user not in sudoers fails to generate email

Asked by mj

On an Ubuntu Mate 14.04 system sudo fails to report when a user who is not in the sudoers fail attempts to run sudo.

The attempt is logged to auth.log however no email is generated.

Steps to reproduce:
1. Log in as a user without sudo privileges
2. Attempt to sudo

What does happen
No email is sent to root and the attempt is logged to auth.log

What should happen
An email is sent to root

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu sudo Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
actionparsnip (andrew-woodhead666) said :
#1
Revision history for this message
mj (maut) said :
#2

The man page states that mail_no_user is on by default. This setup works on a Linux Mint 13 box but now on Ubuntu 14.04.

I know the email settings are correct as mail_badpass works as expected i.e. root gets an email when a user tries to sudo and types their password wrong three times.

My issue is specifically regarding an email not being sent when a user who is not in the sudoers file attempts to run sudo.

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#3

Have you checked the sudoers file to see what is different?

Revision history for this message
mj (maut) said :
#4

The only difference between Linux Mint 13 and Ubuntu 14.04 for /etc/sudoers is an extra defaults entry

Defaults mail_badpass

Revision history for this message
actionparsnip (andrew-woodhead666) said :
#5

All I can suggest is report a bug. The mails should go to root

Can you help with this problem?

Provide an answer of your own, or ask mj for more information if necessary.

To post a message you must log in.