How To Install cracklib on CentOS 8

cracklib is A password-checking library A password-checking library

Introduction

In this tutorial we learn how to install cracklib on CentOS 8.

What is cracklib

CrackLib tests passwords to determine whether they match certain security-oriented characteristics, with the purpose of stopping users from choosing passwords that are easy to guess. CrackLib performs several tests on passwords and gecos entry and checks those words against the password; it checks for simplistic patterns in passwords; and it checks for the password in a dictionary. CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions. CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program. Install the cracklib package if you need a program to check users’ passwords to see if they are at least minimally secure. If you install CrackLib, you will also want to install the cracklib-dicts package. cracklib 2.9.6 15.el8 i686 94 k cracklib-2.9.6-15.el8.src.rpm baseos A password-checking library http LGPLv2+ CrackLib tests passwords to determine whether they match certain security-oriented characteristics, with the purpose of stopping users from choosing passwords that are easy to guess. CrackLib performs several tests on passwords and gecos entry and checks those words against the password; it checks for simplistic patterns in passwords; and it checks for the password in a dictionary. CrackLib is actually a library containing a particular C function which is used to check the password, as well as other C functions. CrackLib is not a replacement for a passwd program; it must be used in conjunction with an existing passwd program. Install the cracklib package if you need a program to check users’ passwords to see if they are at least minimally secure. If you install CrackLib, you will also want to install the cracklib-dicts package.

We can use yum or dnf to install cracklib on CentOS 8. In this tutorial we discuss both methods but you only need to choose one of method to install cracklib.

Install cracklib on CentOS 8 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install cracklib using dnf by running the following command:

sudo dnf -y install cracklib

Install cracklib on CentOS 8 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

CentOS Linux 8 - AppStream                                       43 kB/s | 4.3 kB     00:00    
CentOS Linux 8 - BaseOS                                          65 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - ContinuousRelease                               43 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - Extras                                          23 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - FastTrack                                       40 kB/s | 3.0 kB     00:00    
CentOS Linux 8 - HighAvailability                                36 kB/s | 3.9 kB     00:00    
CentOS Linux 8 - Plus                                            24 kB/s | 1.5 kB     00:00    
CentOS Linux 8 - PowerTools                                      50 kB/s | 4.3 kB     00:00    
Extra Packages for Enterprise Linux Modular 8 - x86_64           13 kB/s | 9.2 kB     00:00    
Extra Packages for Enterprise Linux 8 - x86_64                   24 kB/s | 8.5 kB     00:00    
Metadata cache created.

After updating yum database, We can install cracklib using yum by running the following command:

sudo yum -y install cracklib

How To Uninstall cracklib on CentOS 8

To uninstall only the cracklib package we can use the following command:

sudo dnf remove cracklib

cracklib Package Contents on CentOS 8

