I was working on a project recently and was asked if it was possible to stop users from setting common passwords. Using the pam_cracklib module and @DanielMiessler common passwords list it is as simple as these 3 commands:
sudo apt-get install libpam-cracklib -y sudo wget https://raw.githubusercontent.com/danielmiessler/SecLists/master/Passwords/10_million_password_list_top_1000000.txt /usr/share/dict/ -O /usr/share/dict/million.txt sudo create-cracklib-dict /usr/share/dict/million.txt
Seriously, that’s it.
Here is what a user will see when they attempt to use a password from the list: