Bug 479115 - sudo with shell-scripts no longer possible?
sudo with shell-scripts no longer possible?
Status: CLOSED DUPLICATE of bug 471603
Product: Fedora
Classification: Fedora
Component: bash (Show other bugs)
8
All Linux
low Severity medium
: ---
: ---
Assigned To: Roman Rakus
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-01-07 06:19 EST by Reindl Harald
Modified: 2014-01-12 19:08 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-08 07:22:13 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Reindl Harald 2009-01-07 06:19:03 EST
Why does this not work any longer?
bash-3.2-30.fc10.i386

[harry@nb-rhsoft:~]$ sudo update.sh
[sudo] password for harry:
sudo: update.sh: command not found

[harry@nb-rhsoft:~]$ which update.sh
/scripts/update.sh
Comment 1 Roman Rakus 2009-01-07 06:34:53 EST
Do you have /scripts in your PATH?
Comment 2 Roman Rakus 2009-01-07 06:41:20 EST
Sorry, I missed the output of your `which update.sh'.
You have reported this bug against bash in F-8 and you are using F-10 bash? Or F-8 is just mistake?
Comment 3 Reindl Harald 2009-01-07 07:08:21 EST
Sorry, F8 seems to be default in bugzilla for me, i mean F10

Yes, i have /scripts in my path, also if a look with sudo
I can not say since which exactly update this problem exists, but the locations, symlinks and path is not changed since october 2006 and worked well a long time

[harry@nb-rhsoft:~]$ echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/NX/bin:/home/harry/bin:/sbin:/usr/sbin:/scripts:/scripts/build-scripts:/usr/NX/bin

[harry@nb-rhsoft:~]$ stat /scripts
  File: „/scripts“ -> „/mnt/data/scripts/“
  Size: 18              Blocks: 8          IO Block: 4096   symbolische Verknüpfung
Device: 801h/2049d      Inode: 97832       Links: 1
Access: (0777/lrwxrwxrwx)  Uid: (    0/    root)   Gid: (  501/verwaltung)
Access: 2008-08-30 15:01:57.000000000 +0200
Modify: 2006-09-09 18:43:11.000000000 +0200
Change: 2007-12-23 16:35:44.000000000 +0100

[harry@nb-rhsoft:~]$ sudo echo $PATH
/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/games:/usr/NX/bin:/home/harry/bin:/sbin:/usr/sbin:/scripts:/scripts/build-scripts:/usr/NX/bin
Comment 4 Roman Rakus 2009-01-08 06:50:58 EST
It's because sudo is compiled with `--with-secure-path="/sbin:/bin:/usr/sbin:/usr/bin"'. And if you want to know PATH env in your sudoed env you must invoke PATH variable expansion in that env. Change your: sudo echo $PATH
to: sudo bash -c 'echo $PATH'
Comment 5 Roman Rakus 2009-01-08 07:22:13 EST
And this is dupicate of bug 471603.

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