======Overview======
LDAP configuration allows you provide centralized authentication. It can be configured as follows:
In the beginning of the pg_hba.conf file in the PostgreSQL home, add the following setting:
host all all 0.0.0.0/0 pam pamservice=postgresql
Once that is done, reload the configuration:
postgres=# SELECT pg_reload_conf();
pg_reload_conf
----------------
t
(1 row)
Now, create a user without any password and the roles which you want this user to have:
postgres=# create user jimmy superuser;
CREATE ROLE
postgres=# \q
You are all set to go :)