Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

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.
share|improve this answer
    
It accepts passwords such as nicegrape, tapitout, peachgrape, peachcobbler. Shouldn't dictionary check look for concatenated words? –  Babu Srinivasan Jul 3 '13 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. –  Sampo Sarrala Dec 17 '13 at 23:23

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.