RE: [PHP] reboot pc with PHP
| From: | Javier Tacon | Date: | Thu, 28 Aug 2003 13:07:08 +0000 |
| Subject: | RE: [PHP] reboot pc with PHP | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-161041@lists.php.net to get a copy of this message | ||
You can write a little script with expect (man expect) and execute it from php with exec().
Other solution its to write a .procmailrc in root that executes the reboot when coming a mail with
some text in subject or boyd, so, from php you only need to send a mail.
-----Mensaje original-----
De: Petre Agenbag [mailto:internet@vsa.co.za]
Enviado el: jueves, 28 de agosto de 2003 14:48
Para: php-general@lists.php.net
Asunto: [PHP] reboot pc with PHP
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php