I'm sorry if I missed an answer here. But I did Google this and couldn't find a straight forward answer.
I want to enable the
apache user to run commands as another user, but when I do:
echo "PASSWORD" | sudo -u another_user -S echo "X"
Inside a PHP script, I get:
[sudo] password for apache:
apache user doesn't have a password, so I can't just output it in order to run
sudo. Any way I can enable the
apache user to run
sudo for a specific set of commands under the
another_user account without a password?
PS.: I currently have
apache ALL=(yourhost) /usr/bin/git --git-dir=/* --work-tree=/* pull origin master