Bug 1137015

Summary: [RFE] User Principal Name as a template expansion for homedir mappings
Product: Red Hat Enterprise Linux 7 Reporter: Jakub Hrozek <jhrozek>
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: dpal, grajaiya, jgalipea, lslebodn, mkosek, pbrezina, preichl
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: sssd-1.12.2-1.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-03-05 10:33:41 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jakub Hrozek 2014-09-03 20:25:02 UTC
This bug is created as a clone of upstream ticket:
https://fedorahosted.org/sssd/ticket/2340

When using Enterprise Principal Names there's some situations where additional home directory mappings became important.

As example if we have two different UPNs in the same domain under the same username we have a conflict in the actual default mapping of home directories.

So a new variable with the relative domain should be enabled to map home directories, as example:

john           -> /home/example.com/john [pattern: /home/%principalName/%username
john.com  -> /home/sales.example.com/john

Comment 1 Jakub Hrozek 2014-10-12 16:53:43 UTC
Pushed upstream:
    master: adf9c23d663c308cfeeaa5ad0a33c399c85b27ec

Comment 3 Kaushik Banerjee 2015-01-07 06:10:24 UTC
Verified with sssd-1.12.2-39.el7

Report from beaker automation run:
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: upn_override_homedir_01: BZ1137015 override_homedir=/home/%P/%u in [nss]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'getent passwd testuser01-${JOBID}@$AD_DOMAIN1 | grep "/home/testuser01-${JOBID}@$AD_SERVER1_REALM/testuser01-${JOBID}"' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 1 good, 0 bad
:: [   PASS   ] :: RESULT: upn_override_homedir_01: BZ1137015 override_homedir=/home/%P/%u in [nss]

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: upn_override_homedir_02: override_homedir=/home/%P/%u in [domain/DOMAIN]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'getent passwd testuser01-${JOBID}@$AD_DOMAIN1 | grep "/home/testuser01-${JOBID}@$AD_SERVER1_REALM/testuser01-${JOBID}"' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 9s
:: [   LOG    ] :: Assertions: 1 good, 0 bad
:: [   PASS   ] :: RESULT: upn_override_homedir_02: override_homedir=/home/%P/%u in [domain/DOMAIN]

::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: [   LOG    ] :: upn_override_homedir_03: override_homedir in both [nss] and [domain/DOMAIN]
::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::

:: [   PASS   ] :: Command 'getent passwd testuser01-${JOBID}@$AD_DOMAIN1 | grep "/home/testuser01-${JOBID}/testuser01-${JOBID}@$AD_SERVER1_REALM"' (Expected 0, got 0)
:: [   LOG    ] :: Duration: 10s
:: [   LOG    ] :: Assertions: 0 good, 1 bad
:: [   PASS   ] :: RESULT: upn_override_homedir_03: override_homedir in both [nss] and [domain/DOMAIN]

Comment 5 errata-xmlrpc 2015-03-05 10:33:41 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2015-0441.html