[sudo-users] !requiretty ignored

Han Boetes hboetes at gmail.com
Fri Aug 14 12:14:21 MDT 2015


I have a nifty WM setup that allows me to send all kinds of commands from
the WM, and I have set up sudo to allow this specific command -- s2ram, a
command to suspend to ram -- to run without tty, like this:

~% sudo -l
Matching Defaults entries for han on caesar:
    env_reset, mail_badpass,

Runas and Command-specific defaults for han:
    Defaults!/usr/sbin/s2ram !requiretty

User han may run the following commands on caesar:
    (root) ALL
    (root) NOPASSWD: /usr/sbin/s2ram

Running it from a terminal works OK. But when I run the command from the WM
I get this error:

~% grep tty .xsession-errors
sudo: no tty present and no askpass program specified

What am I missing here?

# Han

More information about the sudo-users mailing list