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-9171: Env variable changed when su from root on 5.4.0+

Centrify DirectControl ,  

7 November,17 at 08:19 AM

Applies to: Centrify Infrastructure Services version 5.4.0 & 5.4.1

Problem:
When # su from root to AD user, some environment variables below are not set:

==================================================
CDC_JOINED_DOMAIN=alanho.lab
CDC_JOINED_DC=win2012.alanho.lab
CDC_JOINED_SITE=Default-First-Site-Name
CDC_JOINED_ZONE=CN=TestingZone1,CN=Zones,CN=Centrify,CN=Program Data,DC=alanho,DC=lab
CDC_LOCALHOST=centos71.alanho.lab
DA_SESSION_ID=674a1d9c-372c-8d4d-951b-09238bf50256
==================================================

When AD user successfully logins Unix workstation and run # env, Centrify variables like CDC_JOINED_DOMAIN & CDC_JOINED_SITE are returned.
But when root # su to any AD user, there is no Centrify variable when running # env.
 
Root cause:
This happens for the following situations:
(1) # su from root
(2) # sudo/dzdo su - <ad user>

When root performs "#su", it bypasses pam_authenticate while root is not needed for authentication while switching to other users. As result, there is no user credential (like Kerberos ticket) for this session.
Pam module sets environment variables and create home directory (if necessary), so skipping the pam module will lead to those variables not set by pam_open_session.
 
Resolution:
This is related to issue with # su, The issue is fixed in Suite 2017.2.

 

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