Install libpam-pgsql by entering the following commands in the terminal:
sudo apt update sudo apt install libpam-pgsql
Description:
PAM module to authenticate using a PostgreSQL database
This module lets you authenticate users against a table in a PostgreSQL database. It also supports checking account information and updating authentication tokens (ie. passwords).
Homepage: http://sourceforge.net/projects/pam-pgsql/
Version: 0.7.3.2-1
Section: universe/admin