pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Laurenz Albe <laurenz.albe@cybertec.at>
To: Pierre Ochsenbein <pierreochsenbein@gmail.com>
To: pgsql-admin <pgsql-admin@postgresql.org>
Subject: Re: LDAP authentication failed
Date: Thu, 09 May 2019 13:42:06 +0200
Message-ID: <994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at> (raw)
In-Reply-To: <CABG8FoOb0S2EiNSbAgHuv+BzndymvV_VLu969qb3tmXFQ6Z-fQ@mail.gmail.com>
References: <CABG8FoOb0S2EiNSbAgHuv+BzndymvV_VLu969qb3tmXFQ6Z-fQ@mail.gmail.com>

Pierre Ochsenbein wrote:
> I'm running on PostgreSQL 10.6 and would like to connect with LDAP users.
> I have sync all users from my group in my database.
> I can connect when I use auth "trust" in pg_hba but I would like to connect remotely with AD password and I have this error:
> SSL is ON in postgresql.conf
> 
> FATAL: LDAP authentication failed for user "userA" FATAL: no pg_hba.conf entry for host "10.1.1.181", user "userA", database "DB01", SSL off 
> 
> pg_hba.conf:
> 
> hostssl    all             all             10.1.1.18/32        ldap  ldapurl="ldap://ldap.local/OU=ASA,OU=Forest%20Admin%20Accounts%20%26%20Roles,DC=ASATL,DC=NET?sAMAccountName?sub" ldaptls=1 ldapbinddn="CN=POSTGRES,OU=Service Accounts,OU=Global,OU=Member Servers,DC=PMINTL,DC=NET" ldapbindpasswd='password001'

Apart from the difference in the IP address (which you say was a typo)
your pg_hba.conf line starts with "hostssl", which means that it only
applies to SSL connections.

But your error message suggests that the connection attempt was made
without SSL encryption.

Thic could be an artifact if the client tries both SSL and non-SSL
connections, in which case I would force SSL on the client side to get
the proper error.  Also, I'd look into the PostgreSQL server log file.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com






view thread (4+ messages)

Message-ID: <994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at>
Permalink:  ../994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at/
Also on:    postgresql.org/message-id/994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: laurenz.albe@cybertec.at, pierreochsenbein@gmail.com
  Subject: Re: LDAP authentication failed
  In-Reply-To: <994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at>
  References: <CABG8FoOb0S2EiNSbAgHuv+BzndymvV_VLu969qb3tmXFQ6Z-fQ@mail.gmail.com> <994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox