4

Calling sudo within a script that was called with sudo prompts for password even with NOPASSWD

view full story
linux-howto

http://serverfault.com – A PHP program I am working with (LConf) calls a script using sudo. I have allowed the user apache to run the script and have tested with sudo -u apache /usr/local/LConf/lconf_deploy.sh. I am being prompted for a password when lconf_deploy.sh calls /usr/bin/sudo -u icinga /usr/local/LConf/LConfExport.pl -o /etc/icinga/lconf -v, but have no problems calling lines before or after this line. After reading a lot (both on stackexchange and elsewhere on the internet) about what to do in this situation, I have disabled requiretty and used NOPASSWD for everything I can think of that affects this sit (HowTos)