Bug 31

Summary: sudo requires tty, even when not prompting
Product: Sudo Reporter: David Thompson <david_a_thompson>
Component: SudoAssignee: Todd C. Miller <Todd.Miller>
Status: RESOLVED FIXED    
Severity: normal    
Priority: normal    
Version: 1.6.3   
Hardware: Other   
OS: Solaris 2.x   

Description David Thompson 2001-03-20 11:19:54 MST
I've defined some usernames that are exclusively for maintainence work, and
I've converted some scripts to use 'sudo -u uname cmd...', but if this command
is issued as part of a background command with nohup, and if I actually exit
the xterm, sudo completely loses it's controlling tty (I presume) and fails to
execute said command, complaining about no tty.  I think this is a bug, if sudo
would not normally prompt for a password, then the lack of a tty should not be
a problem for sudo if the tty is missing.  If sudo is not prompting for a
password, then what is the tty needed for?  If sudo is not prompting for a
password, then why does the lack of a tty constitute an error?
Comment 1 Todd C. Miller 2001-03-20 11:26:59 MST
I'm not convinced this is a bug in sudo, as things like "rsh machine sudo echo
hi" where there is no tty do work fine.  Of course, if you have the "requiretty"
defaults option set in sudoers then this will not work, but presumably you do
not.  Please attach the exact error you are seeing to the bug report so I can
determine if it came from sudo itself or from the command you are running.
Comment 2 Todd C. Miller 2001-03-20 11:52:59 MST
User had 'requiretty' set.