We would like to prevent users from using words such as the organisation name or their username as part of the password. The default behaviour of pam_cracklib when given a dictionary seems to be to disallow any passwords that are the words contained in the dictionary, as follows:
password required pam_cracklib.so dictpath=/usr/share/cracklib/pw_dict
This gives the following behaviour:
passwd username
Changing password for username.
New password: salesperson
BAD PASSWORD: it is based on a dictionary word.
^C
however, simply repeating the word passes:
passwd username
Changing password for username.
New password: salespersonsalesperson
Retype new password: salespersonsalesperson
Password changed.
Is there any way to modify the password policy to prevent this?
Thanks in advance.