PHP + Shell
Hello,I'm trying to integrate a small CP for a friend, so he may have basic control over one of my servers while I'm away, such as rebooting.
So far what I've done is (presume username is the user I'm using):
groupadd username
Then, "nano /etc/sudoers" and added....
# User privilege specification
root ALL=(ALL) ALL
--> user added here: username ALL=(ALL) ALL
Then in my script, for example I wanted to add "reboot" as an option in the "username" home directory I wrote down:
"<?php
shell_exec('sudo reboot');
?>"
Saved as "reboot.php" and CHmodded it to 777.
Now the problem is, I can only get basic commands available to a user with no special privaledges, such as "uptime" but advanced commands, such as reboot do not work. Please could someone help me on this, I have no idea what I'm doing wrong.
Thanks
