pam_pgsql is a Postgres backend for Linux PAM. It permits authenticating users by a Postgres database.