Bug 856901 - Defauts:!<user> syntax in sudoers doesn't seem to work as expected
Defauts:!<user> syntax in sudoers doesn't seem to work as expected
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sudo (Show other bugs)
Unspecified Unspecified
low Severity low
: rc
: ---
Assigned To: Daniel Kopeček
David Spurek
: ManPageChange
Depends On:
Blocks: 947775
  Show dependency treegraph
Reported: 2012-09-13 01:47 EDT by Karel Srot
Modified: 2015-03-02 00:27 EST (History)
5 users (show)

See Also:
Fixed In Version: sudo-1.8.6p3-8.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Story Points: ---
Clone Of:
: 856902 (view as bug list)
Last Closed: 2013-11-21 18:11:48 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
proposed patch (3.49 KB, patch)
2013-08-09 05:05 EDT, Daniel Kopeček
no flags Details | Diff

  None (edit)
Description Karel Srot 2012-09-13 01:47:20 EDT
Description of problem:

!<user> shout match to all users different from <user> but it doesn't seem to work and this patters seem to be ignored

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. add test user
2. update sudoers with:
Defaults !requiretty        # actually not necessary, this is the default
Defaults:!root requiretty    # require tty for all non-root users
3. login as test user and add this into user's crontab (crontab -e)
* * * * *  /usr/bin/sudo id &> /tmp/id

Actual results:
every minute /tmp/id is updated with the output od the "id" command. This is not correct because cron jobs don't have tty and therefore we should see just the message similar to "sorry, you need tty"

Same situation on RHEL5 with sudo-1.7.2p1-21.el5
Comment 3 Karel Srot 2012-09-27 02:26:13 EDT
Thank you. Maybe we can keep this bug open as a request for adding such an explanation into RH shipped sudo.
Comment 6 RHEL Product and Program Management 2012-12-14 01:54:27 EST
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.
Comment 13 Daniel Kopeček 2013-08-09 05:05:09 EDT
Created attachment 784769 [details]
proposed patch
Comment 16 errata-xmlrpc 2013-11-21 18:11:48 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.


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