scripting "execute this as user/passwd"
Hi
I've got a perl based website running as 'nobody' with the need to execute a privileged command (modify stuff in /home/someuser). As it happens I've got the username and password in the perl environment. The su command would work for me except it doesn't allow the password to be entered in a script. I don't want to allow 'nobody' any permissions via sudo. In summary, given I'm running as 'nobody' I want to script executing commands as 'someuser' and I have the password for the account for 'somesuser'. What's the recommended approach? |
Options:
*) Create a setuid program (not shell script!) that does what you need. *) Create a daemon program that listens for requests, changing privileges as needed. *) http://httpd.apache.org/docs/1.3/suexec.html |
All times are GMT -5. The time now is 12:18 PM. |