I want to restrict certain commands to certain users that are sudoers, for example:
john ALL=ALL,!/usr/bin/apt-get #john won’t be able to run apt-get
My question comes when john can use cp, mv or ln to copy and change the name of the binary, for example:
john home$ sudo ln -s /usr/bin/apt-get myaptget
This renders my sudoers file configuration useless.
Any suggestions, plugin/app to restrict and differentiate sudoers/permissions?
Imagine I have 2 administrators on my system, but I’d like that one of them to have more control than the other…
Thank you very much for your answers, best regards!
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Join our DigitalOcean community of over a million developers for free! Get help and share knowledge in Q&A, subscribe to topics of interest, and get courses and tools that will help you grow as a developer and scale your project or business.
Click below to sign up and get $100 of credit to try our products over 60 days!