[sudo-users] Potential bug with sudo

Todd C. Miller Todd.Miller at courtesan.com
Sat Aug 10 14:04:17 MDT 2013

If you have tty_tickets enabled then in sudo 1.7 and 1.8 you will
need to enter a password each time when no tty is available.  In
older versions of sudo, the "unknown" tty ticket file was used when
no tty was present (this was actually a bug).

If you tell ssh to allocate a tty it should work they way you want.
For example:

echo "${passwd}" | ssh -t remotehost "sudo -S uname -a && sudo ls"

As for the prompt, "sudo -S" has always displayed the prompt.
Without a prompt there's no way for a program like expect to know
whether or not a password is actually required.

 - todd

More information about the sudo-users mailing list