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?

2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.