Bug 479115 - sudo with shell-scripts no longer possible?
Summary: sudo with shell-scripts no longer possible?
Keywords:
Status: CLOSED DUPLICATE of bug 471603
Alias: None
Product: Fedora
Classification: Fedora
Component: bash
Version: 8
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Roman Rakus
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-01-07 11:19 UTC by Reindl Harald
Modified: 2014-01-13 00:08 UTC (History)
3 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2009-01-08 12:22:13 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Reindl Harald 2009-01-07 11:19:03 UTC
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 11:34:53 UTC
Do you have /scripts in your PATH?

Comment 2 Roman Rakus 2009-01-07 11:41:20 UTC
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 12:08:21 UTC
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 11:50:58 UTC
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 12:22:13 UTC
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.