I need to invoke sudo from a PHP script (web-triggered) so as to run a command as another user.
However, I get the message "sudo: sorry, you must have a tty to run sudo".

Would there be any security problem on giving the user nobody a tty??

Would you recommend a different approach to do what I need (run a shell script as a different user)?

link|improve this question

feedback

1 Answer

up vote 1 down vote accepted

Hmm sudo requires tty?

visudo

Disable an option for a user (or the default setting):

!requiretty
link|improve this answer
Perfect. Thanks. – GetFree Dec 14 '09 at 23:32
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.