sudo: no tty present and no askpass program specified
brian.mckee at gmail.com
Fri Feb 26 00:15:42 UTC 2010
On Thu, Feb 25, 2010 at 3:12 PM, Josef Wolf <jw at raven.inka.de> wrote:
> On Thu, Feb 25, 2010 at 02:58:13PM -0500, Tom H wrote:
>> > On karmic, I have put the following line into my sudoers file
>> > naclt ALL = NOPASSWD: /usr/local/bin/naclient
>> > to allow execution of this program as root from remote hosts. So from the
>> > remote host, I do
>> > /usr/bin/ssh -i /home/me/.ssh/naclt-dsa \
>> > -o "ServerAliveInterval 60" \
>> > -o "ServerAliveCountMax 3" \
>> > naclt at server.my.domain \
>> > /usr/bin/sudo /usr/local/bin/naclient version
>> > But sudo errors out:
>> > sudo: no tty present and no askpass program specified
>> > Why is sudo trying to ask a password here? Did it not get the NOPASSWD
>> > option?
>> > This works perfectly fine with jaunty with exactly the same sudoers file.
> Thanks for the fast response, Tom!
> I understand that sudo refuses to ask for a password if there's no tty.
> But I have explicitly told it _not_ to ask with the NOPASSWD option. So
> there's no reason for sudo to refuse, since it should not try to ask in
> the first place.
does adding the -t option make it work ?
Hey, it's your computer.... isn't it?
More information about the ubuntu-users