1

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 ?

shirish
  • 151
  • 4

1 Answers1

1

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

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

$ cat test.txt
pass1
pass2
pass3

$ cat test.txt | cracklib-check 
pass1: it is too short
pass2: it is too short
pass3: it is too short
Royce Williams
  • 9,128
  • 1
  • 31
  • 55