Description of problem: Failed attempts to run 'sudo' result in a mail from root. However, 'man sudoers' mentions that the default should be to send mail as if coming from the user: mailfrom Address to use for the “from” address when sending warning and error mail. The address should be enclosed in double quotes ("") to protect against sudo interpreting the @ sign. Defaults to the name of the user running sudo. My reason for wanting the user's mail as sender is, so the system manager (me) can reply to the mail and explain to the user why it didn't work, and other custom suggestions that cannot be included in the default 'lecture' So, this looks like a discrepancy between the program and its documentation. Fixing the program would be best, but if that is not possible, the documentation may have to be patched to match. Version-Release number of selected component (if applicable): sudo-1.8.15-1.fc23.x86_64 How reproducible: Run 'sudo' as a user that is not authorized in /etc/sudoers Steps to Reproduce: 1. Install sudo 2. As a non-root user (eg joe), run something like 'sudo bash' 3. As root, read the mail with the "SECURITY information" Actual results: The mail to root will also be from root, not from the user joe, so a direct reply is not possible. Expected results: Mail from the user that invoked sudo, as documented. Additional info: Even hardcoding 'mailfrom' in /etc/sudoers doesn't seem to make a difference, although 'sudo -V' run as root will report this setting if it is present.
Created attachment 1179719 [details] Configure option patch Hi, I added --disable-root-mailer configure option to the spec file, it seems that solved the problem. I attach patch for the spec file and srpm so you can test if the current behaviour is OK.
Created attachment 1179721 [details] sudo-1.8.17p1-2.fc25.src.rpm
http://koji.fedoraproject.org/koji/taskinfo?taskID=14893460
I can confim that the updates spec file fixes this issue. Thanks for the work.
sudo-1.8.18-1.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-dc73575f3f
sudo-1.8.18-1.fc23 has been pushed to the Fedora 23 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-f172899668
sudo-1.8.18-1.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report. See https://fedoraproject.org/wiki/QA:Updates_Testing for instructions on how to install test updates. You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2016-9db768d012
sudo-1.8.18-1.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.
sudo-1.8.18-1.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
sudo-1.8.18-1.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.