Bug 1366569

Summary: glibc: default nsswitch.conf should not set initgroups
Product: Red Hat Enterprise Linux 7 Reporter: Sudhir Menon <sumenon>
Component: glibcAssignee: Florian Weimer <fweimer>
Status: CLOSED ERRATA QA Contact: Sergey Kolosov <skolosov>
Severity: high Docs Contact: Aneta Šteflová Petrová <apetrova>
Priority: high    
Version: 7.3CC: abokovoy, ashankar, codonell, cww, fweimer, jhrozek, lslebodn, mcermak, mnewsome, mpetlan, pfrankli, pkis, sgoveas, skolosov, sumenon, tmraz, troels
Target Milestone: rcKeywords: ZStream
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glibc-2.17-158.el7 Doc Type: Known Issue
Doc Text:
Machines joined to a realm are not able to resolve centrally managed supplementary groups Installing an Identity Management (IdM) server or client does not add the `sss` option to the `initgroups` lookup entry in the `/etc/nsswitch.conf` file. As a consequence, looking up secondary groups for users managed by SSSD does not work as expected. As a work around, remove or comment out the line starting with `initgroups` in the `/etc/nsswitch.conf` file before the installation. This ensures that machines joined to the realm resolve centrally managed supplementary groups as expected.
Story Points: ---
Clone Of:
: 1371879 1388638 (view as bug list) Environment:
Last Closed: 2017-08-01 18:06:55 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: 751450    
Bug Blocks: 1304992, 1368973, 1388638, 1390370    
Attachments:
Description Flags
Workaround patch for authconfig none

Description Sudhir Menon 2016-08-12 10:55:23 UTC
Description of problem: ipa server/client install doesnot update initgroups with sss in nssswitch.conf file.

Version-Release number of selected component (if applicable):

[root@ipaserver ~]# cat /etc/redhat-release 
Red Hat Enterprise Linux Server release 7.3 Beta (Maipo)

ipa-server-4.4.0-7.el7.x86_64
sssd-1.14.0-18.el7.x86_64

How reproducible: Always


Steps to Reproduce:
1. Install RHEL7.3
2. Check the nssswitch.conf file for the below entry

[root@ipaserver yum.repos.d]# grep initgroups /etc/nsswitch.conf
initgroups: files

3. Install ipa-server and check the nssswitch.conf file.

passwd:     files sss
shadow:     files sss
group:      files sss
services:   files sss
netgroup:   nisplus sss
sudoers: files sss

Actual results: 
initgroups looksup only on files.
initgroups: files

grep authconfig /var/log/ipaclient-install.log 
2016-08-12T10:34:19Z DEBUG args=/usr/sbin/authconfig --enablesssdauth --update --enablesssd
2016-08-12T10:34:25Z DEBUG args=/usr/sbin/authconfig --update --nisdomain redlabs.qe

Expected results:
initgroups should also lookup sss
initgroups: files sss

Additional info:

Comment 3 Tomas Mraz 2016-08-12 11:23:52 UTC
This is a complex issue and probably a minor regression caused by fix for bug 1329508.

Authconfig when writing nsswitch.conf actually comments out the initgroups entry because just placing the sssd into it modifies the behaviour (or at least that was originally the case) that was expected by users and applications (see bug 751450).

So I believe proper fix for this bug is to comment out the initgroups entry in default nsswitch.conf configuration.

There is no fix for this problem in authconfig apart from reverting the fix for bug 1329508 - however I do not think this is a proper solution.

Comment 17 Jakub Hrozek 2016-08-29 14:22:33 UTC
Setting priority and severity to high/high.

In my opinion, this bug should be fixed in 7.3, because otherwise a domain member is not able to resolve supplementary groups, which is really a basic functionality.

Whether the fix comes in libc by removing the default initgroups line or in authconfig by changing the way nsswith.conf is generated is a detail from my point of view. But the case of installing a system and joining it to a domain with ipa-client-install is something we must fix.

Comment 18 Lukas Slebodnik 2016-08-29 15:32:21 UTC
BTW what will be a difference from glibc point of view between "removing default initgroups line" and adding sss to initgroups by default. "sss" is already a default for passwd and groups. But I know that initgrous is a little bit special case.

Comment 19 Tomas Mraz 2016-08-31 10:32:30 UTC
Created attachment 1196301 [details]
Workaround patch for authconfig

Comment 20 Martin Bašti 2016-08-31 12:56:33 UTC
*** Bug 1368973 has been marked as a duplicate of this bug. ***

Comment 29 errata-xmlrpc 2017-08-01 18:06:55 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://access.redhat.com/errata/RHSA-2017:1916