RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1740167 - ipa-client-automount --uninstall is not restoring nsswitch.conf
Summary: ipa-client-automount --uninstall is not restoring nsswitch.conf
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: ipa
Version: 8.1
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: 8.1
Assignee: Thomas Woerner
QA Contact: ipa-qe
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-08-12 12:01 UTC by anuja
Modified: 2020-11-14 06:43 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-11-05 20:53:27 UTC
Type: Bug
Target Upstream Version:
Embargoed:
pm-rhel: mirror+


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:3348 0 None None None 2019-11-05 20:53:37 UTC

Description anuja 2019-08-12 12:01:33 UTC
Description of problem:
ipa-client-automount --uninstall is not restoring  nsswitch.conf 

Version-Release number of selected component (if applicable):
ipa-client-4.8.0-6.module+el8.1.0+3869+84a20141.x86_64

Steps to Reproduce:
1: Install ipa-server and ipa-client
2: setup ipa-client-automount with --no-sssd 
3: run ipa-client-automount --uninstall

Actual results:
# cat /etc/nsswitch.conf  | grep automount
automount: files ldap

Expected results:
# cat /etc/nsswitch.conf  | grep automount
automount:  sss files

Or it should restore properly

Comment 2 François Cami 2019-08-12 15:19:54 UTC
Upstream ticket:
https://pagure.io/freeipa/issue/8038

Comment 3 François Cami 2019-08-13 12:46:56 UTC
Rob explained the behavior was changed in https://pagure.io/freeipa/c/a0e846f56c8de3b549d1d284087131da13135e34?branch=master
to attend to the following scenario: 

set automount to files in /etc/nssswitch.conf
ipa-client-install
grep automount /etc/nsswitch.conf (should be sss files)
ipa-client-automount --no-sssd
grep automount /etc/nsswitch.conf (should be files ldap)
ipa-client-automount --uninstall -U
grep automount /etc/nsswitch.conf will be files, the original state

because we cannot stack file backups in the filestore and ipa-client-install already backups nsswitch.conf.

Comment 12 anuja 2019-09-03 14:50:12 UTC
Verified using version :
 ipa-server-4.8.0-10.module+el8.1.0+4098+f286395e.x86_64

Verified using existing downstream test-suite

[ci-vm-10-0-153-60.ho] ::   install then uninstall
[ci-vm-10-0-153-60.ho] ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
[ci-vm-10-0-153-60.ho] :: [ 09:32:15 ] :: [   PASS   ] :: clean up ipa-client-automount success 
[ci-vm-10-0-153-60.ho] :: [ 09:32:15 ] :: [  BEGIN   ] :: Running 'ipa-client-automount --server=ci-vm-10-0-153-37.testrelm.test --location=Location__A -U'
[ci-vm-10-0-153-60.ho] IPA server: ci-vm-10-0-153-37.testrelm.test
[ci-vm-10-0-153-60.ho] Location: Location__A
[ci-vm-10-0-153-60.ho] Configured /etc/idmapd.conf
[ci-vm-10-0-153-60.ho] Restarting sssd, waiting for it to become available.
[ci-vm-10-0-153-60.ho] Started autofs
[ci-vm-10-0-153-60.ho] :: [ 09:32:19 ] :: [   PASS   ] :: Command 'ipa-client-automount --server=ci-vm-10-0-153-37.testrelm.test --location=Location__A -U' (Expected 0, got 0)
[ci-vm-10-0-153-60.ho] :: [ 09:32:19 ] :: [   PASS   ] :: [/etc/nsswitch.conf] contains expected [^automount:  sss files] 
[ci-vm-10-0-153-60.ho] :: [ 09:32:19 ] :: [   PASS   ] :: [/etc/idmapd.conf] contains expected [^Domain = testrelm.test$] 
[ci-vm-10-0-153-60.ho] :: [ 09:32:19 ] :: [  BEGIN   ] :: Running 'ipa-client-automount --uninstall -U'
[ci-vm-10-0-153-60.ho] Restoring configuration
[ci-vm-10-0-153-60.ho] :: [ 09:32:22 ] :: [   PASS   ] :: Command 'ipa-client-automount --uninstall -U' (Expected 0, got 0)
[ci-vm-10-0-153-60.ho] :: [ 09:32:22 ] :: [   PASS   ] :: [/etc/nsswitch.conf] contains expected [^automount:  sss files] 
[ci-vm-10-0-153-60.ho] :: [ 09:32:22 ] :: [   PASS   ] :: [/etc/idmapd.conf] does NOT contain [^Domain = testrelm.test$], this is expected

Comment 15 errata-xmlrpc 2019-11-05 20:53:27 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/RHBA-2019:3348


Note You need to log in before you can comment on or make changes to this bug.