Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
You should look into the commands you want to allow prayag to have and then limit them to that because their are several other methods that this user can use to get full root. But as it goes the difference between giving a user full sudo privilages is not far off from full root, they just need to mess about with their $PATHs and put sudo infront of everything...
Their is also "sudo /bin/sh" or "sudo /bin/bash" what would have similar effects to "sudo su -" or "sudo passwd root" to reset the root password. I would look more into actually setting proper sudo privilages and limiting what commands the user has access to.
Only if you can list all the cmds you want to allow and you are certain none of them allows a shell escape. Harder than you think.
sudo enables specified cmds, there's no way to specify disallowing cmds. It just disallows any cmds not listed (ie that aren't specifically listed/enabled).
Even if you limited it down to all the basic methods, if your giving them sudo, you are still giving them the ability to install a shell and then run it as root... Also even if you remove all but root shells, giving them sudo to everything else means they can do anything root can do via the use as sudo and view everything root can see. It's pointless to give them EVERYTHING else but direct root logins since they can still do whatever it is you don't want them do via sudo. Review what commands they actually need and then limit the sudoers file to just those commands and only those commands.