Simon Geard wrote:
On Fri, 2005-09-16 at 05:32 -0400, Chris Staub wrote:
That's a pretty weird system you have if "su" doesn't have /sbin or
/usr/sbin in the path.
Not really... remember, 'su' simply changes the current user, it doesn't
change the environment. Look at the output of 'env', and you'll see that
things like $USER still have values for the user that ran 'su', not the
user they're becoming. As far as I can tell, $HOME is the only thing
that changes.
That's the difference between 'su' and 'su -' - the latter runs a new
login shell as the user in question, so the environment gets reset,
running the login scripts for root which add the sbin directories to
$PATH.
Works for me
andy:~$ echo $PATH
/bin:/usr/bin:/usr/local/jre1.5.0/bin:.
andy:~$ su
Password:
root:/home/andy# echo $PATH
/bin:/sbin:/usr/bin:/usr/sbin
--
http://linuxfromscratch.org/mailman/listinfo/blfs-support
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page