Re: How To Configure PostgreSQL to Use LDAP for Authentication

From: Achilleas Mantzios - cloud <a(dot)mantzios(at)cloud(dot)gatewaynet(dot)com>
To: pgsql-admin(at)lists(dot)postgresql(dot)org
Subject: Re: How To Configure PostgreSQL to Use LDAP for Authentication
Date: 2024-12-20 08:32:54
Message-ID: 83c50b58-a8a7-4526-85db-fecc649aa561@cloud.gatewaynet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin


On 12/6/24 16:15, Henry Ashu wrote:
> 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 <http://0.0.0.0/0> ldap
> ldapserver=ldap://adserver.domain.com <http://adserver.domain.com>
> ldapport=389 ldapprefix="DOMAIN\" ldapsuffix=""
> ldapbinddn=postgres-user(at)domain(dot)com ldapbindpasswd=mypassword
>
>
> host    all             all 0.0.0.0/0 <http://0.0.0.0/0>         ldap
>        ldapurl="ldaps://adserver.domain.com:636
> <http://adserver.domain.com:636>" ldapbasedn="OU=Users,OU=England
> 053,OU=Commercial Services,DC=domain,DC=com"
> ldapbinddn="postgres-user(at)domain(dot)com" ldapbindpasswd="mypassword"
> ldapsearchattribute="OU=Users,OU=England 053,OU=Commercial
> Services,DC=domain,DC=com"
>
>
>
> host    all             all 0.0.0.0/0 <http://0.0.0.0/0>         ldap
>         ldapserver="adserver.domain.com <http://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(at)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(at)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
Fix your pg_hba.conf, LDAP is the least of your problems.
>
> Thank you
>
> *Henry Ashu*
>
> Database Administrator
> *o:* 503.672.5114 | *f:* 800.551.8821 | DAT.com
>
> DAT Solutions <https://www.dat.com/> Like us on Facebook
> <https://www.facebook.com/loadboards> Follow us on Twitter
> <https://twitter.com/loadboards> Connect with us on LinkedIn
> <https://www.linkedin.com/company/datsolutions> Visit our YouTube
> Channel <https://www.youtube.com/datloadboards> Visit us on Instagram
> <https://instagram.com/dat_solutions>

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Fabrice Chapuis 2024-12-20 09:43:19 Re: pg_stat_statements_reset
Previous Message kaido vaikla 2024-12-20 08:23:37 Re: Lot of postmaster processes