Using Linux security tools to detect password

The importance of passwords, I believe we are self-evident. The password leak or information leakage, often after another appeared, very hard to detect. Therefore, a strong and complex passwords is the first step to ensure the security of their own accounts.

In order to prevent information leakage, what can we do about it?

  • Password complex enough;

  • Not the same password for each platform, such as QQ, micro letter, mail, etc;

  • Change your password regularly.

That kind of password is considered a more reliable password? Generally, a password of at least 12 characters, including digital, comprising a case, comprising special symbols, without using an existing word, that is a more complex password.

What do you think safer password, whether real security? Here Liang Xu Jieshao two tools can be used to assess the safety of your password -  cracklib and  pwscore .

cracklib Introduction

1. cracklib installation

cracklib can be used to detect whether your password is reliable in most distributions can be installed directly in the tool.

For the  Fedora release system, you can use the  dnf command to install cracklib:

$ sudo dnf install cracklib

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

$ sudo apt install libcrack2

For the  Arch release system, you can use the  pacman command to install:

$ sudo pacman -S cracklib

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

$ sudo yum install cracklib

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

$ sudo zypper install cracklib

2. cracklib use

We direct look at a few examples.

If your password contains the names, places, or we common words, then you will be prompted  it is based on a dictionary word :

$ echo "password" | cracklib-check
password: it is based on a dictionary word

Under Linux the default password length is seven characters, if your password is less than seven characters, you will be prompted  it is WAY too short :

$ echo "123" | cracklib-check 
123: it is WAY too short

If your password is relatively strong, it will be prompted  OK :

$ echo "ME$2w!@fgty6723" | cracklib-check
ME!@fgty6723: OK

pwscore Introduction

We use cracklib tool can only judge whether a password security, but the specific do not know how safe it is. The pwscore tool will be able to tell you that your password strength can play a bit.

1. pwscore installation

Similarly, for most Linux distributions, can be installed directly  pwscore tools. Installation and cracklib similar, just cracklib into pwscore can be. Here we introduce  Debian/Ubuntu Department release before the rest of the similar:

$ sudo apt install libpwquality

2. pwscore of use

Similarly directly look at a few examples.

And cracklib Similarly, if your password contains the names, places, or we common words, then will be prompted  it is based on a dictionary word ; if the password length is less than seven characters, will be prompted  it is WAY too short .

$ 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 characters

If your password is normative, then it will give you the fight corresponding score:

$ echo "ME!@fgty6723" | pwscore
90

summary

Although hackers to steal your personal data, method and charming, but a strong password is your first step to protect your sensitive data. Network itself is not 100% safe, then if you use a password to break easily Mei, that the next Pornographic may soon appear again ......

Guess you like

Origin blog.csdn.net/boazheng/article/details/90605541