Bug 182740 - "sudo -i" doesn't set $PATH correctly compared to "sudo su -"
"sudo -i" doesn't set $PATH correctly compared to "sudo su -"
Product: Fedora
Classification: Fedora
Component: sudo (Show other bugs)
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Peter Vrabec
Ben Levenson
Depends On:
  Show dependency treegraph
Reported: 2006-02-24 08:23 EST by Jarkko
Modified: 2007-11-30 17:11 EST (History)
1 user (show)

See Also:
Fixed In Version: sudo-1.6.8p12-4.1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2007-01-22 08:28:35 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 Jarkko 2006-02-24 08:23:37 EST
Description of problem:

"sudo -i" doesn't set $PATH correctly compared to "sudo su -". (Sorry if this is
not sudo related but something else. For me as a user it is sudo. Please
reassign if i picked a wrong component.)

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

Comment 1 Peter Vrabec 2006-08-08 06:44:29 EDT
Could you send some steps to reproduce this problem.
Comment 2 Jarkko 2006-08-08 11:50:01 EDT
$ sudo su -
# echo $PATH

$ sudo -i
# echo $PATH
Comment 3 Peter Vrabec 2006-08-29 07:12:32 EDT
It seems problem is that "$ sudo -i" doesn't reset PATH variable. I have asked upstream, if it 
is desired behavior, but I haven't received any answer yet.

$ echo $PATH
$ export PATH="$PATH:/foo"
$ sudo -i
# echo $PATH

Comment 4 Christian Iseli 2007-01-22 06:34:58 EST
This report targets the FC3 or FC4 products, which have now been EOL'd.

Could you please check that it still applies to a current Fedora release, and
either update the target product or close it ?

Comment 5 Jarkko 2007-01-22 08:28:35 EST
The behaviour has changed. I've tested this in FC5.

Now "sudo -i" adds all root user related paths to $PATH.

I assume that's how this command is supposed to work. So closing the bug...

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