so I have a user running sudo and they are in both wheel and other_group. other_group shouldn't need a password but wheel does. My question is : does wheel requiring a password for sudo negate the fact that other_group doesn't need a password?
heres a snippet from running sudo visudo
:
## Allows people in group wheel to run all commands
%wheel ALL=(ALL) ALL
## Same thing without a password
# %wheel ALL=(ALL) NOPASSWD: ALL
## Allows members of the users group to mount and unmount the
## cdrom as root
# %users ALL=/sbin/mount /mnt/cdrom, /sbin/umount /mnt/cdrom
## Allows members of the users group to shutdown this system
# %users localhost=/sbin/shutdown -h now
%other_group ALL=(ALL) NOPASSWD: ALL
Normally the last match wins for sudo. From the sudoers man page
Are you absolutely sure that the user is in both groups ?
On a Centos system I have to hand this works as expected
No password required because other_group is after wheel.
Asks for a password as wheel is after other_group.