Bug 1140980

Summary: sudo option mail_no_user doesn't work
Product: Red Hat Enterprise Linux 7 Reporter: David Spurek <dspurek>
Component: sudoAssignee: Daniel Kopeček <dkopecek>
Status: CLOSED WORKSFORME QA Contact: BaseOS QE Security Team <qe-baseos-security>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dspurek, ebenes
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1142122 (view as bug list) Environment:
Last Closed: 2015-02-24 13:35:43 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1142122, 1334360    

Description David Spurek 2014-09-12 07:22:47 UTC
Description of problem:
sudo option mail_no_user doesn't work

I have following sudoers entries in ldap:
dn: cn=defaults,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
sudoOption: !requiretty
sudoOption: !authenticate
sudoOption: mailto=emailto
sudoOption: mail_no_user
cn: defaults

dn: cn=rule1,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
cn: rule1
sudoUser: userallowed
sudoHost: ALL
sudoCommand: ALL

# try sudo with user which isn't in sudoers
[test]su - usernotallowed -c 'sudo true'
su: warning: cannot change directory to /home/usernotallowed: No such file or directory
usernotallowed is not allowed to run sudo on rhel7.  This incident will be reported.

/var/log/maillog doesn't contain any mail after it.


Version-Release number of selected component (if applicable):
sudo-1.8.6p7-11.el7

How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Daniel Kopeček 2015-02-24 13:35:43 UTC
Works for me.

$ postqueue -p

shows a queued mail for the configured address.