How To Configure PostgreSQL to Use LDAP for Authentication - Mailing list pgsql-admin

From Henry Ashu
Subject How To Configure PostgreSQL to Use LDAP for Authentication
Date
Msg-id CABHPps4FeMPPqm36+SnhW67HKd=f1wcsZGxES6w=Ay6O5YQKNQ@mail.gmail.com
Whole thread Raw
Responses Re: How To Configure PostgreSQL to Use LDAP for Authentication
List pgsql-admin
Hi,

Please, I need help with how to configure postgresql to use LDAP for Authentication. 

Here is what I have tried;

host all all 0.0.0.0/0 ldap ldapserver=ldap://adserver.domain.com ldapport=389 ldapprefix="DOMAIN\" ldapsuffix="" ldapbinddn=postgres-user@domain.com ldapbindpasswd=mypassword


host    all             all             0.0.0.0/0         ldap        ldapurl="ldaps://adserver.domain.com:636" ldapbasedn="OU=Users,OU=England 053,OU=Commercial Services,DC=domain,DC=com" ldapbinddn="postgres-user@domain.com" ldapbindpasswd="mypassword" ldapsearchattribute="OU=Users,OU=England 053,OU=Commercial Services,DC=domain,DC=com"



host    all             all             0.0.0.0/0         ldap         ldapserver="adserver.domain.com"     ldapport=636     ldapscheme="ldaps"     ldapbasedn="OU=Users,OU=England 053,OU=Commercial Services,DC=domain,DC=com"     ldapbinddn="OU=Users,OU=England 053,OU=Commercial Services,DC=domain,DC=com"     ldapbindpasswd="mypassword"     ldapsearchattribute="adservice-account"


And this is the error I'm getting;

[postgres@myserver ~]$ psql -U myuser mydatabase
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL:  no pg_hba.conf entry for host "[local]", user "myuser", database "mydatabase", no encryption
[postgres@myserver ~]$ psql -U "MYDOMAIN\myuser" mydatabase
psql: error: connection to server on socket "/run/postgresql/.s.PGSQL.5432" failed: FATAL:  no pg_hba.conf entry for host "[local]", user "MYDOMAIN\myuser", database "mydatabase", no encryption

Thank you

Henry Ashu

Database Administrator
o: 503.672.5114 | f: 800.551.8821 | DAT.com

DAT Solutions    Like us on Facebook  Follow us on Twitter  Connect with us on LinkedIn  Visit our YouTube Channel  Visit us on Instagram

pgsql-admin by date:

Previous
From: Ron Johnson
Date:
Subject: Re: Postgres compatibility with RHEL
Next
From: Sbob
Date:
Subject: time data type question