
Passwdqc is a password/passphrase strength checking and policy enforcement toolset, including a pam module (libpam-passwdqc), command-line programs (pwqcheck and pwqgen), and a library (libpasswdqc0).
pam_passwdqc (optionally) integrates with pam such that it gets invoked when users change their passwords. the module is capable of checking password or passphrase strength, enforcing a policy, and offering randomly-generated passphrases, with all of these features being optional and easily (re-)configurable.