There is a standard linux library pam_cracklib.so which allows to set up checks for passwords users choose. But how can I just run pam_cracklib.so from command line just to see whether a password will be accepted or rejected?
1 Answer
You can use cracklib-check
program for that. It simply takes passwords from stdin
and outputs error/success messages to stdout
.
Few examples:
$ cracklib-check
Hello
Hello: it is too short.
$ cracklib-check
He4 X/%/32?+llo
He4 X/%/32?+llo: OK.
$ echo "He4 X/%/32?+llo" | cracklib-check
He4 X/%/32?+llo: OK.
-
It accepts passwords such as nicegrape, tapitout, peachgrape, peachcobbler. Shouldn't dictionary check look for concatenated words? Jul 3, 2013 at 11:49
-
@BabuSrinivasan See thegarywilson.com/blog/2006/… for cracklib configuration or maybe google for it. It depends on how you are using it / what extensions are installed for cracklib to use. Dec 17, 2013 at 23:23