Bug 1785596

Summary: authselect & recovering to a clean state?
Product: [Fedora] Fedora Reporter: John Dodson <jwadodson>
Component: authselectAssignee: Pavel Březina <pbrezina>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 31CC: jhrozek, pbrezina
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: authselect-1.2-1.fc32 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-03-31 00:15:56 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:

Description John Dodson 2019-12-20 11:38:37 UTC
Description of problem:

# authselect apply-changes
[error] [/etc/authselect/nsswitch.conf] does not exist!
[error] [/etc/nsswitch.conf] is not a symbolic link!
[error] [/etc/nsswitch.conf] was not created by authselect!
[error] Unexpected changes to the configuration were detected.
[error] Refusing to activate profile unless those changes are removed or overwrite is requested.
Some unexpected changes to the configuration were detected. Use 'select' command instead.

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

authselect-libs-1.1-2.fc31.x86_64

How reproducible:
Upgrade to FC31
Now it's happened it's really hard to recover! & be sure you are starting with
the original files that should be there in FC31

Steps to Reproduce:
1. Have something screw up the various nsswitch.conf files
2. Try to recover to a known virginal state
3. 

Actual results:

The error messages above 
Expected results:
If I were the nsswitch.conf maintainers I'd want authselect never to touch it

Additional info:

What I think is needed is an explanation of what the relationships of these files is & how authselect messes with them during an "upgrade" where it's likely that the sysadmin should try to revert to a virginal state & work on that to get
what they want.

Comment 1 John Dodson 2019-12-20 12:01:28 UTC
On this statement: [/etc/nsswitch.conf] is not a symbolic link!

That was never a symlink on the machines I upgraded at least back to FC27/28

Comment 2 John Dodson 2019-12-20 12:02:36 UTC
Maybe I should say, "how do I revert to a state authselect will be happy with" ???

Comment 3 Pavel Březina 2020-01-06 12:52:38 UTC
Hi, authselect was first introduced in F27 (as opt-in), it is used to configure id & auth sources by default from F28 but only for new installations. If you are upgrading since F27 then authselect was never used (at least automatically).

When you called 'authselect apply-changes' it sees that authselect was not used to create existing configuration and therefore refuses to make any changes to your system. In order to configure your system with authselect, please use 'authselect select sssd --force', not the --force parameter which tells authselect that it is ok to change your non-authselect configuration.

Anaconda itself invokes this command: authselect select sssd with-fingerprint with-silent-lastlog --force

Is this answer sufficient?

Comment 4 John Dodson 2020-01-23 01:38:45 UTC
I suppose so, but I think there needs to be an understanding that people with old
configs will make the mistake of running authselect & end up in an indeterminate state
that needs to be recovered from in a consistent way that is then compatible with future
changes.

Comment 5 Pavel Březina 2020-01-27 11:22:00 UTC
So running authselect doesn't create an inderterminate state. It either succeeds or fails without touching the files.

Have you ever called 'authselect select' command before using 'authselect apply-changes'? Why did you need/want to call 'authselect apply-changes'?

Comment 6 John Dodson 2020-02-08 22:56:11 UTC
I (stupidly obviously) thought it was the right thing to do.
I obviously needed to understand authselect better.

I think I have now recovered to a minimal stand alone workstation state for /etc/nsswitch.conf
that will work for me.

So to get back to a "virgin workstation" mode,

         sssd with-fingerprint with-silent-lastlog --force

as invoked by Anaconda would be the way to go?

Comment 7 Pavel Březina 2020-02-11 11:06:00 UTC
Yes, this is the default after fresh installation.

I will try to improve authselect manual page.

Comment 8 Pavel Březina 2020-02-12 10:47:58 UTC
Do you think that these changes in manual page would help you?

https://github.com/pbrezina/authselect/pull/201/commits/fe6dee5501822746c2e2976649674539696dc7d7

Comment 9 John Dodson 2020-02-15 12:17:56 UTC
Yes, thanks.

Comment 10 Pavel Březina 2020-02-17 10:54:11 UTC
* `master`
  * f04ffd536962ecc8f8a903129846fbd36d333a70 - man: improve authselect documentation (how to opt-in and troubleshooting)

Comment 11 Fedora Update System 2020-03-04 12:09:53 UTC
FEDORA-2020-9f8d3d996d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9f8d3d996d

Comment 12 Fedora Update System 2020-03-04 20:15:14 UTC
authselect-1.2-1.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9f8d3d996d

Comment 13 Fedora Update System 2020-03-17 09:04:08 UTC
FEDORA-2020-9f8d3d996d has been submitted as an update to Fedora 32. https://bodhi.fedoraproject.org/updates/FEDORA-2020-9f8d3d996d

Comment 14 Fedora Update System 2020-03-18 02:38:04 UTC
authselect-1.2-1.fc32 has been pushed to the Fedora 32 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2020-9f8d3d996d

Comment 15 Fedora Update System 2020-03-31 00:15:56 UTC
FEDORA-2020-9f8d3d996d has been pushed to the Fedora 32 stable repository.
If problem still persists, please make note of it in this bug report.