mirror of
https://github.com/LCTT/TranslateProject.git
synced 2024-12-26 21:30:55 +08:00
Merge remote-tracking branch 'LCTT/master'
This commit is contained in:
commit
16dfbb2597
@ -1,5 +1,5 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: ( )
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
|
@ -1,165 +0,0 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Check Password Complexity/Strength And Score In Linux?)
|
||||
[#]: via: (https://www.2daygeek.com/how-to-check-password-complexity-strength-and-score-in-linux/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
How To Check Password Complexity/Strength And Score In Linux?
|
||||
======
|
||||
|
||||
We all know the password importance. It’s a best practices to use hard and guess password.
|
||||
|
||||
Also, i advise you to use the different password for each services such as email, ftp, ssh, etc.,
|
||||
|
||||
In top of that i suggest you guys to change the password frequently to avoid an unnecessary hacking attempt.
|
||||
|
||||
By default RHEL and it’s clone uses `cracklib` module to check password strength.
|
||||
|
||||
We are going to teach you, how to check the password strength using cracklib module.
|
||||
|
||||
If you would like to check the password score which you have created then use the `pwscore` package.
|
||||
|
||||
If you would like to create a good password, basically it should have minimum 12-15 characters length.
|
||||
|
||||
It should be created in the following combinations like, Alphabets (Lower case & Upper case), Numbers and Special Characters.
|
||||
|
||||
There are many utilities are available in Linux to check a password complexity and we are going to discuss about `cracklib` module today.
|
||||
|
||||
### How To Install cracklib module In Linux?
|
||||
|
||||
The cracklib module is available in most of the distribution repository so, use the distribution official package manager to install it.
|
||||
|
||||
For **`Fedora`** system, use **[DNF Command][1]** to install cracklib.
|
||||
|
||||
```
|
||||
$ sudo dnf install cracklib
|
||||
```
|
||||
|
||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][2]** or **[APT Command][3]** to install libcrack2.
|
||||
|
||||
```
|
||||
$ sudo apt install libcrack2
|
||||
```
|
||||
|
||||
For **`Arch Linux`** based systems, use **[Pacman Command][4]** to install cracklib.
|
||||
|
||||
```
|
||||
$ sudo pacman -S cracklib
|
||||
```
|
||||
|
||||
For **`RHEL/CentOS`** systems, use **[YUM Command][5]** to install cracklib.
|
||||
|
||||
```
|
||||
$ sudo yum install cracklib
|
||||
```
|
||||
|
||||
For **`openSUSE Leap`** system, use **[Zypper Command][6]** to install cracklib.
|
||||
|
||||
```
|
||||
$ sudo zypper install cracklib
|
||||
```
|
||||
|
||||
### How To Use The cracklib module In Linux To Check Password Complexity?
|
||||
|
||||
I have added few example in this article to make you understand better about this module.
|
||||
|
||||
If you are given any words like, person name or place name or common word then you will be getting an message “it is based on a dictionary word”.
|
||||
|
||||
```
|
||||
$ echo "password" | cracklib-check
|
||||
password: it is based on a dictionary word
|
||||
```
|
||||
|
||||
The default password length in Linux is `Seven` characters. If you give any password less than seven characters then you will be getting an message “it is WAY too short”.
|
||||
|
||||
```
|
||||
$ echo "123" | cracklib-check
|
||||
123: it is WAY too short
|
||||
```
|
||||
|
||||
You will be getting `OK` When you give good password like us.
|
||||
|
||||
```
|
||||
$ echo "ME$2w!@fgty6723" | cracklib-check
|
||||
ME!@fgty6723: OK
|
||||
```
|
||||
|
||||
### How To Install pwscore In Linux?
|
||||
|
||||
The pwscore package is available in most of the distribution official repository so, use the distribution package manager to install it.
|
||||
|
||||
For **`Fedora`** system, use **[DNF Command][1]** to install libpwquality.
|
||||
|
||||
```
|
||||
$ sudo dnf install libpwquality
|
||||
```
|
||||
|
||||
For **`Debian/Ubuntu`** systems, use **[APT-GET Command][2]** or **[APT Command][3]** to install libpwquality.
|
||||
|
||||
```
|
||||
$ sudo apt install libpwquality
|
||||
```
|
||||
|
||||
For **`Arch Linux`** based systems, use **[Pacman Command][4]** to install libpwquality.
|
||||
|
||||
```
|
||||
$ sudo pacman -S libpwquality
|
||||
```
|
||||
|
||||
For **`RHEL/CentOS`** systems, use **[YUM Command][5]** to install libpwquality.
|
||||
|
||||
```
|
||||
$ sudo yum install libpwquality
|
||||
```
|
||||
|
||||
For **`openSUSE Leap`** system, use **[Zypper Command][6]** to install libpwquality.
|
||||
|
||||
```
|
||||
$ sudo zypper install libpwquality
|
||||
```
|
||||
|
||||
If you are given any words like, person name or place name or common word then you will be getting a message “it is based on a dictionary word”.
|
||||
|
||||
```
|
||||
$ echo "password" | pwscore
|
||||
Password quality check failed:
|
||||
The password fails the dictionary check - it is based on a dictionary word
|
||||
```
|
||||
|
||||
The default password length in Linux is `Seven` characters. If you give any password less than seven characters then you will be getting an message “it is WAY too short”.
|
||||
|
||||
```
|
||||
$ echo "123" | pwscore
|
||||
Password quality check failed:
|
||||
The password is shorter than 8 characters
|
||||
```
|
||||
|
||||
You will be getting `password score` When you give good password like us.
|
||||
|
||||
```
|
||||
$ echo "ME!@fgty6723" | pwscore
|
||||
90
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/how-to-check-password-complexity-strength-and-score-in-linux/
|
||||
|
||||
作者:[Magesh Maruthamuthu][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[译者ID](https://github.com/译者ID)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
|
||||
[2]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[3]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[4]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
|
||||
[5]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
|
||||
[6]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
@ -0,0 +1,165 @@
|
||||
[#]: collector: (lujun9972)
|
||||
[#]: translator: (geekpi)
|
||||
[#]: reviewer: ( )
|
||||
[#]: publisher: ( )
|
||||
[#]: url: ( )
|
||||
[#]: subject: (How To Check Password Complexity/Strength And Score In Linux?)
|
||||
[#]: via: (https://www.2daygeek.com/how-to-check-password-complexity-strength-and-score-in-linux/)
|
||||
[#]: author: (Magesh Maruthamuthu https://www.2daygeek.com/author/magesh/)
|
||||
|
||||
如何在 Linux 中检查密码的复杂性/强度和分数?
|
||||
======
|
||||
|
||||
我们都知道密码的重要性。这是使用难以猜测密码的最佳实践。
|
||||
|
||||
另外,我建议你为每个服务使用不同的密码,如电子邮件、ftp、ssh 等。
|
||||
|
||||
最重要的是,我建议你们经常更改密码,以避免不必要的黑客攻击。
|
||||
|
||||
默认情况下,RHEL 和它的衍生版使用 `cracklib` 模块来检查密码强度。
|
||||
|
||||
我们将教你如何使用 cracklib 模块检查密码强度。
|
||||
|
||||
如果你想检查你创建的密码分数,请使用 `pwscore` 包。
|
||||
|
||||
如果你想创建一个好密码,基本上它应该至少有 12-15 个字符长度。
|
||||
|
||||
它应该在以下组合创建,如字母(小写和大写)、数字和特殊字符。
|
||||
|
||||
Linux 中有许多程序可用于检查密码复杂性,我们今天将讨论有关 `cracklib` 模块。
|
||||
|
||||
### 如何在 Linux 中安装 cracklib 模块?
|
||||
|
||||
cracklib 模块在大多数发行版仓库中都有,因此,请使用发行版官方软件包管理器来安装它。
|
||||
|
||||
对于 **`Fedora`** 系统,使用 **[DNF 命令][1]**来安装 cracklib。
|
||||
|
||||
```
|
||||
$ sudo dnf install cracklib
|
||||
```
|
||||
|
||||
对于 **`Debian/Ubuntu`** 系统,使用 **[APT-GET 命令][2]** 或 **[APT 命令][3]**来安装 libcrack2。
|
||||
|
||||
```
|
||||
$ sudo apt install libcrack2
|
||||
```
|
||||
|
||||
对于基于 **`Arch Linux`** 的系统,使用 **[Pacman 命令][4]**来安装 cracklib。
|
||||
|
||||
```
|
||||
$ sudo pacman -S cracklib
|
||||
```
|
||||
|
||||
对于 **`RHEL/CentOS`** 系统,使用 **[YUM 命令][5]**来安装 cracklib。
|
||||
|
||||
```
|
||||
$ sudo yum install cracklib
|
||||
```
|
||||
|
||||
对于 **`openSUSE Leap`** 系统,使用 **[Zypper 命令][6]**来安装 cracklib。
|
||||
|
||||
```
|
||||
$ sudo zypper install cracklib
|
||||
```
|
||||
|
||||
### 如何在 Linux 中使用 cracklib 模块检查密码复杂性?
|
||||
|
||||
我在本文中添加了一些示例来助你更好地了解此模块。
|
||||
|
||||
如果你提供了任何如人名或地名或常用字,那么你将看到一条消息“它存在于单词字典中”。
|
||||
|
||||
```
|
||||
$ echo "password" | cracklib-check
|
||||
password: it is based on a dictionary word
|
||||
```
|
||||
|
||||
Linux 中的默认密码长度为 `7` 个字符。如果你提供的密码少于 7 个字符,那么你将看到一条消息“它太短了”。
|
||||
|
||||
```
|
||||
$ echo "123" | cracklib-check
|
||||
123: it is WAY too short
|
||||
```
|
||||
|
||||
当你提供像我们这样的好密码时,你会看到 `OK`。
|
||||
|
||||
```
|
||||
$ echo "ME$2w!@fgty6723" | cracklib-check
|
||||
ME!@fgty6723: OK
|
||||
```
|
||||
|
||||
### 如何在 Linux 中安装 pwscore?
|
||||
|
||||
pwscore 包在大多数发行版仓库中都有,因此,请使用发行版官方软件包管理器来安装它。
|
||||
|
||||
对于 **`Fedora`** 系统,使用 **[DNF 命令][1]**来安装 libpwquality。
|
||||
|
||||
```
|
||||
$ sudo dnf install libpwquality
|
||||
```
|
||||
|
||||
对于 **`Debian/Ubuntu`** 系统,使用 **[APT-GET 命令][2]** 或 **[APT 命令][3]**来安装 libpwquality。
|
||||
|
||||
```
|
||||
$ sudo apt install libpwquality
|
||||
```
|
||||
|
||||
对于基于 **`Arch Linux`** 的系统,使用 **[Pacman 命令][4]**来安装 libpwquality。
|
||||
|
||||
```
|
||||
$ sudo pacman -S libpwquality
|
||||
```
|
||||
|
||||
对于 **`RHEL/CentOS`** 系统,使用 **[YUM 命令][5]**来安装 libpwquality。
|
||||
|
||||
```
|
||||
$ sudo yum install libpwquality
|
||||
```
|
||||
|
||||
对于 **`openSUSE Leap`** 系统,使用 **[Zypper 命令][6]**来安装 libpwquality。
|
||||
|
||||
```
|
||||
$ sudo zypper install libpwquality
|
||||
```
|
||||
|
||||
如果你提供了任何如人名或地名或常用字,那么你将看到一条消息“它存在于单词字典中”。
|
||||
|
||||
```
|
||||
$ echo "password" | pwscore
|
||||
Password quality check failed:
|
||||
The password fails the dictionary check - it is based on a dictionary word
|
||||
```
|
||||
|
||||
Linux 中的默认密码长度为 `7` 个字符。如果你提供的密码少于 7 个字符,那么你将看到一条消息“它太短了”。
|
||||
|
||||
```
|
||||
$ echo "123" | pwscore
|
||||
Password quality check failed:
|
||||
The password is shorter than 8 characters
|
||||
```
|
||||
|
||||
当你提供像我们这样的好密码时,你将会看到`密码分数`。
|
||||
|
||||
```
|
||||
$ echo "ME!@fgty6723" | pwscore
|
||||
90
|
||||
```
|
||||
|
||||
--------------------------------------------------------------------------------
|
||||
|
||||
via: https://www.2daygeek.com/how-to-check-password-complexity-strength-and-score-in-linux/
|
||||
|
||||
作者:[Magesh Maruthamuthu][a]
|
||||
选题:[lujun9972][b]
|
||||
译者:[geekpi](https://github.com/geekpi)
|
||||
校对:[校对者ID](https://github.com/校对者ID)
|
||||
|
||||
本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出
|
||||
|
||||
[a]: https://www.2daygeek.com/author/magesh/
|
||||
[b]: https://github.com/lujun9972
|
||||
[1]: https://www.2daygeek.com/dnf-command-examples-manage-packages-fedora-system/
|
||||
[2]: https://www.2daygeek.com/apt-get-apt-cache-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[3]: https://www.2daygeek.com/apt-command-examples-manage-packages-debian-ubuntu-systems/
|
||||
[4]: https://www.2daygeek.com/pacman-command-examples-manage-packages-arch-linux-system/
|
||||
[5]: https://www.2daygeek.com/yum-command-examples-manage-packages-rhel-centos-systems/
|
||||
[6]: https://www.2daygeek.com/zypper-command-examples-manage-packages-opensuse-system/
|
Loading…
Reference in New Issue
Block a user