Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There is a standard linux library which allows to set up checks for passwords users choose. But how can I just run from command line just to see whether a password will be accepted or rejected?

share|improve this question
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: 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… 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


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.