Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I work on an AIX system where I have no administrator privileges. It has several shells installed, default being tcsh. I am not allowed to change the login shell. Usualy I start my session from exec bash. The problem is that I do not inherit the $PATH I had in tsch. The first strange thing is that some of the entries in my $PATH are duplicated, when I do exec bash. Another strange thing is that when I do exec bash --norc and then source .bashrc everything is fine -- I get the path from tcsh and some additions from my .bashrc.

I have tried commenting out my .bashrc enirely, but it gave no result -- I still do not get the $PATH from tcsh. It seems that the system wide /etc/profile is manipulating my $PATH. I tried running exec bash --noprofile, but I still see the changes, that are introduced by /etc/profile script (which I have no control over).

So in the end perhaps someone spotted a flaw in my investigation and can tell me how to invoke bash with inhereted $PATH or can suggest a way to do it without reading the global config scripts?

share|improve this question

closed as too localized by Gilles, studiohack Dec 8 '11 at 21:01

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

    
Did you try --norc as well to avoid system and local bashrc files? They could overwrite the path too. –  Paul Dec 8 '11 at 0:42
    
I did try as I have described in my question: "Another strange thing is that when I do exec bash --norc and then source .bashrc everything is fine -- I get the path from tcsh and some additions from my .bashrc" –  mezhaka Dec 8 '11 at 9:35
    
Reposted on Unix & Linux (and has answers there) –  Gilles Dec 8 '11 at 20:57