Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

migrated from stackoverflow.com Dec 16 '12 at 19:59

This question came from our site for professional and enthusiast programmers.

1 Answer 1

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

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.