Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 3643 - Incorrect PATH on su in KDE konsole
Summary: Incorrect PATH on su in KDE konsole
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Dan Armak (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-06-11 14:29 UTC by Steve Flack
Modified: 2009-04-08 13:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Steve Flack 2002-06-11 14:29:49 UTC
I seem to be having a problem with the PATH set for root in the konsole in  
KDE. It's now set as /bin:/usr/bin (note no reference to /sbin or  
whatever). When using a console login outside of KDE PATH is set  
correctly...it's only in KDE AFAIK. I first noticed it on June 7th after 
emerging the new glibc and KDE's and I have re-installed completely from 
scratch since then and the problem is still there.
Comment 1 Bart Verwilst 2002-06-14 00:13:56 UTC
are you using "su -" to change to superuser? 
Comment 2 Steve Flack 2002-06-14 05:10:59 UTC
I'm using 'su' - it always worked before...now things like rc-update are not in 
my path when I su.
Comment 3 Dan Armak (RETIRED) gentoo-dev 2002-06-14 06:58:10 UTC
From the su manpage:      
The current environment is passed to the new shell. The value of $PATH is      
reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin      
for the super user. This may be changed with the ENV_PATH and ENV_SUPATH      
definitions in /etc/login.defs.       
      
Now, our login.defs has ENV_PATH and ENV_ROOTPATH, where      
ENV_ROOTPATH=/sbin:/bin:/usr/sbin:/usr/bin.      
I copied this setting to an ENV_SUPATH= line, and su root now gives this      
as the path. 
 
This creates a new problem though: bug #3147. The error mentioned there is not  
fatal though, I can still login, but it's not pretty either. Azarah: any  
suggestions? This isn't exactly my home ground... 
Comment 4 Artur Brodowski 2002-06-17 12:23:14 UTC
> From the su manpage:      
> The current environment is passed to the new shell. The value of $PATH is      
> reset to /bin:/usr/bin for normal users, or /sbin:/bin:/usr/sbin:/usr/bin      
> for the super user. This may be changed with the ENV_PATH and ENV_SUPATH      
> definitions in /etc/login.defs.       
> Now, our login.defs has ENV_PATH and ENV_ROOTPATH (..)
well this doesn't work correctly neither under gnome-terminal nor text console -
seem like `su` treats root as usual user and sets $PATH to /bin:/usr/bin
i added ENV_SUPATH to /etc/login.defs and it helped, but it's dirty - `su` now
sets root $PATH as i should (/sbin...), but login process gives a warning:
"configuration error - unknown item 'ENV_SUPATH' (notify administrator)"
every time new user tries to log on (this shows up only on tex console, i guess
X teminals hide warnings)
Comment 5 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-17 14:34:16 UTC
pam-login-3.6-r2 should fix this, try and give me a shout.
Comment 6 Steve Flack 2002-06-17 15:19:17 UTC
Just upgraded to pam-login-3.6-r2 and PATH is correctly set as 
/sbin:/bin:/usr/sbin:/usr/bin after su in both the KDE konsole and after login 
as a normal user then 'su' in a CLI session. It looks like it's fixed. I 
didn't get any odd error message in either case.  
Comment 7 Artur Brodowski 2002-06-18 04:42:57 UTC
confirmed, works fine under gnome-terminal and text console
after upgrading pam-login. guess you can mark it FIXED ;)
regards,
artb.
Comment 8 Martin Schlemmer (RETIRED) gentoo-dev 2002-06-18 12:33:54 UTC
Great, thanks.
Comment 9 joachim Langenbach 2009-04-08 13:01:58 UTC
Hello everyone!

It seems to be not real solved, because su uses another $PATH then the one defined in /etc/profile. So it is different to the one, which is set by env-update. If I login as root directly, I get the right $PATH including the $ROOTPATH. But not with su. But this behaviour seems to be independed from Konsole or the normal shell.