Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1diLJq-0003Xv-1p for pgsql-admin@arkaria.postgresql.org; Thu, 17 Aug 2017 13:58:42 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1diLJp-00043o-Ed for pgsql-admin@arkaria.postgresql.org; Thu, 17 Aug 2017 13:58:41 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1diLJo-000436-Ga for pgsql-admin@postgresql.org; Thu, 17 Aug 2017 13:58:40 +0000 Received: from mailout13.telekom.de ([80.149.113.181]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1diLJk-0007W1-TC for pgsql-admin@postgresql.org; Thu, 17 Aug 2017 13:58:39 +0000 Received: from q4de8psa04t.blf.telekom.de ([10.151.13.130]) by MAILOUT11.telekom.de with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 17 Aug 2017 15:58:33 +0200 X-IronPort-AV: E=Sophos;i="5.41,387,1498514400"; d="scan'208,217";a="718650341" Received: from he101865.emea1.cds.t-internal.com ([10.134.226.53]) by Q4DE8PSA04V.blf.telekom.de with ESMTP/TLS/AES256-SHA; 17 Aug 2017 15:58:32 +0200 Received: from HE101867.EMEA1.cds.t-internal.com (10.134.226.55) by HE101865.emea1.cds.t-internal.com (10.134.226.53) with Microsoft SMTP Server (TLS) id 15.0.1263.5; Thu, 17 Aug 2017 15:58:32 +0200 Received: from HE101867.EMEA1.cds.t-internal.com ([fe80::45da:f6a1:d3ba:7846]) by HE101867.emea1.cds.t-internal.com ([fe80::45da:f6a1:d3ba:7846%25]) with mapi id 15.00.1263.000; Thu, 17 Aug 2017 15:58:32 +0200 From: To: Subject: LDAP authentication failes with more than one entry returned Thread-Topic: LDAP authentication failes with more than one entry returned Thread-Index: AdMXYNVkp80yrQ65R2i44J/JlpBiBA== Date: Thu, 17 Aug 2017 13:58:32 +0000 Message-ID: <56022b23f1d5415cb99d16d824fe7935@HE101867.emea1.cds.t-internal.com> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-exchange-transport-fromentityheader: Hosted x-originating-ip: [10.136.200.11] Content-Type: multipart/alternative; boundary="_000_56022b23f1d5415cb99d16d824fe7935HE101867emea1cdstintern_" MIME-Version: 1.0 List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-admin Precedence: bulk Sender: pgsql-admin-owner@postgresql.org --_000_56022b23f1d5415cb99d16d824fe7935HE101867emea1cdstintern_ Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hello list, I configured postgreSQL to only allow users that are administered in LDAP t= o connect to one particular database on my PostgreSQL host. This works fine= as long as only one entry is returned for the combination of "ldapbasedn" = and "ldapsearchattribute". I currently match the LDAP attribute UID against the login name. Problem is= that the users exist several times in the specified (sub-) directory tree.= Everything works if the user only exists once within the specified "ldapba= sedn". How to deal with that problem? I think it is common practice to have several sub-trees, one per organizati= onal unit for example. Within that OU there are several sub-trees that defi= ne privileges for SAMBA shares, database connections or other purposes. Bec= ause I need to search for the users across several OUs, I can't give the pa= th to only one sub-tree. I am currently on windows so I can't test the ldapurl feature. Would it be possible to use the ldapurl directive to allow an ldapsearch ac= ross different 1st level trees but only look for users within one particula= r sub-tree in each of the 1st level trees? Thank you very much for your comments, Michael H=E4rtel --_000_56022b23f1d5415cb99d16d824fe7935HE101867emea1cdstintern_ Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable

Hello list,

 

I configured postgreSQL to only= allow users that are administered in LDAP to connect to one particular dat= abase on my PostgreSQL host. This works fine as long as only one entry is r= eturned for the combination of “ldapbasedn” and “ldapsearchattribute”.

 

I currently match the LDAP attr= ibute UID against the login name. Problem is that the users exist several t= imes in the specified (sub-) directory tree. Everything works if the user o= nly exists once within the specified “ldapbasedn”.

 

How to deal with that problem?<= o:p>

 

I think it is common practice t= o have several sub-trees, one per organizational unit for example. Within t= hat OU there are several sub-trees that define privileges for SAMBA shares,= database connections or other purposes. Because I need to search for the users across several OUs, I can’t g= ive the path to only one sub-tree.

 

I am currently on windows so I = can’t test the ldapurl feature.

 

Would it be possible to use the= ldapurl directive to allow an ldapsearch across different 1st l= evel trees but only look for users within one particular sub-tree in each o= f the 1st level trees?

 

Thank you very much for your co= mments,

 

Michael H=E4rtel

--_000_56022b23f1d5415cb99d16d824fe7935HE101867emea1cdstintern_--