Set Password Complexity/Policy with pam_pwquality in Red Hat Enterprise Linux 8, 9
Issue
- Set the following Password Policy & Complexity requirements in Red Hat Enterprise Linux 8:
- Enforce password complexity for root.
- Password size (Minimum acceptable length for the new password).
- Set a limit to the number of digits in the password.
- Set a limit to the number of Upper Case characters in the password.
- Set a limit to the number of Lower Case characters in the password.
- Set a limit to the number of Other characters in the password.
- Set a minimum number of required classes in the password (digits, uppercase, lowercase, others).
- Set a maximum number of allowed consecutive same characters in the password.
- Set a maximum number of allowed consecutive characters of the same class in the password.
- Set the number of characters from the old password that must not be present in the new password.
- User should not be allowed to contain username in the password.
Environment
- Red Hat Enterprise Linux 8
- Red Hat Enterprise Linux 9
- pam_pwquality
- /etc/security/pwquality.conf
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.