How to connect postgresql with LDAP user?
15,144
Solution 1
Thanks everyone, I just made a change in /var/lib/pgsql/9.4/data/pg_hba.conf with :
local all all ldap ldapserver=ldap.server ldapport=389 ldaptls=0 ldapprefix="uid=" ldapsuffix=",ou=People,dc=domain,dc=com"
And the authentication works!
Solution 2
- Read the Friendly Manual:
http://www.postgresql.org/docs/9.5/static/auth-methods.html
- You probably want to use https://github.com/larskanis/pg-ldap-sync to sync your LDAP users and groups to PostgreSQL
Related videos on Youtube
Author by
user1070579
Updated on September 18, 2022Comments
-
user1070579 over 1 year
I have a server with postgresql-9.4 fresh install and I have another server with LDAP already installed. I want to connect postgresql with LDAP user that already exists.
What's the basic configuration that I should change in /var/lib/pgsql/9.4/data/pg_hba.conf and what else I should do?
-
Ha Son Hai about 5 yearsdo you need to create users first in the database?