How To Install cvm-pgsql on Ubuntu 18.04

In this tutorial we learn how to install cvm-pgsql on Ubuntu 18.04. cvm-pgsql is Credential Validation Modules (PostgreSQL)

Introduction

In this tutorial we learn how to install cvm-pgsql on Ubuntu 18.04.

What is cvm-pgsql

cvm-pgsql is:

CVM is a framework for validating a set of credentials against a database using a filter program. The modules act as a filter, taking a set of credentials as input and writing a set of facts as output if those credentials are valid. Optional input is given to the module through environment variables.

Some of the ideas for CVM came from experience with PAM (pluggable authentication modules), the checkpassword interface used by qmail-pop3d, and the “authmod” interface used by Courier IMAP and POP3. This framework places fewer restrictions on the invoking client than checkpassword does, and is much simpler to implement on both sides than PAM and the authmod framework.

See http://untroubled.org/cvm/cvm.html for more information.

There are three methods to install cvm-pgsql on Ubuntu 18.04. We can use apt-get, apt and aptitude. In the following sections we will describe each method. You can choose one of them.

Install cvm-pgsql Using apt-get

Update apt database with apt-get using the following command.

sudo apt-get update

After updating apt database, We can install cvm-pgsql using apt-get by running the following command:

sudo apt-get -y install cvm-pgsql

Install cvm-pgsql Using apt

Update apt database with apt using the following command.

sudo apt update

After updating apt database, We can install cvm-pgsql using apt by running the following command:

sudo apt -y install cvm-pgsql

Install cvm-pgsql Using aptitude

If you want to follow this method, you might need to install aptitude first since aptitude is usually not installed by default on Ubuntu. Update apt database with aptitude using the following command.

sudo aptitude update

After updating apt database, We can install cvm-pgsql using aptitude by running the following command:

sudo aptitude -y install cvm-pgsql

How To Uninstall cvm-pgsql on Ubuntu 18.04

To uninstall only the cvm-pgsql package we can use the following command:

sudo apt-get remove cvm-pgsql

Uninstall cvm-pgsql And Its Dependencies

To uninstall cvm-pgsql and its dependencies that are no longer needed by Ubuntu 18.04, we can use the command below:

sudo apt-get -y autoremove cvm-pgsql

Remove cvm-pgsql Configurations and Data

To remove cvm-pgsql configuration and data from Ubuntu 18.04 we can use the following command:

sudo apt-get -y purge cvm-pgsql

Remove cvm-pgsql configuration, data, and all of its dependencies

We can use the following command to remove cvm-pgsql configurations, data and all of its dependencies, we can use the following command:

sudo apt-get -y autoremove --purge cvm-pgsql

References

Summary

In this tutorial we learn how to install cvm-pgsql package on Ubuntu 18.04 using different package management tools: apt, apt-get and aptitude.