How To Check Password Strength In Linux With Cracklib
Password security is important subject in IT. We call it password but actually it is a key to enter systems. Making authentication password-less by using key based authentication is more secure but it is not always possible. So for the password based authentication password strength is important.
How Can We Make Passwords Strong
Actually making passwords strong is easy. Important thing is making this as default behauivour. Just typing more 5 character will make our systems like a castle.
- At leasts use 14 characters
- Use easy to remember expression
- Use . , ; ” ! more than 3 times
Ubuntu, Debian, Kali:
$ sudo apt-get install cracklib-runtime -y
Reading package lists... Done
Building dependency tree
Reading state information... Done
cracklib-runtime is already the newest version (2.9.2-3).
cracklib-runtime set to manually installed.
upgraded, newly installed, to remove and 15 not upgraded
$yum install cracklib.x86_64 -y
Try New Passwords
Now we will try our passwords against cracklib to check their strength
$echo "123456" | cracklib-check
123456: it is too simplistic/systematic
$echo "admin" | cracklib-check
admin: it is too short
$echo "3dAmI12." | cracklib-check
$echo "3dAmaf3445stI12." | cracklib-check