Red Hat Bugzilla – Bug 1138581
sudo with sssd doesn't work correctly with sudoOrder option
Last modified: 2015-07-29 08:18:44 EDT
The same problem in rhel6, tested with sudo-1.8.6p3-15.el6 and sssd-1.11.6-28.el6 +++ This bug was initially created as a clone of Bug #1138576 +++ Description of problem: sudo with sssd doesn't work correctly with sudoOrder option. rule with the highest value in sudoOrder parameter should be used. dn: cn=rule_allow,ou=Sudoers,dc=my-domain,dc=com objectClass: top objectClass: sudoRole cn: rule_allow sudoHost: ALL sudoUser: userallowed sudoCommand: /usr/bin/true sudoOrder: 2 dn: cn=rule_deny,ou=Sudoers,dc=my-domain,dc=com objectClass: top objectClass: sudoRole cn: rule_deny sudoHost: ALL sudoUser: userallowed sudoCommand: !/usr/bin/true sudoCommand: ALL sudoOrder: 1 [test]su - userallowed -c 'sudo true'su: warning: cannot change directory to /home/userallowed: No such file or directory Sorry, user userallowed is not allowed to execute '/bin/true' as root on rhel7.example.com. Version-Release number of selected component (if applicable): sudo-1.8.6p7-11.el7 sssd-1.11.2-65.el7 How reproducible: always Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Ok, this one looks like a real bug from the logs. Easily fixable.
Created attachment 997008 [details] proposed patch
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHSA-2015-1409.html