[GENERAL] LDAP authentication without OU in ldapbasedn - Mailing list pgsql-general

From Gregory Nicol
Subject [GENERAL] LDAP authentication without OU in ldapbasedn
Date
Msg-id 055b780f471f4661b7f293fc16b8c955@MBEX01-LV.medbank.local
Whole thread Raw
Responses Re: [GENERAL] LDAP authentication without OU in ldapbasedn  (Stephen Frost <sfrost@snowman.net>)
Re: [GENERAL] LDAP authentication without OU in ldapbasedn  (Jeff Janes <jeff.janes@gmail.com>)
List pgsql-general

Good morning all,

 

I can’t seem to get LDAP Authentication working without an OU in the ldapbasedn. My users are spread across multiple OUs without a common root OU which is why I’m trying to authenticate with just the DC.

 

 

With pg_hba.conf like this, I can connect successfully from psql…

 

    local     all             all            ldap ldapserver=192.168.xxx.xxx ldapbasedn="OU=DB_Accounts,DC=acme,DC=local" ldapbinddn="CN=XXXX ,OU=DB_Accounts,DC=acme,DC=local" ldapsearchattribute=sAMAccountName ldapbindpasswd=xxxxxxxxxxxxxxx

 

But if I remove the OU from the ldapbasedn, like this …

 

    local     all             all            ldap ldapserver=192.168.xxx.xxx ldapbasedn="DC=acme,DC=local" ldapbinddn="CN=XXXX ,OU=DB_Accounts,DC=acme,DC=local" ldapsearchattribute=sAMAccountName ldapbindpasswd=xxxxxxxxxxxxxxx

 

 

Then I get:

 

    psql: FATAL:  LDAP authentication failed for user "xxxxxxxx"

 

 

select VERSION();

                                                 version                                                  

----------------------------------------------------------------------------------------------------------

PostgreSQL 9.6.2 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.8.5 20150623 (Red Hat 4.8.5-11), 64-bit

 

 

psql --version

psql (PostgreSQL) 9.6.2

 

 

Kind Regards,

Greg

 

P {margin:0cm;margin-bottom:.0001pt;}

The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and / or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer.


pgsql-general by date:

Previous
From: Michael Paquier
Date:
Subject: Re: [GENERAL] Associating a basebackup and it's .backup WAL file
Next
From: Simon Ruderich
Date:
Subject: [GENERAL] Long wrapped header lines in psql with expanded mode (9.6.3)