Redhat rant/review

Jason Clinton me at jasonclinton.com
Mon Nov 10 18:37:52 CST 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Brian Densmore wrote:

| Also so 'su -' is how to get su to load roots env. Seems that Mandrake
| and gentoo do this by default. Oh well, good info to have. ;)

Actually, they don't. This was a great source of confusion for me, as
well. It turns out that there are two separate places that the
environment is configured from: ~/.bashrc and /etc/profile (which
usually invokes /etc/profile.env which, in turn, invokes the contents of
/etc/env.d/*). When one su's, invariably, the console is handed to the
substituted user and then (if no other command was specified) that
user's shell invoked. By default, almost all distros use bash for the
default shell. Upon starting, bash will invoke ~/.bashrc. On Gentoo,
there are some very basic environment variables therein. If one invokes
"su -", the whole shebang is accessed and you get dumped in to the
substituted user's home directory as though you had just logged in as
that user. Of course, I'm no expert and I probably has some part of this
incorrect.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (MingW32)
Comment: Understand the importance of encryption:

iD8DBQE/r84TtSqjk42zvwkRAroSAKC9rotaV7jn23/lQtHcwKXCMe1CcgCghq2L
rPy4NZp6Jck1Nw7ln8arn88=
=cwT5
-----END PGP SIGNATURE-----




More information about the Kclug mailing list