I have a php script that I need to run a linux terminal command. My issue is that I need to run this as sudo but its not working. I have done VISUDO and added / disabled as follows:
asterisk ALL=NOPASSWD: /usr/sbin/cmd.php
Defaults!/usr/sbin/cmd.php !requiretty
#Defaults requiretty
#Defaults !visiblepw
But I'm getting this error in apache logs "sudo: no tty present and no askpass program specified". FYI Apache is running as user asterisk and its Centos 6. I'm stuck now so reaching out.
Thanks