Jump to content

iamresearcher

New Members
  • Posts

    6
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

iamresearcher's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. what I have now on my sudoers which I only modified was: root ALL=(ALL) ALL apache ALL=NOPASSWD: /usr/bin/sudo, /usr/sbin/useradd, /usr/sbin/usermod, /usr/sbin/userdel that is all. I restart httpd but still shell_exec does not perform. Is the syntax below correct? shell_exec('/usr/bin/sudo /usr/sbin/userdel -r ' . $username);
  2. using grep User /etc/httpd/conf/httpd.conf, the result is below: I am using centos 5
  3. I only have one user and that is root. do I have to place NOPASSWD:ALL LIKE root ALL=<ALL> NOPASSWD:ALL Yes I am using php with apache. but I dont get it why I dont have any result from my script.
  4. really my first sytax is fine? was it right to use " instead of ' ? and the position of my quotes? on my sudoers file, is root ALL=<ALL> ALL
  5. What syntax is fine? I dont know if apache allows sudo? can you help me find out if apache allows sudo.
  6. I have this code below: shell_exec("/usr/bin/sudo /usr/sbin/usermod -p $userpwd $username"); Its purpose is to modify the password of the username using php. Please dont criticize why I do what I do. I would like to ask your assistance if that script is correct on its syntax like if I use " or should I use '. I have tried every combination to make it work, but it is not working till now. I also tried: shell_exec("/usr/bin/sudo /usr/sbin/usermod -p". $userpwd . " " . $username); Still not working to update the password of the user.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.