Bugzilla – Bug 715
LDAP sudoers: Allow negations on hosts, commands and runas to work
Last modified: 2017-05-10 10:38:46 MDT
Overview: According to the docs for Sudoers LDAP: Negations on the Host, User or Runas are currently ignored Without this functionality, we are unable to get away from flat files for sudoers and LDAP sudoers is essentially useless for us. Steps to Reproduce: In LDAP: matches all hosts including web01 sudoHost: ALL sudoHost: !web01 Expected Results if this limitation was fixed: In LDAP: matches all hosts except web01 sudoHost: ALL sudoHost: !web01
There's no technical reason this cannot be supported but do be aware that because there is no guaranteed ordering within the LDAP results a negative match must always override a positive one, regardless of the order of the rule in the original LDIF.
Support for negated sudoHost entries was added in sudo 1.8.18