[sudo-users] sudo script is not sending mail as the invoking user

Todd C. Miller Todd.Miller at courtesan.com
Fri Sep 18 07:10:29 MDT 2015

There was a bug in older versions of sudo 1.8.x where the parent
sudo process (but not the actual command) was run with the effective
uid of the user and not root.  It's possible that this influenced
the user mail used by default.

The change set in question is:

I don't know why mail would be looking at the parent process instead
of just using the login uid.

For what it's worth, if you run /usr/sbin/sendmail directly instead
of via /usr/bin/mail it will honor the LOGNAME environment variable.


$ /usr/sbin/sendmail -t << EOF
To: user
Subject: foo


 - todd

More information about the sudo-users mailing list