Bug 1615701 - Authentication failed if I type in the wrong password once
Summary: Authentication failed if I type in the wrong password once
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: sssd
Version: 34
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sumit Bose
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-08-14 04:51 UTC by lnie
Modified: 2022-06-08 00:51 UTC (History)
11 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2022-06-08 00:51:44 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
journal (148.59 KB, text/plain)
2018-08-14 04:51 UTC, lnie
no flags Details

Description lnie 2018-08-14 04:51:05 UTC
Created attachment 1475742 [details]
journal

Description of problem:
[lnie@localhost root]$ passwd
Changing password for user lnie.
Current password: 
Current Password: 
passwd: Authentication token manipulation error

The Authentication will always fail,ALA I type in the wrong password once,No matter I type in the right one or wrong one second time.


Version-Release number of selected component (if applicable):
passwd-0.80-4.fc29.x86_64

How reproducible:
always

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Tomas Mraz 2018-08-14 06:36:32 UTC
Can you please post contents of /etc/pam.d/passwd /etc/pam.d/system-auth and /etc/pam.d/postlogin ?

Comment 2 lnie 2018-08-14 06:45:41 UTC
[lnie@localhost cockpit-fedora]$ cat /etc/pam.d/passwd /etc/pam.d/system-auth /etc/pam.d/postlogin
#%PAM-1.0
# This tool only uses the password stack.
password   substack	system-auth
-password   optional	pam_gnome_keyring.so use_authtok
password   substack	postlogin
# Generated by authselect on Tue Aug 14 03:32:44 2018
# Do not modify this file manually.

auth        required                                     pam_env.so
auth        required                                     pam_faildelay.so delay=2000000
auth        sufficient                                   pam_fprintd.so
auth        [default=1 ignore=ignore success=ok]         pam_succeed_if.so uid >= 1000 quiet
auth        [default=1 ignore=ignore success=ok]         pam_localuser.so
auth        sufficient                                   pam_unix.so nullok try_first_pass
auth        requisite                                    pam_succeed_if.so uid >= 1000 quiet_success
auth        sufficient                                   pam_sss.so forward_pass
auth        required                                     pam_deny.so

account     required                                     pam_unix.so
account     sufficient                                   pam_localuser.so
account     sufficient                                   pam_succeed_if.so uid < 1000 quiet
account     [default=bad success=ok user_unknown=ignore] pam_sss.so
account     required                                     pam_permit.so

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

session     optional                                     pam_keyinit.so revoke
session     required                                     pam_limits.so
-session    optional                                     pam_systemd.so
session     [success=1 default=ignore]                   pam_succeed_if.so service in crond quiet use_uid
session     required                                     pam_unix.so
session     optional                                     pam_sss.so
# Generated by authselect on Tue Aug 14 03:32:44 2018
# Do not modify this file manually.



session     optional                   pam_umask.so silent
session     [success=1 default=ignore] pam_succeed_if.so service !~ gdm* service !~ su* quiet
session     [default=1]                pam_lastlog.so nowtmp silent
session     optional                   pam_lastlog.so silent noupdate showfailed

Comment 3 Tomas Mraz 2018-08-14 07:01:56 UTC
Could you try to replace system-auth line:
password    sufficient                                   pam_sss.so use_authtok

with:
password    sufficient      pam_sss.so use_authtok use_first_pass

With this change passwd should prompt only once and if you provide wrong password, it should just fail. You can then run it again.

Comment 4 lnie 2018-08-14 07:13:59 UTC
yeah,it just fails after wrong password is given,but maybe it's better to give users one more chance if they type in the wrong password accidently?

Comment 5 Tomas Mraz 2018-08-14 07:15:35 UTC
Unfortunately there is no way how to do that.

Comment 6 Tomas Mraz 2018-08-14 07:17:13 UTC
Pavel, please modify the authselect configuration according to comment 3.

Comment 7 Pavel Březina 2018-08-14 08:42:29 UTC
Sumit, will the configuration in comment #3 work also for 2FA case?

Comment 8 Sumit Bose 2018-08-17 12:44:54 UTC
I think using 'pam_sss.so use_authtok use_first_pass' should not be used even without 2FA.

While during 'auth' pam_sm_authenticate() of pam_unix.so unconditionally ask for a password, pam_sm_chauthtok() of pam_unix.so with is called during 'passwd' only asks if the user can be found in /etc/passwd (or is NIS if configured). So pam_unix.so will not ask for the current password and with 'use_first_pass' pam_sss.so will not ask as well and passwd fails without a prompt:

-bash-4.2$ LANG=C passwd
Changing password for user admin.
passwd: Authentication token manipulation error
-bash-4.2$ 

with the following in the journal:

Aug 17 14:41:27 ipaserver75.rhel75.devel passwd[3521]: pam_unix(passwd:chauthtok): user "admin" does not exist in /etc/passwd
Aug 17 14:41:27 ipaserver75.rhel75.devel passwd[3521]: pam_sss(passwd:chauthtok): Authentication failed for user admin: 15 (Authentication service cannot retrieve user credentials)


So maybe this should be better fixed on the SSSD side so that pam_sm_chauthtok() of pam_sss.so only asks for a password if the user is a SSSD user?

Comment 9 Pavel Březina 2018-08-20 07:14:20 UTC
This sounds reasonable. I switch component to sssd and we will triage it there. Thank you Sumit.

Comment 10 Ben Cotton 2019-08-13 16:56:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 11 Ben Cotton 2019-08-13 19:25:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 12 Fedora Admin user for bugzilla script actions 2020-06-18 14:59:30 UTC
This package has changed maintainer in the Fedora.
Reassigning to the new maintainer of this component.

Comment 13 Ben Cotton 2020-11-03 15:01:34 UTC
This message is a reminder that Fedora 31 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora 31 on 2020-11-24.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
Fedora 'version' of '31'.

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 31 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 14 Ben Cotton 2021-02-09 15:06:34 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle.
Changing version to 34.

Comment 15 Ben Cotton 2022-05-12 16:32:53 UTC
This message is a reminder that Fedora Linux 34 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 34 on 2022-06-07.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '34'.

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

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 34 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 Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 16 Ben Cotton 2022-06-08 00:51:44 UTC
Fedora Linux 34 entered end-of-life (EOL) status on 2022-06-07.

Fedora Linux 34 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.

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.