By zahedjoy009
I want to create an user who will have access to some particular commands only. Actually there are some guys in my company who does not have any knowledge on linux but i need to give them access to server so that they can execute some particular commands (like ping, mtr etc.) beside these i don’t want them to execute any other single commands. So basically i want to create an user who can execute 2/3 specific commands from thousands of commands and that’s it. Please help. N.B. I am talking about configuring sudoers file as because i don’t need them to run any sudo commands.
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!
As a general warning, I would say that if you don’t trust users enough to not run commands that may affect the system, whether it’s due to them not knowing what those commands do, or not knowing enough about linux in general, I wouldn’t add them to the sudo group.
The reason for this is because sudo is the equivalent of root once authenticated. If root can run a command, a sudo user can too as long as they escalate.
There’s also cases where even by limiting a command, they can get around it (as is the case in most scenarios, not just with sudo).
For example, let’s say a sudo user bypasses the standard sudo limit and simply becomes root, in such a case, limiting their commands will fail as they can simply modify the same file you are, remove the limitations, and do as they wish.
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.