LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Give permission to execute process as super user... (https://www.linuxquestions.org/questions/linux-newbie-8/give-permission-to-execute-process-as-super-user-822400/)

chamila1986 07-27-2010 05:44 AM

Give permission to execute process as super user...
 
I have a program(that is written by me) which need super user permission to execute it. But I need to let the normal users to execute it without using 'sudo ./executable' and just './executable'. how i can set the program to execute by the normal users without using 'sudo' or password prompting.
please help me...

zirias 07-27-2010 06:02 AM

you need to set the "suid" bit:

Code:

chmod u+S /path/to/executable
But, be aware, this COULD be a major security hole. Be sure to only do this on SMALL, thoroughly TESTED binaries. When the suid bit is set, this binary will ALWAYS be executed with the rights of its owner in the filesystem, no matter who is calling it.

zordrak 07-27-2010 06:03 AM

http://en.wikipedia.org/wiki/Setuid
http://www.howtoforge.com/linux_setting_suid_sgid_bits


All times are GMT -5. The time now is 11:40 PM.