[NTLUG:Discuss] Re: SuSE 9 or 9.1 PATH environment changes after su
Bryan J. Smith
b.j.smith at ieee.org
Fri Sep 10 11:41:36 CDT 2004
On Fri, 2004-09-10 at 12:06, terry wrote:
> I'm thinking that aliasing su - to su is pretty handy because I, for
> one, find no need to just use su without -
> My question is, (and I know I'm probably showing my ignorance here,
> but), in what case would it be better to use su without - ?
I do all the time -- especially when building/configuring/installing
software. I try to do such as a regular user, but some system-wide
components/steps require root on occasion. In those cases, I need the
user environment. Another issue is when I'm dealing with services --
cvs, postgresql, etc... I need to do something as root, but inherent
the service's environment.
Or better yet, I need to su as a _non-root_ user, but with a user's
environment! E.g., I'm building something _for_ a service, but the
service's environment would _not_ include the same build environment as
a regular user (for obvious security reasons). Remember, "su" doesn't
stand for "SUperuser," but "Switch User." ;->
This is as true now with Linux as it has always been with various UNIX
flavors since the [UNIX] epoch. I understand the "convienence" _some_
might want, but the "-" option exists for a damn good reason --
especially to use "older UNIX wennies."
Everyone has a their preferences, and it's cool if you like a distro
that aliases "su" to "su -" by default. But nothing makes me cringe
more than when someone says a distribution is "broken" because it
doesn't have the same defaults.
<attitude=on, please excuse me>
If someone can point out a Linux Standards Base (LSB) reference that
says otherwise, I will readily accept that Red Hat _is_ "broken." Until
then, from an "old UNIX wennie" standpoint, I like Red Hat for damn good
reasons, so don't call it "broken."
In fact, distros that don't recognize the very real need for the lack of
"-" with su (let alone other default parameters) are only going to cause
themselves grief. I don't mean to seem "elitist" (I really am not
saying this as such), but I've seen this happening with more and more
supposed "user friendly distros." The reality is that Windows-style
"defaults" and/or program defaults of "most users aren't going to do X"
are starting to make their way into Linux distros.
There's nothing wrong with that in general. But when it _conflicts_
with something a sysadmin _should_ know on why a parameter, setting or
option should _not_ always be used -- that's a bit dangerous. And that
reminds me of the same "tunnel vision" that I deal with Windows admins
day in and day out -- typically when they pull me in to fix their
networks.
In a nutshell, it doesn't matter what OS you use. You need to _know_
why different options, settings and switches exist -- and not merely set
defaults, aliases, etc.. for the 90% "convienence" because that 10% will
bite you in the rear. ;-ppp
</attitude>
Again, everyone has their preferences. Just don't call a distro
"broken" if it doesn't have the same defaults.
--
Linux Enthusiasts call me anti-Linux.
Windows Enthusisats call me anti-Microsoft.
They both must be correct because I have over a
decade of experience with both in mission critical
environments, resulting in a bigotry dedicated to
mitigating risk and focusing on technologies ...
not products or vendors
--------------------------------------------------
Bryan J. Smith, E.I. b.j.smith at ieee.org
More information about the Discuss
mailing list