Summary: | Incorrect PATH on su in KDE konsole | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Steve Flack <steve_flack> |
Component: | Current packages | Assignee: | Dan Armak (RETIRED) <danarmak> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | azarah, bart |
Priority: | High | ||
Version: | 1.2 | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Steve Flack
2002-06-11 14:29:49 UTC
are you using "su -" to change to superuser? I'm using 'su' - it always worked before...now things like rc-update are not in my path when I su. 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... > 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)
pam-login-3.6-r2 should fix this, try and give me a shout. 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. confirmed, works fine under gnome-terminal and text console after upgrading pam-login. guess you can mark it FIXED ;) regards, artb. Great, thanks. 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. |