Sign up ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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)?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

Hmm sudo requires tty?


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

share|improve this answer
Perfect. Thanks. – GetFree Dec 14 '09 at 23:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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