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:
Can you please post contents of /etc/pam.d/passwd /etc/pam.d/system-auth and /etc/pam.d/postlogin ?
[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
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.
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?
Unfortunately there is no way how to do that.
Pavel, please modify the authselect configuration according to comment 3.
Sumit, will the configuration in comment #3 work also for 2FA case?
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?
This sounds reasonable. I switch component to sssd and we will triage it there. Thank you Sumit.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to '31'.
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle. Changing version to 31.
This package has changed maintainer in the Fedora. Reassigning to the new maintainer of this component.
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.
This bug appears to have been reported against 'rawhide' during the Fedora 34 development cycle. Changing version to 34.
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.
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.