HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials

HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials (http://www.howtoforge.com/forums/index.php)
-   HOWTO-Related Questions (http://www.howtoforge.com/forums/forumdisplay.php?f=2)
-   -   how to reboot vyatta pc router via php? (http://www.howtoforge.com/forums/showthread.php?t=24424)

torres 23rd June 2008 08:43

how to reboot vyatta pc router via php?
 
i used vyatta pc router (linux based) and i have installed XAMPP for Linux 1.6.6 web server on my router. I would like to know how to reboot my vyatta via php script... I've tried to do that. Here's the scrpit :
/opt/lampp/htdocs/webvy/reboot.php
<?php
exec (/user/bin/sudo /sbin/reboot);
?>

/opt/lampp/htdocs/webvy/form-reboot.html
<a href="reboot.php">Reboot</a>

/etc/sudoers
apache ALL=/sbin/reboot,/opt/lampp/htdocs/webvy/reboot.php NOPASSWD

My script doesn't work and contain an error in /opt/lampp/logs/error_log :
password :
anybody know what's wrong with my script???

falko 24th June 2008 17:09

Is Apache really running as the user apache, or is it maybe a different user?

HaydenHarnet 1st August 2010 13:16

it can be done easily via javascript
__________________
Wireless routers home
linksys e3000 review


All times are GMT +2. The time now is 10:40.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.