Bugzilla – Bug 31
sudo requires tty, even when not prompting
Last modified: 2001-03-20 15:52:11 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?
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.
User had 'requiretty' set.