sudoers: how to disable requiretty per user
Solution 1:
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.
Solution 2:
RedHat now recommends removing 'Defaults requiretty', conforming with the source code defaults. In Security Advisory RHSA-2016:2593, Redhat patched /etc/sudoers, removing line 'Defaults requiretty'
For additional details, see: https://bugzilla.redhat.com/show_bug.cgi?id=1196451 https://bugzilla.redhat.com/attachment.cgi?id=1155247&action=diff
Also, per user requiretty exceptions DO NOT WORK for RHEL/CENTOS 7 (sudo 1.8.6p7)