|
Bugzilla – Full Text Bug Listing |
| Summary: | "no tty present and no askpass program specified" error on sudo w/ssh | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | sean_swift |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED INVALID | ||
| Severity: | low | ||
| Priority: | low | ||
| Version: | 1.7.1 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
From the TROUBLESHOOTING file.
Q) When I try to run sudo via ssh, I get the error:
sudo: no tty present and no askpass program specified
A) ssh does not allocate a tty by default when running a remote command.
Without a tty, sudo cannot disable echo when prompting for a password.
You can use ssh's "-t" option to force it to allocate a tty.
Alternately, if you do not mind your password being echoed to the
screen, you can use the "visiblepw" sudoers option to allow this.
E.g.
Defaults visiblepw
|
Target system is running CentOS5 install with 2.6.29 custom kernel upgrade with the latest sudo ( 1.7.1 ). When we attempt to ssh from remote systems and do a task via sudo, we get the following error message: "no tty present and no askpass program specified" On previous systems installed with 1.6.7 and 1.6.8 it doesn't do this. In check.c:119 is where the error check is done. I added code to print out the values of the display variable (user_display) and the tty, and it's clear that no display variable is set, yet we fall through this condition to the error. Any questions, please let me know. Sean