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

I am trying to allow a specific command to be run under sudo without a tty. I found that I can disable requiretty for a group :

Defaults:%support !requiretty

But I dont know how to do it for a single command. Is it possible at all ?

share|improve this question

2 Answers

up vote 6 down vote accepted

You should be able to do:

Cmnd_Alias                NOTTYCMDS = /path/to/cmd1, /path/to/cmd2
Defaults!NOTTYCMDS        !requiretty
share|improve this answer
Looks promising, but this does not work for me. – takeshin Dec 21 '11 at 10:06
This works for me running Sudo version 1.7.4p5. – Keith Burdis Oct 24 '12 at 11:30

To disable sudo tty requirement for a single command use the following in the sudoers file:

Defaults!/path/command !requiretty
share|improve this answer

Your Answer

 
discard

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.