Subject: Re: ksh won't read /etc/suid_profile
To: David Laight <david@l8s.co.uk>
From: Andrew Brown <atatat@atatdot.net>
List: netbsd-users
Date: 05/20/2002 12:12:57
>> otoh, if you do this instead
>>
>> su root -l
>>
>> it *will* be a login shell, so it will read /etc/profile. you can
>> also use -p (or combine them) there if you wish.
>
>Actually I believe you should do:
> su - root
well...the difference there is how the shell gets told to be a login
shell. in my example, i'm explicitly telling the shell to be a login
shell. in your case, su implicitly tells the shell that it's a login
shell...
...for whatever that's worth.
i also just type 'su' all my itself. works fer me. :)
>Also remember that $SHELL is just an environment variable,
>- typically used to define which shell to run (ie by !command).
>It doesn't have to match the actual shell, indeed after 'su root'
>it will still be that of the environment of whatever ran su.
hence the setting of the SU_FROM variable by the su program. so that
you can tell.
>Often [ "$RANDOM" = "RANDOM" ] is used to separate ksh from
>the bourne sh.
do you mean '[ "$RANDOM" = "$RANDOM" ]'?
--
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org * "ah! i see you have the internet
twofsonet@graffiti.com (Andrew Brown) that goes *ping*!"
andrew@crossbar.com * "information is power -- share the wealth."