4
# User privilege specification
root    ALL=(ALL:ALL) NOPASSWD: ALL
apache ALL=(ALL:ALL) NOPASSWD: ALL
me ALL=(ALL:ALL) NOPASSWD: ALL

In Fedora both works:

http://localhost/test
echo shell_exec("sudo dmidecode | grep UUID"); // nothing shows to encrypt/decrypt licenses

php -r "..license..";
5

In Ubuntu, apache runs as the www-data user. If you want to use sudo without a password from a web page, you should probably limit the commands that it can run.

  • +1 You will really want to limit the commands scope. – Marco Ceppi Oct 5 '11 at 21:54
  • So, how do we limit the commands that it can run? – jameshfisher Mar 31 '14 at 22:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy