No, there is no software for that. And if there was a "sudo" user would be able to revert what that software changed for a user not being able to change anything in /etc
.
If you do not trust your users do not make them a "sudo" user and create regular users for them.
Ok, Here my plan is to user can kill the process, restart all services, mount, change permission and owner, ifdown/up, vagrant etc.
But that has nothing to do with being able to not change /etc
: you can have a regular user with elevated power so (s)he can use specific commands that require "sudo" without being admin on that machine. Example of this: Giving limited Sudo privilege to a user Setting it up like this means they can not change anything in /etc
unless you create a command where they can. But if you believe it is a good idea to have a user be able to do anything except changing files in /etc
it is going to be a very long list.
Be careful though: it is easy to add conflicting commands. See the comment from msalters for instance.
sudo
privilege to users you can't trust editing configuration files? – Yaron Apr 20 '17 at 06:03sudo
privilege? – Yaron Apr 20 '17 at 06:17sudo -i
orsudo su root
). Hence, anyone with sudo privileges will still have access to /etc. The exercise seems pointless. – b_laoshi Apr 20 '17 at 06:21/etc
. If you're going to roll your own security model, it becomes your responsibility to make it consistent and coherent, and that's not easy. – MSalters Apr 20 '17 at 10:22