I'm encountering an issue with root privilege assignment to a non-wheel group in my Red Hat Enterprise Linux system. Specifically, I'm trying to grant passwordless sudo access to a custom group named 'adminteam', but users in this group are still prompted for a password.
I've attempted to configure this in two ways:
In both scenarios, the result is the same: individual user entries with NOPASSWD: ALL work as expected, but the group rule does not.
Here's a breakdown of the issue:
Here's a simplified example of my configuration (both in /etc/sudoers and /etc/sudoers.d/adminteam):
# Example sudoers entry %adminteam ALL=(ALL) NOPASSWD: ALL myuser ALL=(ALL) NOPASSWD: ALL
In this example, myuser can execute sudo commands without a password, but users within the adminteam group still require a password.
I've verified that the users are indeed members of the 'adminteam' group.
My questions are:
@Codekaito you can try this :
1. Always use visudo
2. remove that group entry from the /etc/sudoers and enter it in /etc/sudoers.d/adminteam
3. uncomment the includedir /etc/sudoers.d in the /etc/sudoers if any.
4. check visudo -c for any errors in the config file.
now check if it works.
Red Hat
Learning Community
A collaborative learning environment, enabling open source skill development.