passwordcomplexitypam-nawazdhandala2026

2026-09-15

How to Configure Password Complexity Rules with PAM on Ubuntu

by Nawaz Dhandala (@nawazdhandala)

March 2, 2026

https://oneuptime.com/blog/post/2026-03-02-how-to-configure-password-complexity-rules-with-pam-on-ubuntu/view

Notes
weak passwords
unauthorized access
PAM
Ubuntu
pam_pwquality
password
etc/pam.d directory
pam_cracklib
root user
passwd command
chpasswd
libpam-pwquality package
Ubuntu 20.04
/etc/pam.d/common-password - PAM configuration file for password changes
/etc/security/pwquality.conf - configuration file for pwquality
requisite flag (PAM)
local_users_only - skips checks for non-local users (such as LDAP)
pam_pwhistory
password history
/etc/security/opasswd - password history file
chage command
/etc/login.defs
PASS_MIN_LEN - login.defs (obsolete)
UsePAM (OpenSSH)
difok - flag disallows setting passwords that differ by one character from old password
NIST SP 800-63B (password complexity guidance)

No notes link to this note