Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I don't want to uncomment the line in /etc/sudoers:

Defaults    requiretty

Instead, I only want a certain user not to require a tty. How can this be done?

share|improve this question
up vote 71 down vote accepted

You said that you want one particular user to not require a tty. That's the default behavior. Nevertheless, you can explicitly set that like this:

Defaults:username !requiretty

If you want everyone else to require a tty, then you'll have to uncommment the line.

share|improve this answer
Thanks, that worked. – user27451 Feb 10 '10 at 11:39
Btw., requiretty is active per default on RHEL5. Good to know its not like that in other distributions. – user27451 Feb 13 '10 at 14:11
This one might help someone. – Senthil Kumar Mar 8 '12 at 10:49

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.