RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 856901 - Defauts:!<user> syntax in sudoers doesn't seem to work as expected
Summary: Defauts:!<user> syntax in sudoers doesn't seem to work as expected
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: sudo
Version: 6.3
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Daniel Kopeček
QA Contact: David Spurek
URL:
Whiteboard:
Depends On:
Blocks: 947775
TreeView+ depends on / blocked
 
Reported: 2012-09-13 05:47 UTC by Karel Srot
Modified: 2015-03-02 05:27 UTC (History)
5 users (show)

Fixed In Version: sudo-1.8.6p3-8.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
: 856902 (view as bug list)
Environment:
Last Closed: 2013-11-21 23:11:48 UTC
Target Upstream Version:
Embargoed:


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


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2013:1701 0 normal SHIPPED_LIVE Low: sudo security, bug fix and enhancement update 2013-11-20 21:52:06 UTC

Description Karel Srot 2012-09-13 05:47:20 UTC
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):
sudo-1.7.4p5-13.el6_3.x86_64

How reproducible:
always

Steps to Reproduce:
1. add test user
2. update sudoers with:
user  ALL=(ALL)   NOPASSWD: ALL
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 06:26:13 UTC
Thank you. Maybe we can keep this bug open as a request for adding such an explanation into RH shipped sudo.

Comment 6 RHEL Program Management 2012-12-14 06:54:27 UTC
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 09:05:09 UTC
Created attachment 784769 [details]
proposed patch

Comment 16 errata-xmlrpc 2013-11-21 23:11:48 UTC
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.

http://rhn.redhat.com/errata/RHSA-2013-1701.html


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