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 |
add sudo to your script .....edit /etc/sudoers
|
...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. |