Yeah, but as it is, I can't start those things :P
I must be root to do so. Apache is not running as root.

//Simon

Jason Wong wrote:

> On Monday 11 August 2003 13:01, Simon Fredriksson wrote:
> 
> 
>>Anyway; I want to make some sort of PHP backdoor to start sshd again. As
>>far as I know, only root can do so though so just an exec() won't do.
>>How can I switch to root, enter the password and then start sshd via a
>>PHP script that I run via the web?
> 
> 
> I know PHP is pretty versatile and all that, but I'm still amazed at the kinds 
> of things that people want PHP to do when there are better and more 
> appropriate alternatives:
> 
> The simplest requiring no more than a shell script is to run a cron job which 
> figures out whether sshd is running, if not start it.
> 
> Further up the scale you can use xinetd.
> 
> Even further, you can use something like daemontools to supervise your "must 
> run" daemons.
> 


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to