Bug 472541 - sudo fails to find scripts that aren't executable by current user
Summary: sudo fails to find scripts that aren't executable by current user
Keywords:
Status: CLOSED DUPLICATE of bug 471603
Alias: None
Product: Fedora
Classification: Fedora
Component: sudo
Version: 9
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Daniel Kopeček
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-11-21 16:51 UTC by Tom Lane
Modified: 2013-07-03 03:20 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2008-11-24 11:26:45 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Tom Lane 2008-11-21 16:51:46 UTC
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):
sudo-1.6.9p13-7.fc9.x86_64

How reproducible:
100%

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 23:54:14 UTC
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 11:26:45 UTC

*** 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.