Bug 1563837 - Sudo from gnome-terminal doesn't register groups in sudoers
Summary: Sudo from gnome-terminal doesn't register groups in sudoers
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: sudo
Version: 7.4
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Radovan Sroka
QA Contact: BaseOS QE Security Team
Depends On:
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:
Last Closed: 2018-11-05 11:27:01 UTC
Target Upstream Version:

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,

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