How to allow users to run root programs in linux
Linux is supposed to be the most secure operating system but can you imagine the degree of security when even you (the real user) can’t get access to some specific programs and computer settings.
In Ubuntu i often use command “sudo” to grand access to programs and process controlled by terminal (a default command prompt used in Ubuntu/Linux ).The use of sudo can be defined as follows:
Example #1 for granting acess to install anything on the Ubuntu
sudo apt-get install
Example #1 for restarting the network on the Ubuntu
sudo /etc/init.d/networking restart
Moreover when a user starts a command, it runs with the permissions of that user.Their is another way of playing with this access on linux box with the command suid
How to set mybin suid root ?
chmod +s mybin
Cautions:In case your command has any security loop hole, or allows the user to access other files or programs in your box then a user could take over the root account and can hijack whole system (linux box).