/usr/lib/.build-id
/usr/lib/.build-id/2a
/usr/lib/.build-id/2a/b3ca352642eddf459647af45d10196b68e803e
/usr/lib/.build-id/2c
/usr/lib/.build-id/2c/f06ecb760830a44054a2dae5e46d37c0096bdc
/usr/lib/.build-id/45
/usr/lib/.build-id/45/eadd32bae2bb25d417c9c1c246cf6fba760ba6
/usr/lib/.build-id/61
/usr/lib/.build-id/61/d2f881301c3bb88a1baa2a50115429de33b825
/usr/lib64/libcrack.so.2
/usr/lib64/libcrack.so.2.9.0
/usr/sbin/cracklib-check
/usr/sbin/cracklib-format
/usr/sbin/cracklib-packer
/usr/sbin/cracklib-unpacker
/usr/sbin/create-cracklib-dict
/usr/share/cracklib
/usr/share/cracklib/cracklib.magic
/usr/share/doc/cracklib
/usr/share/doc/cracklib/AUTHORS
/usr/share/doc/cracklib/NEWS
/usr/share/doc/cracklib/README
/usr/share/doc/cracklib/README-LICENSE
/usr/share/doc/cracklib/README-WORDS
/usr/share/licenses/cracklib
/usr/share/licenses/cracklib/COPYING.LIB
/usr/share/locale/as/LC_MESSAGES/cracklib.mo
/usr/share/locale/be/LC_MESSAGES/cracklib.mo
/usr/share/locale/bn_IN/LC_MESSAGES/cracklib.mo
/usr/share/locale/ca/LC_MESSAGES/cracklib.mo
/usr/share/locale/cs/LC_MESSAGES/cracklib.mo
/usr/share/locale/da/LC_MESSAGES/cracklib.mo
/usr/share/locale/de/LC_MESSAGES/cracklib.mo
/usr/share/locale/el/LC_MESSAGES/cracklib.mo
/usr/share/locale/es/LC_MESSAGES/cracklib.mo
/usr/share/locale/eu/LC_MESSAGES/cracklib.mo
/usr/share/locale/fi/LC_MESSAGES/cracklib.mo
/usr/share/locale/fr/LC_MESSAGES/cracklib.mo
/usr/share/locale/gu/LC_MESSAGES/cracklib.mo
/usr/share/locale/he/LC_MESSAGES/cracklib.mo
/usr/share/locale/hi/LC_MESSAGES/cracklib.mo
/usr/share/locale/hu/LC_MESSAGES/cracklib.mo
/usr/share/locale/id/LC_MESSAGES/cracklib.mo
/usr/share/locale/it/LC_MESSAGES/cracklib.mo
/usr/share/locale/ja/LC_MESSAGES/cracklib.mo
/usr/share/locale/kk/LC_MESSAGES/cracklib.mo
/usr/share/locale/kn/LC_MESSAGES/cracklib.mo
/usr/share/locale/ko/LC_MESSAGES/cracklib.mo
/usr/share/locale/lt/LC_MESSAGES/cracklib.mo
/usr/share/locale/ml/LC_MESSAGES/cracklib.mo
/usr/share/locale/mr/LC_MESSAGES/cracklib.mo
/usr/share/locale/nb/LC_MESSAGES/cracklib.mo
/usr/share/locale/nl/LC_MESSAGES/cracklib.mo
/usr/share/locale/or/LC_MESSAGES/cracklib.mo
/usr/share/locale/pa/LC_MESSAGES/cracklib.mo
/usr/share/locale/pl/LC_MESSAGES/cracklib.mo
/usr/share/locale/pt/LC_MESSAGES/cracklib.mo
/usr/share/locale/pt_BR/LC_MESSAGES/cracklib.mo
/usr/share/locale/ru/LC_MESSAGES/cracklib.mo
/usr/share/locale/sk/LC_MESSAGES/cracklib.mo
/usr/share/locale/sl_SI/LC_MESSAGES/cracklib.mo
/usr/share/locale/sq/LC_MESSAGES/cracklib.mo
/usr/share/locale/sv/LC_MESSAGES/cracklib.mo
/usr/share/locale/ta/LC_MESSAGES/cracklib.mo
/usr/share/locale/te/LC_MESSAGES/cracklib.mo
/usr/share/locale/tr/LC_MESSAGES/cracklib.mo
/usr/share/locale/uk/LC_MESSAGES/cracklib.mo
/usr/share/locale/zh_CN/LC_MESSAGES/cracklib.mo
/usr/share/locale/zh_TW/LC_MESSAGES/cracklib.mo
/usr/share/man/man8/cracklib-check.8.gz
/usr/share/man/man8/cracklib-format.8.gz
/usr/share/man/man8/cracklib-packer.8.gz
/usr/share/man/man8/cracklib-unpacker.8.gz
/usr/share/man/man8/create-cracklib-dict.8.gz
/usr/share/man/man8/update-cracklib.8.gz
/usr/lib/.build-id
/usr/lib/.build-id/c1
/usr/lib/.build-id/c1/194ec14a4abd4ef2fb878a27829fd217a5b77d
/usr/lib/.build-id/c5
/usr/lib/.build-id/c5/6c054b67d6e85025706eb7fe8ba2fa1f44323c
/usr/lib/.build-id/e1
/usr/lib/.build-id/e1/4fb40064974c4f617fa2f50f9e56d6c9fb427f
/usr/lib/.build-id/e1/e3fcd41a7fc45eed97f5eb7faeea2c9655c07e
/usr/lib/libcrack.so.2
/usr/lib/libcrack.so.2.9.0
/usr/sbin/cracklib-check
/usr/sbin/cracklib-format
/usr/sbin/cracklib-packer
/usr/sbin/cracklib-unpacker
/usr/sbin/create-cracklib-dict
/usr/share/cracklib
/usr/share/cracklib/cracklib.magic
/usr/share/doc/cracklib
/usr/share/doc/cracklib/AUTHORS
/usr/share/doc/cracklib/NEWS
/usr/share/doc/cracklib/README
/usr/share/doc/cracklib/README-LICENSE
/usr/share/doc/cracklib/README-WORDS
/usr/share/licenses/cracklib
/usr/share/licenses/cracklib/COPYING.LIB
/usr/share/locale/as/LC_MESSAGES/cracklib.mo
/usr/share/locale/be/LC_MESSAGES/cracklib.mo
/usr/share/locale/bn_IN/LC_MESSAGES/cracklib.mo
/usr/share/locale/ca/LC_MESSAGES/cracklib.mo
/usr/share/locale/cs/LC_MESSAGES/cracklib.mo
/usr/share/locale/da/LC_MESSAGES/cracklib.mo
/usr/share/locale/de/LC_MESSAGES/cracklib.mo
/usr/share/locale/el/LC_MESSAGES/cracklib.mo
/usr/share/locale/es/LC_MESSAGES/cracklib.mo
/usr/share/locale/eu/LC_MESSAGES/cracklib.mo
/usr/share/locale/fi/LC_MESSAGES/cracklib.mo
/usr/share/locale/fr/LC_MESSAGES/cracklib.mo
/usr/share/locale/gu/LC_MESSAGES/cracklib.mo
/usr/share/locale/he/LC_MESSAGES/cracklib.mo
/usr/share/locale/hi/LC_MESSAGES/cracklib.mo
/usr/share/locale/hu/LC_MESSAGES/cracklib.mo
/usr/share/locale/id/LC_MESSAGES/cracklib.mo
/usr/share/locale/it/LC_MESSAGES/cracklib.mo
/usr/share/locale/ja/LC_MESSAGES/cracklib.mo
/usr/share/locale/kk/LC_MESSAGES/cracklib.mo
/usr/share/locale/kn/LC_MESSAGES/cracklib.mo
/usr/share/locale/ko/LC_MESSAGES/cracklib.mo
/usr/share/locale/lt/LC_MESSAGES/cracklib.mo
/usr/share/locale/ml/LC_MESSAGES/cracklib.mo
/usr/share/locale/mr/LC_MESSAGES/cracklib.mo
/usr/share/locale/nb/LC_MESSAGES/cracklib.mo
/usr/share/locale/nl/LC_MESSAGES/cracklib.mo
/usr/share/locale/or/LC_MESSAGES/cracklib.mo
/usr/share/locale/pa/LC_MESSAGES/cracklib.mo
/usr/share/locale/pl/LC_MESSAGES/cracklib.mo
/usr/share/locale/pt/LC_MESSAGES/cracklib.mo
/usr/share/locale/pt_BR/LC_MESSAGES/cracklib.mo
/usr/share/locale/ru/LC_MESSAGES/cracklib.mo
/usr/share/locale/sk/LC_MESSAGES/cracklib.mo
/usr/share/locale/sl_SI/LC_MESSAGES/cracklib.mo
/usr/share/locale/sq/LC_MESSAGES/cracklib.mo
/usr/share/locale/sv/LC_MESSAGES/cracklib.mo
/usr/share/locale/ta/LC_MESSAGES/cracklib.mo
/usr/share/locale/te/LC_MESSAGES/cracklib.mo
/usr/share/locale/tr/LC_MESSAGES/cracklib.mo
/usr/share/locale/uk/LC_MESSAGES/cracklib.mo
/usr/share/locale/zh_CN/LC_MESSAGES/cracklib.mo
/usr/share/locale/zh_TW/LC_MESSAGES/cracklib.mo
/usr/share/man/man8/cracklib-check.8.gz
/usr/share/man/man8/cracklib-format.8.gz
/usr/share/man/man8/cracklib-packer.8.gz
/usr/share/man/man8/cracklib-unpacker.8.gz
/usr/share/man/man8/create-cracklib-dict.8.gz
/usr/share/man/man8/update-cracklib.8.gz

References

Summary

In this tutorial we learn how to install cracklib on CentOS 8 using yum and dnf.