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 1651637 - authselect enable-features should error on unknown features
Summary: authselect enable-features should error on unknown features
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: authselect
Version: 8.0
Hardware: All
OS: Linux
unspecified
medium
Target Milestone: rc
: 8.0
Assignee: Pavel Březina
QA Contact: Steeve Goveas
URL:
Whiteboard:
: 1654674 (view as bug list)
Depends On: 1645708
Blocks: 1623566
TreeView+ depends on / blocked
 
Reported: 2018-11-20 13:05 UTC by Pavel Březina
Modified: 2021-12-10 18:19 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1645708
Environment:
Last Closed: 2019-06-14 01:30:08 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker RHELPLAN-20185 0 None None None 2021-12-10 18:19:21 UTC

Description Pavel Březina 2018-11-20 13:05:39 UTC
+++ This bug was initially created as a clone of Bug #1645708 +++

Description of problem:

# authselect current
Profile ID: sssd
Enabled features: None
# authselect enable-feature blah
# authselect current
Profile ID: sssd
Enabled features:
- blah

Version-Release number of selected component (if applicable):
authselect-1.0.1-2.fc29.x86_64

I get into trouble because to enable smartcard you enable "with-smartcard" instead of "with-smartcard".

--- Additional comment from Pavel Březina on 2018-11-06 04:47:06 EST ---

Thank you.

Upstream ticket:
https://github.com/pbrezina/authselect/issues/107

--- Additional comment from Pavel Březina on 2018-11-20 07:55:48 EST ---

Can you please try this scratch build?
https://koji.fedoraproject.org/koji/taskinfo?taskID=31016568

Calling `authselect select $profile unknown-feature` will result an
error and it will suggest the most relevant feature in case it is
only a typo.

$ authselect select sssd with-smartcards
[error] Unknown profile feature [with-smartcards], did you mean [with-smartcard]?
[error] Unable to activate profile [sssd] [22]: Invalid argument
Unable to activate profile [22]: Invalid argument

If feature is removed from profile, calling `authselect apply-changes`
will disable this feature and it will report it as a warning. This of course should not be common use case as profile should not drop a feature without a strong reason.

After manually removing with-sudo feature fortesting purpose:
$ sudo authselect apply-changes --warn 
[warn] Profile feature [with-sudo] is no longer supported, removing it...
Changes were successfully applied.

Comment 1 Pavel Březina 2018-11-29 12:47:20 UTC
*** Bug 1654674 has been marked as a duplicate of this bug. ***

Comment 4 Niranjan Mallapadi Raghavender 2019-01-11 13:46:53 UTC
Versions:
 authselect-libs-1.0-9.el8.x86_64
authselect-1.0-9.el8.x86_64
authselect-compat-1.0-9.el8.x86_64


authselect select sssd with-smartcards
[error] Unknown profile feature [with-smartcards], did you mean [with-smartcard]?
[error] Unable to activate profile [sssd] [22]: Invalid argument
Unable to activate profile [22]: Invalid argument
[root@host-8-250-14 ~]# authselect select sssd with-smartcard
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.
 
- with-smartcard is selected, make sure smartcard authentication is enabled in sssd.conf:
  - set "pam_cert_auth = True" in [pam] section

Comment 5 Niranjan Mallapadi Raghavender 2019-01-14 12:52:04 UTC
Reproducing the issue:

[root@client-4948 ~]# rpm -qa | grep authselect
authselect-1.0.1-2.fc28.x86_64
authselect-devel-1.0.1-2.fc28.x86_64
authselect-libs-1.0.1-2.fc28.x86_64
authselect-compat-1.0.1-2.fc28.x86_64


[root@client-4948 ~]# authselect select sssd with-smartcards
[error] [/etc/authselect/nsswitch.conf] has unexpected content!
[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 --force parameter if you want to overwrite these changes.


The above error is fixed with below version:
Versions:
 authselect-libs-1.0-9.el8.x86_64
authselect-1.0-9.el8.x86_64
authselect-compat-1.0-9.el8.x86_64


authselect select sssd with-smartcards
[error] Unknown profile feature [with-smartcards], did you mean [with-smartcard]?
[error] Unable to activate profile [sssd] [22]: Invalid argument
Unable to activate profile [22]: Invalid argument
[root@host-8-250-14 ~]# authselect select sssd with-smartcard
Profile "sssd" was selected.
The following nsswitch maps are overwritten by the profile:
- passwd
- group
- netgroup
- automount
- services

Make sure that SSSD service is configured and enabled. See SSSD documentation for more information.
 
- with-smartcard is selected, make sure smartcard authentication is enabled in sssd.conf:
  - set "pam_cert_auth = True" in [pam] section


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