I know cracklib-check can be used to check individual password, like -

$ echo "12345" | /usr/sbin/cracklib-check
12345: it is too short

If not wanting to be super-user as on Debian it requires to be superuser/root. The other way is of course to be superuser to do the same thing. I am/was wondering if there was a way to do in a list. Let's say I have a list of passwords which I would like cracklib-check to check against, is it possible ? If yes how ?


Yes - by piping in the list of candidate passwords from stdin.

$ man cracklib-check | grep -A 1 DESCR
       cracklib-check takes a list of passwords from stdin and checks \
       them via libcrack2's FascistCheck(3) sub routine.

$ cat test.txt

$ cat test.txt | cracklib-check 
pass1: it is too short
pass2: it is too short
pass3: it is too short
| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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