I need to know how to set up a control user that a user can sudo into only if the user is in a certain group. For example, stupid is a control user that interacts with a service, and is in the group stupiduser. bill is a user that is in the group stupiduser. anne is not in the group stupiduser. Only bill is able to sudo into stupid. ann cannot interact with stupid at all. How can I get a situation like this set up?
su to a specific user only if requesting user is in a specific group
sudo
From the sudoers man pageUser_List ::= User |              User ',' User_ListUser ::= '!'* user name |         '!'* #uid |         '!'* %group |         '!'* %#gid |         '!'* +netgroup |         '!'* %:nonunix_group |         '!'* %:#nonunix_gid |         '!'* User_Aliassimply use (the confusingly named group):%stupiduser HOSTS_HERE = /usr/bin/su - stupid