Tips for finding Knowledge Articles

  • - Enter just a few key words related to your question or problem
  • - Add Key words to refine your search as necessary
  • - Do not use punctuation
  • - Search is not case sensitive
  • - Avoid non-descriptive filler words like "how", "the", "what", etc.
  • - If you do not find what you are looking for the first time,reduce the number of key words you enter and try searching again.
  • - Minimum supported Internet Explorer version is IE9
Home  >
article

KB-1618: Why is user's local profile .bashrc not getting executed starting with Centrify-Enabled OpenSSH 5.2p1-4.3.1.139 ?

Centrify DirectControl ,  

12 April,16 at 11:12 AM

Applies to: Centrify-Enabled OpenSSH 5.2p1-4.3.1.139 on SuSe Linux Enterprise 10 and RedHat EL 4

Question:

In previous versions of Centrify-Enabled Openssh, one used to be able to run 'ssh hostname "printenv"' remotely and it would give you the full output of env. However, with Centrify-Enabled OpenSSH 5.2p1-4.3.1.139, executing the same ssh command will only yield a partial output of env.

Why is user's local profile .bashrc not getting executed starting with Centrify-Enabled OpenSSH 5.2p1-4.3.1.139 ?

Answer:

1) The .bashrc should be read by bash only when the shell is interactive or when the stdin is a socket. In the Openssh 5.0p1 and previous versions, the stdin was socket but that had caused other problems. Now the stdin is pipe and thus the .bashrc is not read.


2) The bash in RedHat Linux versions disabled SSH_SOURCE_BASHRC by default. See code from bash-3.2-24.el5.src.rpm: bash-3.2/config-top.h:

/* Define this if you want bash to try to check whether it's being run by sshd and source the .bashrc if so (like the rshd behavior). */
/* #define SSH_SOURCE_BASHRC */

For a workaround, please refer to RedHat bugs links below:

https://bugzilla.redhat.com/show_bug.cgi?id=468054
https://bugzilla.redhat.com/show_bug.cgi?id=458839

Or simply revert back to Centrify-Enabled Openssh 5.0p1
 

Still have questions? Click here to log a technical support case, or collaborate with your peers in Centrify's Online Community.