LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Security (https://www.linuxquestions.org/questions/linux-security-4/)
-   -   Shell Script with Root Permission (https://www.linuxquestions.org/questions/linux-security-4/shell-script-with-root-permission-415645/)

gjagadish 02-15-2006 06:37 AM

Shell Script with Root Permission
 
Hi,

I have a shell script which needs root permission to work.
becoz, it needs to edit httpd.conf, rc.local ...etc

But i want this script to be useful for non root users also.
so How can i run a script with root permission from another user.

thanx in advance
Jagadish

doublejoon 02-15-2006 06:47 AM

add sudo to your script .....edit /etc/sudoers

unSpawn 02-15-2006 08:38 AM

...and if you allow editing global configs like httpd.conf and rc.local I'd recommend building a wrapper to back up the originals, give a copy to a user to edit and verify changes before committing. If you won't the box might see all kinds of "interesting" breakage because errare humanum est.


All times are GMT -5. The time now is 04:53 PM.