"su - userx"  will cause userx's profile to be executed, as in a login.

Marc

----------
Marc Mongeon <[EMAIL PROTECTED]>
Unix Specialist
Ban-Koe Systems
9100 W Bloomington Fwy
Bloomington, MN 55431-2200
(612)888-0123, x417 | FAX: (612)888-3344
----------
"It's such a fine line between clever and stupid."
   -- David St. Hubbins and Nigel Tufnel of "Spinal Tap"


>>> Jean-Pierre Parent <[EMAIL PROTECTED]> 06/01 12:16 PM >>>
Mark Wright wrote:

> Is there a good system for setting variables, aliases, etc that need to be
> set for user X, whether I log in at a login prompt or using su?  I'm
> confused by all the different .profile options (there are at least 3 for
> bash, why is that?)

I don't know if there is such a system/program but I can help you clear things 
up.

Each of these files are read by bash at different times:

.bash_profile is executed when you login.
Stuff you put in there might be your PATH and other important environment 
variables.

.bashrc is used for non login shells. I'm not sure what that means. I know that 
RedHat

executes it everytime you start another shell (su to this user or simply 
calling bash
again)
You might want to put aliases in there but again I am not sure what that means. 
I
simply ignore it myself.

.profile is the equivalent of .bash_profile for the root. I think the name is 
changed
to let other shells (csh, sh, tcsh) use it as well. (you don't need one as a 
user)

There is also .bash_logout wich executes at, yeah good guess...logout.
You might want to stop deamons or even make a little housekeeping .
You can also add "clear" there if you want to clear the screen when you log out.

I hope it helps you understand...

--
 Jean-Pierre Parent <[EMAIL PROTECTED]>


-- 
Unsubscribe?  mail -s unsubscribe [EMAIL PROTECTED] < /dev/null

Reply via email to