Bug 1028488 - authconfig --enablesssdauth wipes ldap from nsswitch.conf
authconfig --enablesssdauth wipes ldap from nsswitch.conf
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: authconfig (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Tomas Mraz
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-11-08 10:04 EST by Martin Kosek
Modified: 2015-02-17 14:08 EST (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-02-17 14:08:59 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Kosek 2013-11-08 10:04:09 EST
Description of problem:
authconfig deletes ldap from automount database in /etc/nsswitch conf when SSSD is being enabled:

# grep automount /etc/nsswitch.conf
automount:  files sss ldap

# ipa-client-install 
...
Client configuration complete.
# grep automount /etc/nsswitch.conf
automount:  files sss

This is the authconfig called by ipaclient-install.log that caused it:

/usr/sbin/authconfig --enablesssdauth --update --enablesssd

Version-Release number of selected component (if applicable):
authconfig-6.2.6-3.fc19.1.x86_64

How reproducible:
Always

Steps to Reproduce:
1. Add ldap as automount source to nsswitch.conf
2. Enable SSSD and SSSD auth by authconfig
3.

Actual results:
ldap source gets wiped out

Expected results:
existent ldap source stays

Additional info:
Comment 1 Martin Kosek 2013-11-08 10:05:38 EST
Related FreeIPA upstream ticket:
https://fedorahosted.org/freeipa/ticket/3996
Comment 2 Tomas Mraz 2013-11-08 10:11:57 EST
Do you have /usr/lib64/sssd/modules/libsss_autofs.so present on the system?
Comment 3 Tomas Mraz 2013-11-08 10:15:38 EST
Authconfig is by no means perfect and it cannot maintain all user modified configuration state perfectly. It cannot distinguish between having the ldap in the automount entry intentionally or not.
Comment 4 Martin Kosek 2013-11-11 03:11:47 EST
(In reply to Tomas Mraz from comment #2)
> Do you have /usr/lib64/sssd/modules/libsss_autofs.so present on the system?

Yes.

(In reply to Tomas Mraz from comment #3)
> Authconfig is by no means perfect and it cannot maintain all user modified
> configuration state perfectly. It cannot distinguish between having the ldap
> in the automount entry intentionally or not.

Just for my education - what is the risk with user having ldap source for automount? Given it is not default, one would assume it is there intentionally. What could it break?
Comment 5 Tomas Mraz 2013-11-11 04:23:33 EST
authconfig is really a simple tool without artificial intelligence. It really cannot distinguish between intentional configuration and stray misconfiguration from previous authconfig calls (for example authconfig --enableldap --update)
Comment 6 Martin Kosek 2013-11-11 04:28:14 EST
Sure, I get that it is a simple tool.

Question is if we should try to try to be smarter than user and try to fix such stray configuration. I would imagine that a more understandable behavior would be to force user to run:

# authconfig --disableldap --update

after he run a stray configuration command - instead of trying to fix supposedly stray configuration in a completely different command (--enablesssdauth --update --enablesssd in our case).

(also adding Dmitri for discussion)
Comment 7 Martin Kosek 2013-11-12 06:25:09 EST
Tomas, I would be interested in your opinion on Comment 6.
Comment 8 Tomas Mraz 2013-11-12 06:51:09 EST
I have not much to add. The stray configuration might come from other sources as well not only from authconfig --enableldap.
Comment 9 Dmitri Pal 2013-11-12 12:04:48 EST
Tomas,

Sorry I have to reopen it. I disagree with the assessment. I think it is generally wrong to remove something that you are not explicitly told to remove. It does not matter whether is it is ldap or nis or hesoid or something else. IMO it is bug, this is why I am reopening it. Whether is is a high priority one or not is a different story. I would suggest that QE team should chime in with the opinion. 
It is definitely not a blocker and I would live with a joint decision to not fix it especially if we decide that for RHEL8 we are going to change authconfig to be even more centred around SSSD.


Thanks
Dmitri
Comment 10 Tomas Mraz 2013-11-13 04:48:41 EST
You have to understand, that authconfig does it for other things such as PAM configuration as well. It is a slippery slope to think that authconfig can be a perfect tool that somehow magically modifies configuration files but can infer that user does not want to modify this or that "because why?".

Given the ldap is handled by authconfig --enableldap (and I know that this will set ldap for all NSS services not just automount, but that's not that relevant), authconfig will remove ldap if it does not see it as enabled.

I can guarantee you that leaving stray ldap would make different user to report it as a bug.

To me it is a real WONTFIX, I am sorry.
Comment 11 Brian J. Murrell 2013-12-20 12:21:31 EST
I also have to disagree here.  If the user has added ldap to the automount: entry, authconfig has no business removing it.  Tools should never assume they are smarter than the user, especially when the tool is already admittedly "simple".  The "simpler" the tool, the less it should assume it knows better than the user.
Comment 12 Fedora End Of Life 2015-01-09 15:31:51 EST
This message is a notice that Fedora 19 is now at end of life. Fedora 
has stopped maintaining and issuing updates for Fedora 19. It is 
Fedora's policy to close all bug reports from releases that are no 
longer maintained. Approximately 4 (four) weeks from now this bug will
be closed as EOL if it remains open with a Fedora 'version' of '19'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 19 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 13 Fedora End Of Life 2015-02-17 14:08:59 EST
Fedora 19 changed to end-of-life (EOL) status on 2015-01-06. Fedora 19 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.

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