|
Bugzilla – Full Text Bug Listing |
| Summary: | When used within a seteuid daemon, sudo always says "sudo: sorry, you must have a tty to run sudo" | ||
|---|---|---|---|
| Product: | Sudo | Reporter: | dwtrusty |
| Component: | Sudo | Assignee: | Todd C. Miller <Todd.Miller> |
| Status: | REOPENED --- | ||
| Severity: | normal | CC: | keanu1031, thomas.cottier |
| Priority: | low | ||
| Version: | 1.8.2 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Attachments: | Perl program which reproduces the error | ||
|
Description
dwtrusty
2011-08-23 14:45:35 MDT
Created attachment 314 [details]
Perl program which reproduces the error
Your sudoers file has the "requiretty" setting enabled, which tells sudo to only run if there is a tty attached. Since the daemon has no tty (it is not an interactive session), it cannot use sudo when "requiretty" is set. If you remove that from your sudoers file it should work as you expect. The sudoers file is like this: Defaults requiretty ... Defaults:wwwrun !requiretty # XOP Where 'wwwrun' is the user that the daemon is being set to. So, the default is being overridden, but the override is being ignored. Hello, I had this problem too: When I have a sudoers file like: Defaults requiretty ... Defaults:user !requiretty The first option override the second. A logical behavior would be the second one overriding the first. The problem is that sudo uses the *real* uid when looking up the user but you are only setting the *effective* uid. That is why the user is not matching. |