I'm trying to find a tool to validate the security of a password and I've come across cracklib
or libcrack2
(on Debian), which seems to be used a lot for the task and appears to do exactly what I wanted.
However, it does not really depict the requirements I imagined. For a lot of cases it does seem to have some appropriate checks (e.g. reversed dictionary-based words, too simplistic, ...).
The following explains what I mean:
$ echo "wordpass" | cracklib-check
wordpass: OK
Now, wordpass
is not what I imagine to be a secure password.
I do not have a specific password policy I'm following, nor do I have a certain value for the desired entropy of the password. Defining "secure" in terms of passwords is a complex task. Given the password is used for a Linux system using PAM, if an attacker is not able to crack it with rainbow tables or bruteforce it within a week, I'd consider it secure.
How could I simply verify the security of a given password on a Linux system?
EDIT: I've come across a more reasonable another tool, passwdqc
:
$ echo "wordpass" | pwqcheck -1
Bad passphrase (not enough different characters or classes for this length)
But, as mentioned by the user @Hector the question is very vague and in this form not really answerable, so I'll vote to close the question. but won't delete it as it may be usable for someone else who's not satisfied by the cracklib
approach.
$ echo "MyP@ssw0rd" | pwqcheck -1
OK