Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 228534

Summary: sudo requires a tty even with NOPASSWD
Product: [Fedora] Fedora Reporter: Karsten Hopp <karsten>
Component: sudoAssignee: Peter Vrabec <pvrabec>
Status: CLOSED NOTABUG QA Contact: Ben Levenson <benl>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhide   
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2007-02-15 14:05:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Karsten Hopp 2007-02-13 17:19:56 UTC
Description of problem:
try the following:
- create a user 'build'
- give that user full sudo for yum without prompting for a password:
  echo "build ALL=(ALL) NOPASSWD: /usr/bin/yum" >> /etc/sudoers
(Don't do this at home, giving full yum sudo to any user is a bad idea)
- cat > /tmp/ << EOF
sudo -l
- chmod a+x /tmp/
- su - build -c /tmp/
sudo: sorry, you must have a tty to run sudo

this is wrong, sudo doesn't need a tty here as it doesn't need a password

Comment 1 Karsten Hopp 2007-02-15 14:05:40 UTC
Ok, I've found out in the meantime that this was changed intentionally in FC-6.
Workaround is the following line in /etc/sudoers:

Defaults:build    !requiretty