sudo: no tty present and no askpass program specified
Josef Wolf
jw at raven.inka.de
Thu Feb 25 20:12:06 UTC 2010
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.
>
> http://www.sudo.ws/pipermail/sudo-users/2009-August/004140.html
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.
More information about the ubuntu-users
mailing list