1

How could I change the sudoers files in order to get both "networkadmingroup" (a group created by me) and the "admin" to use all the network-related commands but not the rest? This is my attempt:

Cmnd_Alias WEB = /usr/sbin/httpd, sudoedit /etc/httpd/, sudoedit /etc/init.d/networking

Cmnd_Alias NETWORK_ADMIN = /sbin/ifconfig, /sbin/iptables,WEB

%networkadmingroup ALL = NETWORK_ADMIN

If I log in with another user outside of those groups I am however allowed to use those commands. How can I unable them from using them?

1 Answer 1

0

You can do something like %othergroup ALL=(ALL) ALL, !NETWORK_ADMIN. This doesn't stop them from copying the commands somewhere else, though.

You must log in to answer this question.