Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOhRV-0006nn-7b for pgsql-admin@arkaria.postgresql.org; Thu, 09 May 2019 11:42:29 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1hOhRT-0004Gs-QI for pgsql-admin@arkaria.postgresql.org; Thu, 09 May 2019 11:42:27 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOhRT-0004Fk-Fv for pgsql-admin@lists.postgresql.org; Thu, 09 May 2019 11:42:27 +0000 Received: from mx2.mailbox.org ([80.241.60.215]) by magus.postgresql.org with esmtps (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1hOhRQ-0005dY-QM for pgsql-admin@postgresql.org; Thu, 09 May 2019 11:42:27 +0000 Received: from smtp2.mailbox.org (smtp2.mailbox.org [80.241.60.241]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id D2145A184D; Thu, 9 May 2019 13:42:22 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter06.heinlein-hosting.de (spamfilter06.heinlein-hosting.de [80.241.56.125]) (amavisd-new, port 10030) with ESMTP id 3S7m1jlDwsde; Thu, 9 May 2019 13:42:07 +0200 (CEST) Message-ID: <994d6f5f247b972bc148a44fef9d8b5577845090.camel@cybertec.at> Subject: Re: LDAP authentication failed From: Laurenz Albe To: Pierre Ochsenbein , pgsql-admin Date: Thu, 09 May 2019 13:42:06 +0200 In-Reply-To: References: Organization: Cybertec Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk 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