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 1563837 - Sudo from gnome-terminal doesn't register groups in sudoers
Summary: Sudo from gnome-terminal doesn't register groups in sudoers
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sudo
Version: 7.4
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-04-04 20:39 UTC by Steve Smock
Modified: 2018-11-05 11:27 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-11-05 11:27:01 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Steve Smock 2018-04-04 20:39:30 UTC
Description of problem:
Running sudo commands from gnome-terminal reports user is not in the sudoers file if the user is a member of a group that is in the sudoers. 

Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux Server release 7.4 (Maipo)

How reproducible:
Add user to group, add %groupname to sudoers, then use gnome-terminal and try sudo.

Steps to Reproduce:
1. Create group fullsudo, adduser to fullsudo group
2. Add "%fullsudo  ALL=(ALL)       ALL" to sudoers
3. Open graphical session and launch GNOME Terminal
4. run sudo anyting

Actual results:
fails with user in not in the sudoers file

Expected results:
Command completes.  

Additional info:
If putty is used or ssh from other server the command executes.
sudo -U user -l shows (ALL) ALL
If the user is added directly to sudoers the user can sudo in the GNOME terminal.

Comment 2 Steve Smock 2018-04-11 15:53:02 UTC
This bug is only when the group that has the sudo access is assigned as a supplementary group.

This works:
uid=3504(user3) gid=3501(fullsudo) groups=3501(fullsudo)

This doesn't work:
uid=3504(user3) gid=3504(user3) groups=3504(user3),3501(fullsudo)

Comment 3 Daniel Kopeček 2018-08-06 12:05:55 UTC
$ cat /etc/system-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
$ id
uid=1000(user) gid=1000(user) groups=1000(user),1001(fullsudo) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
$ sudo grep fullsudo /etc/sudoers
[sudo] password for user:
%fullsudo ALL=(ALL) ALL


Works for me.
Is there anything else that has to be set for the bug to manifest itself?

Comment 4 Steve Smock 2018-08-23 14:13:40 UTC
Hi Daniel,

Thank you for your time.

I suspect this has be resolved in 7.5.  I've attempt to duplicate the original bug and was unsuccessful.  This is now working as expected.

Thank you,
Steve


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