Incorrect Module Order in /etc/pam.d/common-password May Cause Password Change Errors
This document (000021779) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 15 all Service Packs
Situation
Ordinary users encounter an error message when attempting to change their password.
testuser@SUSE-8452:~> passwd
Changing password for testuser.
Current password:
New password:
Retype new password:
Password has been already used. Choose another.
passwd: Have exhausted maximum number of retries for service
passwd: password unchanged ------------> getting this error but password changed
testuser@SUSE-8452:~> logout
Resolution
Adjust the Order of the Configuration Update the sequence of modules in /etc/pam.d/common-password to ensure proper functionality.
* Original Configuration:
password requisite pam_cracklib.so try_first_pass retry=5 dsfok=3 minlen=15 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=-1 reject_username
password optional pam_gnome_keyring.so use_authtok
password required pam_unix.so sha512 use_authtok nullok shadow md5 try_first_pass
password required pam_pwhistory.so remember=6
* Modified Configuration:
password requisite pam_cracklib.so try_first_pass retry=5 dsfok=3 minlen=15 dcredit=-1 ucredit=-1 lcredit=-1 ocredit=-1 reject_username
password required pam_pwhistory.so remember=6
password optional pam_gnome_keyring.so use_authtok
password required pam_unix.so sha512 use_authtok nullok shadow md5 try_first_pass
Cause
The pam_pwhistory
module is a "check" password module, and the pam_unix
module is a "write" password module.
The correct order ensures that the password is checked before it is written.
Therefore, the pam_pwhistory
module must be placed before the pam_unix
module.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021779
- Creation Date: 09-Apr-2025
- Modified Date:09-Apr-2025
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com