At 22:46 6/7/00 -0700, Ryan wrote:
>Ok, I see that that is the behavior. Then this means that this was not
>intentionally done, right?
it was intentional that root have /sbin and /usr/sbin in it's path
*when root _logs_in_*
it was intentional that non-root not have /sbin and /usr/sbin in their
path *for login shells*
it is intentional that *any user* who executes 'su' *retain* their
current login environment (does not _log_in_ as new user)
it is intentional that *any user* who executes 'su -' gets a new
*login shell* as the user they SwitchUser to (_logs_in_ as new user)
>As much as I can't understand when one would want to have a /sbin/-less
>path as root, I can't understand why you would only want it to be there
>when you log in as root, and not when you su. (Because, of course,
>this encourages the iffy practice of logging
>in as root).
are you perchane thinking "super user" when you type 'su'? it's historic,
and I'm fairly sure intended, use is "switch user"... it's just that it
happens to default to user root if you don't specify one. from `man su`:
SU(1) FSF SU(1)
NAME
su - run a shell with substitute user and group IDs
SYNOPSIS
su [OPTION]... [-] [USER [ARG]...]
DESCRIPTION
Change the effective user id and group id to that of USER.
-, -l, --login
make the shell a login shell
[...]
(historic note, I've heard that the default user id of root was
a bug in the original Unix impl of su... the int userid was initialized
as 0 and then would be assigned in the parsing of the command line options
after the appropriate calls to get the numeric id from the username, but
if you didn't specify one on the command line it happily went ahead and
used 0.)
>So why isn't it in /etc/login.defs? ENV_SUPATH should certainly contain
>/sbin/, no?
wow... what's /etc/login.defs... never seen that before... what's
ENV_SUPATH? I've been using *nix for a while, and Linux for three years,
never heard of that file before... and man is it ugly....
>I'm just trying to understand if this is a bug or a conscious
>decision... but I can't understand how it could be a bug (and have
>remained unfixed for so long), or how it could be a conscious decision
>(because that makes no sense).
it's a concious decision aimed at making the distro more like comericial
*nix boxen as near as I can tell.
If you're like me, rarely at the console, always admin the box across
the net by logining in then su'ing you can either put the paths into
your normal user path, or alias su="su --login"
cabbey at home dot net <*> http://members.home.net/cabbey
If at first you don't succeed, just redefine 'succeed'.
Life is a sexually transmitted, 100% lethal disease.
--
To unsubscribe:
mail -s unsubscribe [EMAIL PROTECTED] < /dev/null