Hi, in SuSE 9.0 "su" resets the PATH and then sets it to some value for root. Especially, the "." entry (that the users had) disappeared. Calling "su" in SuSE 10.1 does not reset the path anymore, and so root suddenly has "." in his path, although CWD_IN_ROOT_PATH is set to no. This is really really bad because you don't expect it. "su -l" is not a good alternative because it changes you current directory. Can I revert to the old behaviour of su? Was resetting the path a feature of su, or of the shell scripts in /etc/? cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Frank Steiner
in SuSE 9.0 "su" resets the PATH and then sets it to some value for root. Especially, the "." entry (that the users had) disappeared.
Calling "su" in SuSE 10.1 does not reset the path anymore, and so root suddenly has "." in his path, although CWD_IN_ROOT_PATH is set to no. This is really really bad because you don't expect it.
something's amiss .... "." is not in my path, nor does it appear when I su to root. SUSE 10.1 x86_64 2.6.18-rc5-1.1-default -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 2006-09-28 09:56:36 -0400, Patrick Shanahan wrote:
something's amiss ....
"." is not in my path, nor does it appear when I su to root.
"." in your path can be dangerous. you dont want that. especially not as root. darix -- openSUSE - SUSE Linux is my linux openSUSE is good for you www.opensuse.org --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On 09/28/2006 03:56 PM, Patrick Shanahan wrote:
Calling "su" in SuSE 10.1 does not reset the path anymore, and so root suddenly has "." in his path, although CWD_IN_ROOT_PATH is set to no. This is really really bad because you don't expect it. something's amiss .... "." is not in my path, nor does it appear when I su to root. I hope it so. For the OP, try su - --
Carlo Garbarini OpenPGP public key available through keyservers, ID: 0x04BD08AB Key fingerprint = 5877 F32C EA40 676E ACDF BCDA 623E B8EF 04BD 08AB _Always_check_key_fingerprints_ --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Carlo Garbarini wrote
For the OP, try su -
As I said, that has the drawback of changing the current directory to root's home. Most times, that's not what I want... -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Patrick Shanahan wrote
something's amiss ....
"." is not in my path, nor does it appear when I su to root.
You can activate it for normal users (and/or root) via /etc/sysconfig/suseconfig We have it for normal users, but I want it to disappear when I su, like it happend with SuSE 9.0. cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Frank Steiner
You can activate it for normal users (and/or root) via /etc/sysconfig/suseconfig We have it for normal users, but I want it to disappear when I su, like it happend with SuSE 9.0.
Then add "." to $PATH via the user's .profile or .bashrc, and root will not know about it. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Patrick Shanahan wrote
* Frank Steiner
[09-28-06 10:58]: You can activate it for normal users (and/or root) via /etc/sysconfig/suseconfig We have it for normal users, but I want it to disappear when I su, like it happend with SuSE 9.0.
Then add "." to $PATH via the user's .profile or .bashrc, and root will not know about it.
He will, that's the point actually: when su'ing to root, the current PATH is kept! It's not resetted anymore, like in 9.0. So whenever a user, that has "." in his patch, types "su", root will have the same PATH (plus some more that are added from global profile). I need the current PATH of the user typing "su" to be deleted, then re-initialized for root via /etc/profile etc. cu, Frank -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
* Frank Steiner
He will, that's the point actually: when su'ing to root, the current PATH is kept! It's not resetted anymore, like in 9.0. So whenever a user, that has "." in his patch, types "su", root will have the same PATH (plus some more that are added from global profile).
I need the current PATH of the user typing "su" to be deleted, then re-initialized for root via /etc/profile etc.
then alias su to use a restricted shell and environment vars. -- Patrick Shanahan Registered Linux User #207535 http://wahoo.no-ip.org @ http://counter.li.org HOG # US1244711 Photo Album: http://wahoo.no-ip.org/gallery2 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Fri, 2006-09-29 at 10:31 +0200, Frank Steiner wrote:
Patrick Shanahan wrote
* Frank Steiner
[09-28-06 10:58]: You can activate it for normal users (and/or root) via /etc/sysconfig/suseconfig We have it for normal users, but I want it to disappear when I su, like it happend with SuSE 9.0.
Then add "." to $PATH via the user's .profile or .bashrc, and root will not know about it.
He will, that's the point actually: when su'ing to root, the current PATH is kept!
Which is the correct way that it works. If you want to use root's env when you su then you need to use "su -". su without the "-" means to use the current user env (including $PATH).
It's not resetted anymore,
Never was, even in 9.0. If you check the login var's you'll find it probably never was set for anyone from the start which is the default at install time. -- Ken Schneider UNIX since 1989, linux since 1994, SuSE since 1998 --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hello, Am Donnerstag, 28. September 2006 12:27 schrieb Frank Steiner:
in SuSE 9.0 "su" resets the PATH and then sets it to some value for root. Especially, the "." entry (that the users had) disappeared.
Calling "su" in SuSE 10.1 does not reset the path anymore, [...]
BTW: This change was done for 10.0 already.
Can I revert to the old behaviour of su? Was resetting the path a feature of su, or of the shell scripts in /etc/?
http://suse-linux-faq.koehntopp.de/q/q-suse100-su_path.html (german) Short answer: set ALWAYS_SET_PATH=yes in /etc/default/su Regards, Christian Boltz -- Verstehen kann ich das Problem. Die meisten von uns hätten gerne brandaktuelle *und* felsenstabile Software. Der Unterschied zwischen Redmond und Pinguinhausen ist, daß erstere dir erzählen, daß man beides haben könne. Stimmt aber nicht. [Ratti in suse-linux] --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Christian Boltz wrote
http://suse-linux-faq.koehntopp.de/q/q-suse100-su_path.html (german)
Short answer: set ALWAYS_SET_PATH=yes in /etc/default/su
Thanks a lot :-)) -- Dipl.-Inform. Frank Steiner Web: http://www.bio.ifi.lmu.de/~steiner/ Lehrstuhl f. Bioinformatik Mail: http://www.bio.ifi.lmu.de/~steiner/m/ LMU, Amalienstr. 17 Phone: +49 89 2180-4049 80333 Muenchen, Germany Fax: +49 89 2180-99-4049 * Rekursion kann man erst verstehen, wenn man Rekursion verstanden hat. * --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (6)
-
Carlo Garbarini
-
Christian Boltz
-
Frank Steiner
-
Kenneth Schneider
-
Marcus Rueckert
-
Patrick Shanahan