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  >

KB-3532: Centrify-enabled OpenSSH alters $PATH

Centrify DirectControl ,  

12 April,16 at 11:18 AM

Applies to: Centrify-enabled OpenSSH earlier than 6.0p1 on all platforms
When logging in over ssh as a normal user, the following behavior is observed:
-bash-3.2$ echo $PATH
Then sudo to root or using su -:
yourhost# echo $PATH
Now after logging in over ssh as root directly:
yourhost# echo $PATH
The results show that Centrify OpenSSH alters the PATH variable by putting /usr/share/centrifydc/(s)bin and /usr/local/(s)bin BEFORE the system paths. This is unexpected behaviour and did not happen with the previous version of Centrify OpenSSH. This breaks applications. Centrify pushes its own preferred path order ahead of the normal system path order. 
Why does this happen?
In the current design (OpenSSH 6.0p1), it is true that Centrify puts /usr/share/centrifydc/(s)bin and /usr/local/(s)bin before the system paths.  
On RedHat systems, /etc/profile.d/ takes care of $PATH. However in Solaris, there is no /etc/profile.d directory.
Centrify has been asked to provide several different default PATH settings from sshd. This is before invoking shell, and primarily affects ssh -c processing. 
Since OpenSSH has this as a BUILD option, it is favorable for some environments, but may cause issues for others.
In Centrify DirectControl 5.1.0 OpenSSH (based on 6.0p1), the Centrify distro of OpenSSH has this as a configurable run-time option (DefEnvPATH), so as to allow customization of the desired setting. 
myhost@/home/joe:~$ s cat /etc/centrifydc/ssh/sshd_config|grep DefEnv
DefEnvPATH /home/joe:/usr/bin:/usr/local/bin:/bin
The desired $PATH can be defined here.

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