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)
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
fails with user in not in the sudoers file
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.
This bug is only when the group that has the sudo access is assigned as a supplementary group.
uid=3504(user3) gid=3501(fullsudo) groups=3501(fullsudo)
This doesn't work:
uid=3504(user3) gid=3504(user3) groups=3504(user3),3501(fullsudo)
$ cat /etc/system-release
Red Hat Enterprise Linux Server release 7.5 (Maipo)
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?
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.