Bug 472541 - sudo fails to find scripts that aren't executable by current user
sudo fails to find scripts that aren't executable by current user
Status: CLOSED DUPLICATE of bug 471603
Product: Fedora
Classification: Fedora
Component: sudo (Show other bugs)
All Linux
medium Severity medium
: ---
: ---
Assigned To: Daniel Kopeček
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-11-21 11:51 EST by Tom Lane
Modified: 2013-07-02 23:20 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-11-24 06:26:45 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description Tom Lane 2008-11-21 11:51:46 EST
Description of problem:
I have a few scripts that have to be executed as root, which I do via "sudo scriptname".  The scripts
are in my PATH, but to keep from forgetting to use sudo, I have them root-owned and permissioned 0744 (rwxr--r--).
This arrangement has worked fine for many years, but as of latest Fedora 9 it fails.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1.  create shell script permissioned as described
2.  as non-root user, sudo scriptname
Actual results:
sudo: scriptname: command not found

Expected results:
script should run

Additional info:
I observe that "which scriptname" fails to find the script also, which is probably reasonable but
I do not remember whether it used to work like that.  Conceivably this is really a bash issue not
a sudo issue?  But bash hasn't changed recently, and this broke very recently (not more than a
couple weeks ago).  Anyway, for completeness bash is bash-3.2-22.fc9.x86_64
Comment 1 Tom Lane 2008-11-23 18:54:14 EST
After further experimentation, I think my initial description may be wrong: it seems what is really happening is that PATH is being reset to a default value, even though sudo -V claims PATH will be preserved as it has been in the past.
Comment 2 Daniel Kopeček 2008-11-24 06:26:45 EST

*** This bug has been marked as a duplicate of bug 471603 ***

Note You need to log in before you can comment on or make changes to this bug.