i try to use shell_exec() from my php web application the simple commandes by example "ls" works but with sudo not working:
shell_exec("sudo reboot");
this is the link :
http://192.168.1.8/controle/webshell.php?commande=sudo%20reboot
but the commande cannot be executed.
Any help ?
it works with this modification in /etc/sudoers :
www-data ALL = NOPASSWD: /sbin/reboot, /sbin/halt