Install libpam-pwquality by entering the following commands in the terminal:
sudo apt update sudo apt install libpam-pwquality
PAM module to check password strength
libpwquality's purpose is to provide common functions for password quality checking and also scoring them based on their apparent randomness. The library also provides a function for generating random passwords with good pronounceability. . This module can be plugged into the password stack of a given service to provide some plug-in strength-checking for passwords. The code was originaly based on pam_cracklib module and the module is backwards compatible with its options.