|
Bugzilla – Full Text Bug Listing |
| Summary: | Don't requiretty for NOPASSWD | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | Phil Dumont <phil> |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | RESOLVED INVALID | ||
| Severity: | normal | ||
| Priority: | low | ||
| Version: | 1.6.8 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
|
Description
Phil Dumont
2008-06-27 09:12:29 MDT
The requiretty option was originally intended to prevent sudo from being run from a non-login context. E.g., from cron or a web server. Well, that's another good reason for requiretty. Too bad the docs don't mention it. Be that as it may, the reason given by the sudoers man page for the requiretty option, though it may not have been the original motivation for the option, is still valid. To wit, under some circumstances (like "rsh somehost sudo somecommand"), if prompted for a passwd and there is no tty, the passwd will show up in the clear. So as it is now, I have a choice to make. I can turn off requiretty, which will let me run my NOPASSWD command from cron, but opens the risk of passwd-in-the-clear for my other sudo commands which require a PASSWD. Or I can turn on requiretty, which will close the passwd-in-the-clear risk, but prevents cron runs. I can't (as far as I can tell) have both. I'd like to. Maybe tying a turning off of requiretty to NOPASSWD is not the right solution. But it would be nice if requiretty had a per-command resolution, like NOPASSWD, instead of it's current coarser resolution of per-user. I've fixed up the docs for 1.7.0, which will no longer prompt for a password when echo cannot be disabled unless explicitly configured to do so. |