[Techtalk] su

Telsa Gwynne hobbit at aloss.ukuu.org.uk
Wed Aug 13 13:26:51 EST 2003

On Wed, Aug 13, 2003 at 12:56:05PM +0200 or thereabouts, Hamster wrote:
> > At least I finally understand why I have to give a full path to use sbin
> > programs when I su to root..  Since the shell doesn't load root's shell
> > config files (bash.rc or something like that), the path never gets set,
> You see, if youre just logged on as the user, say, Hamster, then sbin isn't
> in Hamster's $PATH. If you just su, then you become root, but with Hamster's
> environment settings, including her $PATH, which contains no sbin.

This doesn't just work for root. I have multiple test accounts on
this box and on another box I have an old account which still 
occasionally receives mail.

When I am on as user1 and see that user2 has mail then doing
"su - user2" is much quicker than starting up another ssh session.
(I believe you can do "ssh user2 at localhost mutt" just to read
mail as that second user, but it's a lot longer to type!)


More information about the Techtalk mailing list