Sudo issue with master user


#1

you either need to remove the master user from the sudo group or change the /etc/sudoers file.

What is happening is that the my_user below is granted no password for all however it’s also a member of the sudo group. It’s going top down in sudoers…so it’s going …ok…NOPASSWD: all but then later it’s hitting the sudo group and removing the NOPASSWD.

The fix so the master user isnt prompted is to remove the %sudo ALL=(ALL:ALL) ALL line below or remove the master user from the sudo group…now the user can sudo without getting prompted for a password.

Since I didnt want to mess with the sudoers file and have it overwritten I chose to remove my user from the sudo group.

# User privilege specification
my_user ALL=(ALL:ALL) NOPASSWD: ALL
root    ALL=(ALL:ALL) ALL
www-data     ALL = (ALL) NOPASSWD: CLEANMEM, SYSCMNDS, PLUGINCMNDS, PACKAGECMNDS, GENERALCMNDS, SYSCTLCMNDS

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%www-data     ALL = (ALL) NOPASSWD: CLEANMEM, SYSCMNDS, PLUGINCMNDS, PACKAGECMNDS, GENERALCMNDS, SYSCTLCMNDS
%sudo   ALL=(ALL:ALL) ALL