Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1144446 - sudo with ldap doesn't work correctly with 'listpw=all' and 'verifypw=all' in sudoOption entry
sudo with ldap doesn't work correctly with 'listpw=all' and 'verifypw=all' in...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sudo (Show other bugs)
7.0
Unspecified Unspecified
medium Severity medium
: rc
: ---
Assigned To: Daniel Kopeček
Dalibor Pospíšil
:
Depends On:
Blocks: 1144448
  Show dependency treegraph
 
Reported: 2014-09-19 08:10 EDT by David Spurek
Modified: 2015-11-19 07:58 EST (History)
2 users (show)

See Also:
Fixed In Version: sudo-1.8.6p7-14.el7
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1144448 (view as bug list)
Environment:
Last Closed: 2015-11-19 07:58:37 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
proposed patch (1.77 KB, patch)
2015-07-06 06:26 EDT, Daniel Kopeček
no flags Details | Diff


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2424 normal SHIPPED_LIVE sudo bug fix and enhancement update 2015-11-19 06:21:57 EST

  None (edit)
Description David Spurek 2014-09-19 08:10:02 EDT
Description of problem:
sudo with ldap doesn't work correctly with 'listpw=all' in sudoOption entry

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

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

dn: cn=rule2,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
cn: rule2
sudoHost: ALL
sudoUser: userallowed2
sudoCommand: /usr/bin/true
sudoOption: !authenticate

dn: cn=rule3,ou=Sudoers,dc=my-domain,dc=com
objectClass: top
objectClass: sudoRole
cn: rule3
sudoHost: ALL
sudoUser: userallowed2
sudoCommand: /usr/bin/date
sudoOption: !authenticate

[test]su - userallowed2 -c 'sudo -l'
su: warning: cannot change directory to /home/userallowed2: No such file or directory
sudo: no tty present and no askpass program specified
[test]echo $?
1

Sudo -l shouldn't require password and it should list allowed commands


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 David Spurek 2014-09-19 08:20:44 EDT
I have the same problem with 'verifypw=all'

ldap entries are the same, just change listpw to verifypw.

Then run su - userallowed2 -c 'sudo -v' (instead of sudo -l)
Comment 3 Daniel Kopeček 2015-07-06 06:26:18 EDT
Created attachment 1048764 [details]
proposed patch
Comment 6 errata-xmlrpc 2015-11-19 07:58:37 EST
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/RHBA-2015-2424.html

Note You need to log in before you can comment on or make changes to this bug.