0

Under a controlled environment, I will try to execute some calls to shell, some of such commands will include sudo privileges.

I tried this php code line:

$out = shell_exec('sudo -u root -S ls < /home/user/.y/.qqz');

Where at last .qqz is a file containing actual password.

However apache log shows this output:

[sudo] password for www-data:

Like the password file is not being passed to the command stdi?

I already made www-data part of the sudo group. How can I get my objective done?

diegoaguilar
  • 8,179
  • 14
  • 80
  • 129

0 Answers0