PAM Authentication With PostgreSQL

PostgreSQl supports many authentication methods. The PAM authentication method operates similarly to password except that it uses PAM (Pluggable Authentication Modules) as the authentication mechanism. The user must exist in the database before PAM can be used for authentication.
In this blog I will configure PAM authentication for a PostgreSQL cluster 11 running on a centos 7.

To get started with PAM authentication wit Postgresql, MAKE SURE YOU PAM INSTALLED .. NOTE ITS INSTALLED WHEN YOU INSTALLED POSTGRES USING YUM

CD into /etc/pam.d

NEXT YOU CAN CD INTO /ETC/ YOU WILL SEE THE FOLLOWING

 HAD TO INPUT THIS IN PG_HBA.CONF FILE

I CREATE AN OS USER BECAUSE PAM USER MUST BE AN USER AND DATABASE USER.

NOW ABLE TO CONNECT

THIS SHOWS I CAN NOW CONNECT. NOW LET ME TRY TO USE ONLY A DATABASE USER AND SEE,

THIS SHOW YOU MUST BE AN OS USER.

About the author

bensonyerima

Hi, I'm Benson Yerima, a database administrator with an obsession for all things tech. This blog is dedicated for helping people learn about database technology.

View all posts

9,443 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *