[NTLUG:Discuss] Re: SuSE 9 or 9.1 PATH environment changes after su -- LSB and newer Red Hat
Bryan J. Smith
b.j.smith at ieee.org
Mon Sep 13 13:25:09 CDT 2004
On Mon, 2004-09-13 at 14:10, Bryan J. Smith wrote:
> Right. But according to Steve's tests, there is _no_way_ to preserve
> the user's path for an existing "su".
Okay, found the option, "-m" (and "-p" as well). Looking to Linux
Standards Base:
http://refspecs.freestandards.org/LSB_2.0.0/LSB-generic/LSB-generic/su.html
You are indeed correct on the change. Although the default
implementation seems to _differ_ between distros. This is disturbing.
E.g., Red Hat (Fedora Core 2) _has_ changed so:
su = launches a basic root path, appended with (current?) user path
su - = launches a "pure" root path
Ironically, "-m" or "-p" options seem to do the exact same thing as
"su". So it appears Red Hat has decided that you should _never_ have a
user path pre-empt the root path for security.
So any scripts that relied on the old operation are SOL. I could
understand this when it comes to regular users, but damn it, I need some
service scripts to work. Oh well.
SuSE Linux 9.1, according to Steve's posts, is the opposite:
su = launches a "pure" root path
su - = launches a basic root path, appended with (current?) user path
I think SuSE has it backwards, but that's just my view. I would assume
"-" would load a "pure" root environment, whereas no option would
continue to provide the user environment -- pre-empted by the "required
for security" root PATH.
Anyhoo, thanx for correcting my ignorance. It also means that the other
posters complaint about Red Hat "being broken" is null starting with at
least RHCL4 (CL4.0/Fedora Core 2). I'll check RHCL3 releases (Red Hat
Linux 9 and Fedora Core 1) tomorrow.
--
Bryan J. Smith b.j.smith at ieee.org
------------------------------------------------------------------
"Communities don't have rights. Only individuals in the community
have rights. ... That idea of community rights is firmly rooted
in the 'Communist Manifesto.'" -- Michael Badnarik
More information about the Discuss
mailing list