Why bash not reading /etc/profile on login?

Why bash not reading /etc/profile on login?

Post by Stuart Mart » Sat, 11 Feb 1995 23:26:23




>I use bash for root, and when I login to root or su to root, /etc/profile
>is not being read. what does the .bash look at on startup?

>I'm sure, because my aliases in /etc/profile are not available until I
>manually source it. I'm getting tired of typing in source /etc/profile,
>so if  you have seen this before please help me out.

>Tanks,

>Yogi

su -
or
su --login both execute a full login for su, reading all aliases.

wavey

 
 
 

Why bash not reading /etc/profile on login?

Post by Yog » Sat, 11 Feb 1995 19:39:50


I use bash for root, and when I login to root or su to root, /etc/profile
is not being read. what does the .bash look at on startup?

I'm sure, because my aliases in /etc/profile are not available until I
manually source it. I'm getting tired of typing in source /etc/profile,
so if  you have seen this before please help me out.

Tanks,

Yogi

 
 
 

Why bash not reading /etc/profile on login?

Post by Craig Shrimpt » Mon, 13 Feb 1995 23:11:05


: I use bash for root, and when I login to root or su to root, /etc/profile
: is not being read. what does the .bash look at on startup?

: I'm sure, because my aliases in /etc/profile are not available until I
: manually source it. I'm getting tired of typing in source /etc/profile,
: so if  you have seen this before please help me out.

If you su to root, make sure you use su -
The minus tells bash to re-read profile.

As far as a normal login to root you might have a conflicting profile in
/root.  Copy /etc/profile to /root/.bash_profile and rename an existing
/root/.profile to something else if it exists.

--Craig