The importance of the password, I believe everyone is self-evident. And password leakage or information leakage, often emerge in endlessly, it is impossible to prevent. So a strong and complex password is the first step to keeping your account secure.
What can be done to prevent information leakage?
- Passwords are complex enough;
- Each platform password is different, such as QQ, wechat, email, etc.;
- Change passwords regularly.
What kind of password is more reliable? Generally speaking, a password is at least 12 characters, contains numbers, contains case, contains special symbols, does not use existing words, is a more complex password.
Is your password, which you think is more secure, really secure? Here are two tools you can use to evaluate the security of your password — cracklib and PwScore.
Cracklib introduction
1. Cracklib installation
Cracklib can be used to check if your password is reliable and can be installed directly in most distributions.
For Fedora series distributions, you can install cracklib using the DNF command:
$ sudo dnf install cracklibCopy the code
For Debian/Ubuntu distributions, you can use apt-get to install:
$ sudo apt install libcrack2Copy the code
For distributions of the Arch system, you can install them using the pacman command:
$ sudo pacman -S cracklibCopy the code
For RHEL/CentOS distributions, you can use the yum command to install:
$ sudo yum install cracklibCopy the code
For openSUSE distributions, you can use the zypper command to install:
$ sudo zypper install cracklibCopy the code
2. Use of cracklib
Let’s go straight to a couple of examples.
It is based ona dictionary word if your password contains a person’s name or place name, or a word we commonly use:
$ echo "password" | cracklib-check
password: it is based on a dictionary wordCopy the code
The default password length is 7 characters. If your password length is less than 7 characters, the message “It is WAY too short” will be displayed:
$ echo "123" | cracklib-check
123: it is WAY too shortCopy the code
If your password is strong, it will prompt OK:
$ echo "ME$2w! @fgty6723" | cracklib-check ME! @fgty6723: OKCopy the code
Pwscore introduction
With cracklib, we can only determine if a password is secure, but we don’t know how secure it is. The pwScore tool tells you how strong your password is.
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’s how to install the Debian/Ubuntu distribution, and the rest is similar:
$ sudo apt install libpwqualityCopy the code
2. Use of PWScore
Again, let’s go straight to some examples.
Similar to cracklib, if your password contains a person’s name, a place name, or a word we commonly use, you will be prompted it is based ona dictionary word. If the password is shorter than 7 characters, the message “It is WAY too Short” is displayed.
$ echo "password" | pwscore Password quality check failed: The password fails the dictionary check - it is based on a dictionary word $ echo "123" | pwscore Password quality check failed: The password is shorter than 8 charactersCopy the code
If your password is valid, it will give you points:
$ echo "ME! @fgty6723" | pwscore 90Copy the code
summary
While hackers have 10,000 ways to steal your private data, a strong password is the first step in protecting your sensitive data. The Internet environment itself is not 100% secure, if you use a password that is easy to break, it may not be long before the next sexy photo gate appears again…
Finally, recently, many friends asked me for Linux learning roadmap, so I stayed up for a month in my spare time according to my own experience, and sorted out an e-book. Whether you are interviewing or self-improvement, I believe will help you! The directory is as follows:
Free to everyone, just ask everyone to point to me!
Ebook | Linux development learning roadmap
Also hope to have a small partner can join me, do this e-book more perfect!
Have a harvest? Hope the old iron people come to a triple whammy, give more people to see this article
Recommended reading:
- Dry goods | programmers advanced architect necessary resources free of charge
- Artifact | support resource site search