Re: reboot pc with PHP
| From: | Catalin Trifu | Date: | Thu, 28 Aug 2003 13:33:52 +0000 |
| Subject: | Re: reboot pc with PHP | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161042@lists.php.net to get a copy of this message | ||
if you are really not interested in the security,
then you can run the apache server as root; then you have
root privileges for your PHP scripts.
then you can use the system() function with no restrictions
Cheers,
Catalin
"Petre Agenbag" <internet@vsa.co.za> wrote in message
news:1062074863.3805.21.camel@petre...
> Hi List
>
> I've gone through the list for previous questions and the only one that
> seems to be a solution is to use sudo, however, I cannot seem to get it
> right.
>
> Just as background:
>
> I want to make a small "admin" utill for an intranet machine, so the
> security risks don't bother me at all.
>
> Instead of myself having to ssh into the box to reboot or do other
> "routine" commands, I'd like to make a simple password protected webpage
> that would have simple links on them like "reboot", "redial" etc, so
> that someone with some sort of responsibility can do it themselves.
>
> Obviously these command(s) need to be run as root, so I looked at the
> /etc/sudoers and added apache , BUT, in the error log it prompts for a
> password.
>
> I tried to add the option NOPASSWD: ALL to the file, but it says there's
> a syntax error.
>
> What am I missing?
>
> Any other ways of doing this? PS, I don't even want to consider Webmin,
> it's way too complicated, I just want a handfull of predefined commands
> to be run, nothing else)
>
> Thanks
>