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 under Linux

2025-04-04 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

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

In this article, the editor introduces in detail "how to use cracklib and pwscore under Linux". The content is detailed, the steps are clear, and the details are handled properly. I hope this article "how to use cracklib and pwscore under Linux" can help you solve your doubts.

1. Introduction of cracklib

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-checkpassword: 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 "meteorology 2wagons fgty6723" | cracklibMurcheck Metrology fgty6723: OK II. Introduction to pwscore

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" | pwscorePassword quality check failed:The password fails the dictionary check-it is based ona dictionary word$ echo "123" | pwscorePassword 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" | pwscore90 has read this article "how to use cracklib and pwscore under Linux". If you want to master the knowledge of this article, you still need to practice and use it before you can understand it. If you want to know more about related articles, please follow the industry information channel.

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

Development

Wechat

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

12
Report