Re: [PROBLEM] Killed sshd, want to start it via PHP script.
| From: | mdg | Date: | Mon, 11 Aug 2003 13:43:36 +0000 |
| Subject: | Re: [PROBLEM] Killed sshd, want to start it via PHP script. | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-159134@lists.php.net to get a copy of this message | ||
Apache not running as root is a good thing, but probably is...
Since it appears you are not the admin of the box, ask them to install
Webmin (http://www.webmin.org/webmin)
and to give your userid access to the ssh component.
----- Original Message -----
From: "Simon Fredriksson" <simon@lan2k.org>
To: <php-general@lists.php.net>
Sent: Monday, August 11, 2003 8:14 AM
Subject: Re: [PHP] [PROBLEM] Killed sshd, want to start it via PHP script.
>
> 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