How To Check Password Strength In Linux With Cracklib? – POFTUT

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. The important thing is making this a default behavior. Just typing more 5 characters will make our systems like a castle.

  • At least use 14 characters
  • Use easy to remember the expression
  • Use . , ; ” ! more than 3 times

Install Cracklib

Ubuntu, Debian, Kali, Mint:

We will install cracklib-runtime package with the following command for Ubuntu, Debian, Kali, and Mint.

Fedora, CentOS, RedHat:

cracklib is the package we will install in Fedora, CentOS, RedHat.

Check Given Password

There are different tools provided by cracklib but the most useful and important one is cracklib-check command. We will provide the password we want to check to the cracklib-check command as standard input.

Simplistic/systematic

We will check the password 123456 which is insecure as we know.

Simplistic/systematic

Simplistic/systematic

Too Short

it is too short message means we need to use more characters than given password.

Too Short

Too Short

Ok or Password Is Secure

If the given password is secure the OK message is printed to the screen.

Ok or Password Is Secure

Ok or Password Is Secure

Check Multiple Password From File

If checking passwords one by one is long process we can check password with a single run by providing them from a file. In this example we will write all passwords into file named pass and redirect to the cracklib-check command like below.

LEARN MORE  How To Prevent SQL Injection in Php Applications?

Check Multiple Password From File

Check Multiple Password From File

 

How To Check Password Strength In Linux With Cracklib? Infografic

How To Check Password Strength In Linux With Cracklib? Infografic

How To Check Password Strength In Linux With Cracklib? Infografic

Leave a Reply

Your email address will not be published. Required fields are marked *