This command works :
shell_exec('sudo -u root -S /home/jon/reboot.sh < /home/jon/pwd');
The system reboot as expected.
But this fails:
shell_exec('sudo -u root -S /home/jon/reboot.sh < /tmp/Csikea');
Why does using a tmp file fail ? it contains the same password as the pwd file.
The apache log shows : sudo: pam_authenticate: Conversation error
I've manually set the owner and permissions on Csikea
to be the same as pwd
Still have the same issue.
Any ideas ?
Thanks