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 2179607 - password prompt is printed twice for local user on authselect sssd profile
Summary: password prompt is printed twice for local user on authselect sssd profile
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 8
Classification: Red Hat
Component: authselect
Version: 8.7
Hardware: All
OS: All
unspecified
low
Target Milestone: rc
: ---
Assignee: Pavel Březina
QA Contact: Dan Lavu
URL:
Whiteboard: sync-to-jira
: 1659100 (view as bug list)
Depends On:
Blocks: 2228098
TreeView+ depends on / blocked
 
Reported: 2023-03-19 03:30 UTC by Sunny Wu
Modified: 2023-11-14 18:14 UTC (History)
4 users (show)

Fixed In Version: authselect-1.2.6-2.el8
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
: 2228098 (view as bug list)
Environment:
Last Closed: 2023-11-14 15:51:37 UTC
Type: Bug
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Github SSSD sssd issues 5363 0 None closed "Current Password:" shows inappropriately when using passwd to change normal user 2023-08-01 12:53:15 UTC
Red Hat Issue Tracker RHELPLAN-152260 0 None None None 2023-03-19 03:32:10 UTC
Red Hat Issue Tracker SSSD-5782 0 None None None 2023-04-03 10:32:42 UTC
Red Hat Product Errata RHBA-2023:7175 0 None None None 2023-11-14 15:51:44 UTC

Description Sunny Wu 2023-03-19 03:30:06 UTC
Description of problem:

On a IdM/AD joined host where authselect sssd profile is selected, when a local user deliberately enters an incorrect password, a second password prompt is printed:

testuser1 is a local user which exist in /etc/passwd.

~~~
[testuser1@host ~]$ id
uid=1002(testuser1) gid=1002(testuser1) groups=1002(testuser1) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023

[testuser1@host ~]$ passwd
Changing password for user testuser1.
Current password:            <<<<<===== input incorrect password
Current Password:            <<<<<===== note a different password prompt, capital "P"
passwd: Authentication token manipulation error
~~~

Log message in /var/log/secure suggests that the second password prompt belongs to pam_sss:

~~~
unix_chkpwd[61458]: password check failed for user (testuser1)
passwd[61456]: pam_unix(passwd:chauthtok): authentication failure; logname= uid=1002 euid=0 tty=pts/2 ruser= rhost=  user=testuser1
passwd[61456]: pam_sss(passwd:chauthtok): Authentication failed for user testuser1: 4 (System error)
~~~

~~~
# cat system-auth 
<...>

password    requisite                                    pam_pwquality.so local_users_only
password    sufficient                                   pam_unix.so sha512 shadow nullok use_authtok
password    sufficient                                   pam_sss.so use_authtok
password    required                                     pam_deny.so
~~~

=========

The issue is resolved after adding "pam_localuser" to distinguish local users so that the user will not be evaluated by pam_sss.

~~~
password    requisite                                    pam_pwquality.so local_users_only
password    sufficient                                   pam_unix.so sha512 shadow nullok use_authtok
password    [success=1 default=ignore]                   pam_localuser.so
password    sufficient                                   pam_sss.so use_authtok
password    required                                     pam_deny.so
~~~


Version-Release number of selected component (if applicable):
# rpm -qa | grep authselect
authselect-libs-1.2.5-2.el8_7.x86_64
authselect-compat-1.2.5-2.el8_7.x86_64
authselect-1.2.5-2.el8_7.x86_64


How reproducible:
All the time

Actual results:
Password prompt is printed twice when incorrect password is entered

Expected results:
If incorrect password is entered, password prompt should be printed once and terminate/return failure.

Additional info:

Comment 1 Pavel Březina 2023-04-03 10:30:34 UTC
Thank you, I can reproduce the issue.

Upstream ticket: https://github.com/authselect/authselect/issues/338

Comment 2 Pavel Březina 2023-06-29 12:14:16 UTC
Upstream PR: https://github.com/authselect/authselect/pull/344

Comment 3 Alexey Tikhonov 2023-08-01 12:50:38 UTC
*** Bug 1659100 has been marked as a duplicate of this bug. ***

Comment 9 errata-xmlrpc 2023-11-14 15:51:37 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 (authselect bug fix and enhancement update), 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-2023:7175


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