Disk Druid - Fedora flame #1[Where o' where does a User get their Environment?]

James Mckenzie jjmckenzie51 at earthlink.net
Thu Jan 20 15:39:11 UTC 2005


-----Original Message-----
From: Chris Adams <cmadams at hiwaay.net>
Sent: Jan 19, 2005 5:44 PM
To: For users of Fedora Core releases <fedora-list at redhat.com>
Subject: Re: Disk Druid - Fedora flame #1

Once upon a time, Emmanuel Seyman <seyman at wanadoo.fr> said:
> On Wed, Jan 19, 2005 at 05:22:43PM -0600, Chris Adams wrote:
> > In any case, why does root's $HOME need to be available?
> 
> That's where his configuration files are.

In single-user mode, what does that matter?

As I said, $HOME is not set before starting the shell, so the shell
files (.bash_profile, .bashrc) are not read.  You really shouldn't have
anything significant under root's home anyway.

-----James' reply-----

Actually, yes the $HOME variable is set when a shell is started.  Also, if you are using BASH, .bashrc is read from the user's $HOME directory as well as /etc/bashrc.  This is the way things work if you do the following:

su - [username]
and the user's shell is set to /bin/bash in /etc/passwd.

If you use the following command, then the .bashrc and /etc/bashrc are NOT read, but the current user's environment is used:

su [username]

This is NOT recommended, especially if you are switching to root or a specialized user, such as oracle (which I do a lot at my 'job'.)

Thank you for allowing me to clear this up.



James McKenzie
A Proud User of Linux!




More information about the fedora-list mailing list