How To Install libpwquality on CentOS 7

In this tutorial we learn how to install libpwquality on CentOS 7. libpwquality is A library for password generation and password quality checking

Introduction

In this tutorial we learn how to install libpwquality on CentOS 7.

What is libpwquality

This is a library for password quality checks and generation of random passwords that pass the checks. This library uses the cracklib and cracklib dictionaries to perform some of the checks.

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

Install libpwquality on CentOS 7 Using yum

Update yum database with yum using the following command.

sudo yum makecache

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

sudo yum -y install libpwquality

Install libpwquality on CentOS 7 Using dnf

If you don’t have dnf installed you can install DNF on CentOS 7 first. Update yum database with dnf using the following command.

sudo dnf makecache

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

sudo dnf -y install libpwquality

How To Uninstall libpwquality on CentOS 7

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

sudo dnf remove libpwquality

References

Summary

In this tutorial we learn how to install libpwquality on CentOS 7 using yum and dnf.