Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to use cracklib and pwscore to evaluate password security

2025-03-30 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

This article is about how to use cracklib and pwscore to evaluate the security of passwords. The editor thinks it is very practical, so share it with you as a reference and follow the editor to have a look.

Cracklib introduction

1. Installation of cracklib

Cracklib can be used to check whether your password is reliable, and it can be installed directly in most distributions.

For Fedora distributions, you can install cracklib using the dnf command:

$sudo dnf install cracklib

For Debian/Ubuntu distributions, you can use the apt-get command to install:

$sudo apt install libcrack2

For distributions of Arch systems, you can use the pacman command to install:

$sudo pacman-S cracklib

For RHEL/CentOS distributions, you can use the yum command to install:

$sudo yum install cracklib

For openSUSE distributions, you can use the zypper command to install:

$sudo zypper install cracklib

2. The use of cracklib

Let's go straight to a few examples.

If your password contains the names of people, places, or words that we often use, you will be prompted to it is based ona dictionary word:

$echo "password" | cracklib-check

Password: it is based ona dictionary word

The default password length under Linux is 7 characters. If your password is less than 7 characters, you will be prompted to it is WAY too short:

$echo "123" | cracklib-check

123: it is WAY too short

If your password is strong, you will prompt OK:

$echo "MEASURMENT 2way.fgty6723" | cracklib-check

Meteorology fgty6723: OK

Pwscore introduction

We can only use the cracklib tool to determine whether a password is secure, but we don't know exactly how secure it is. The pwscore tool can tell you how much your password strength can be scored.

1. Installation of pwscore

Similarly, for most Linux distributions, you can install the pwscore tool directly. The installation process is similar to cracklib, just change cracklib to pwscore. Here is the installation of the Debian/Ubuntu distribution, and the rest are similar:

$sudo apt install libpwquality

2. The use of pwscore

Let's also take a look at a few examples directly.

Similar to cracklib, if your password contains the names of people, places, or words that we often use, you will be prompted it is based ona dictionary word; if your password is less than 7 characters, you will be prompted it is WAY too short.

$echo "password" | pwscore

Password quality check failed:

The password fails the dictionary check-it is based ona dictionary word

$echo "123" | pwscore

Password quality check failed:

The password is shorter than 8 characters

If your password conforms to the specification, it will give you a corresponding score:

$echo "Metrology fgty6723" | pwscore

ninety

Thank you for reading! This is the end of this article on "how to use cracklib and pwscore to evaluate password security". I hope the above content can be of some help to you, so that you can learn more knowledge. if you think the article is good, you can share it for more people to see!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report