Bug 990688

Summary: [RFE] User's shells are not taken from AD when there is an IPA trust with AD
Product: Red Hat Enterprise Linux 7 Reporter: hgraham
Component: sssdAssignee: Jakub Hrozek <jhrozek>
Status: CLOSED ERRATA QA Contact: Kaushik Banerjee <kbanerje>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: dpal, grajaiya, jgalipea, lslebodn, mkosek, nsoman, pbrezina, sellis, sgoveas, spoore
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: sssd-1.12.1-3.el7 Doc Type: Enhancement
Doc Text:
Story Points: ---
Clone Of:
: 1168377 1187103 (view as bug list) Environment:
Last Closed: 2015-03-05 10:27:06 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1168377, 1187103, 1194039    

Description hgraham 2013-07-31 18:40:01 UTC
1. Proposed title of this feature request
Allow per user modification to login shell and home directory by reading the value from AD when there is a trusted relationship between AD and IPA.

2. Who is the customer behind the request?
Account: name (acct #1168178)
TAM customer: no
SRM customer: no
Strategic: no

3. What is the nature and description of the request?
Currently there is only a default template applied by SSSD for the login shell and the home directory. SSSD should be able to read the unix home directory and shell attribute from AD and use that. If the value doesn't exist then it can use a default value.

4. Why does the customer need this? (List the business requirements here)
He would like to customize home directories and login shells on a user by user basis.

5. How would the customer like to achieve this? (List the functional requirements here)

SSSD uses the unix login home directory and shell from AD.

The customer also suggested locally configuring an sssd value for each user. This may be possible with something like the "username map" option used in the smb.conf where another file is referenced that contains home directory and shell values for users.


6. For each functional requirement listed, specify how Red Hat and the customer can test to confirm the requirement is successfully implemented.

The home directory and shell attributes listed in AD are used.


7. Is there already an existing RFE upstream or in Red Hat Bugzilla?
A tracking bug was/is also going to be created in Red Hat Bugzilla by sbose
He said to create this one for SSSD as well.

8. Does the customer have any specific timeline dependencies and which release would they like to target (i.e. RHEL5, RHEL6)?
RHEL6

9. Is the sales team involved in this request and do they have any additional input?
no

10. List any affected packages or components.
sssd

11. Would the customer be able to assist in testing this functionality if implemented?
Yes, this is a tech preview for IPA and they are currently evaluating it.

Comment 1 Jakub Hrozek 2013-08-01 08:42:45 UTC
Upstream ticket:
https://fedorahosted.org/sssd/ticket/2041

Comment 3 Jakub Hrozek 2014-09-30 16:50:53 UTC
While testing this, you can also make sure that:
id $username

resolves into the complete group list even for users who have never logged in.

Comment 4 Jakub Hrozek 2014-09-30 16:51:12 UTC
* master: 28c70f003c7b330ab1d998a4eff1248d272a6ba9

Comment 6 Scott Poore 2015-01-28 19:06:44 UTC
This doesn't appear to be working now.

[root@django sssd]# rpm -q sssd
sssd-1.12.2-52.el7.x86_64

[root@django sssd]# ldapsearch -h win-i94qhqmthd4.adlabs.com -D "cn=Administrator,cn=Users,dc=adlabs,dc=com" -w Secret123 -b "CN=Aduser1 user,CN=Users,dc=adlabs,dc=com" "(&(objectclass=user)(objectcategory=person))" | egrep -i "unixHomeDirectory|loginShell"
unixHomeDirectory: /home/stv
loginShell: /bin/stv

[root@django sssd]# getent passwd Aduser1
aduser1:*:10013:10047:Aduser1 user:/home/adlabs.com/aduser1:/bin/stv

[root@django sssd]# grep -i homedir *
sssd_ipanew.test.log:(Thu Jan 29 00:23:29 2015) [sssd[be[ipanew.test]]] [sdap_get_map] (0x0400): Option ldap_user_home_directory has value homeDirectory
sssd_ipanew.test.log:(Thu Jan 29 00:23:29 2015) [sssd[be[ipanew.test]]] [sdap_get_map] (0x0400): Option ldap_user_home_directory has value homeDirectory
sssd_ipanew.test.log:(Thu Jan 29 00:23:31 2015) [sssd[be[ipanew.test]]] [sdap_copy_map] (0x0400): Option ldap_user_home_directory has value unixHomeDirectory
sssd_ipanew.test.log:(Thu Jan 29 00:23:31 2015) [sssd[be[ipanew.test]]] [sdap_copy_map] (0x0400): Option ldap_user_home_directory has value unixHomeDirectory
sssd_ipanew.test.log:(Thu Jan 29 00:23:37 2015) [sssd[be[ipanew.test]]] [sdap_get_generic_ext_step] (0x1000): Requesting attrs: [unixHomeDirectory]
sssd_ipanew.test.log:(Thu Jan 29 00:23:37 2015) [sssd[be[ipanew.test]]] [sdap_parse_range] (0x2000): No sub-attributes for [unixHomeDirectory]

Comment 7 Steeve Goveas 2015-01-29 11:12:56 UTC
Verified in version

[root@django ~]# rpm -q sssd
sssd-1.12.2-52.el7.x86_64

[root@django ~]# service sssd stop; rm -rf /var/lib/sss/{db,mc}/*; service sssd start

[root@django ~]# ldapsearch -h win-i94qhqmthd4.adlabs.com -D "cn=Administrator,cn=Users,dc=adlabs,dc=com" -w Secret123 -b "CN=Aduser1 user,CN=Users,dc=adlabs,dc=com" "(&(objectclass=user)(objectcategory=person))" | grep loginShell
loginShell: /bin/bash/bla

[root@django ~]# getent passwd aduser1
aduser1:*:10013:10047:Aduser1 user:/home/adlabs.com/aduser1:/bin/bash/bla

[root@django ~]# service sssd stop; rm -rf /var/lib/sss/{db,mc}/*; service sssd start

[root@django ~]# ldapsearch -h win-i94qhqmthd4.adlabs.com -D "cn=Administrator,cn=Users,dc=adlabs,dc=com" -w Secret123 -b "CN=Aduser1 user,CN=Users,dc=adlabs,dc=com" "(&(objectclass=user)(objectcategory=person))" | grep loginShell
loginShell: /bin/sh

[root@django ~]# getent passwd aduser1
aduser1:*:10013:10047:Aduser1 user:/home/adlabs.com/aduser1:/bin/sh

[root@django ~]# service sssd stop; rm -rf /var/lib/sss/{db,mc}/*; service sssd start

[root@django ~]# getent passwd aduser1
aduser1:*:10013:10047:Aduser1 user:/home/adlabs.com/aduser1:/bin/sh

Comment 9 errata-xmlrpc 2015-03-05 10:27:06 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