Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 9165E1337B82 for ; Fri, 29 Oct 2010 16:29:14 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 48138-04 for ; Fri, 29 Oct 2010 19:29:07 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail.kzsdabas.sulinet.hu (szerver1.kzsdabas.sulinet.hu [195.199.159.209]) by mail.postgresql.org (Postfix) with SMTP id 464161337B88 for ; Fri, 29 Oct 2010 16:29:06 -0300 (ADT) Received: from [192.168.13.1] by mail.kzsdabas.hu with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.69) (envelope-from ) id 1PBudD-0007bR-CV for pgsql-admin@postgresql.org; Fri, 29 Oct 2010 21:29:03 +0200 Message-ID: <4CCB206D.3040204@kzsdabas.hu> Date: Fri, 29 Oct 2010 21:28:45 +0200 From: =?ISO-8859-1?Q?G=E9mes_G=E9za?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.15) Gecko/20101027 Thunderbird/3.0.10 MIME-Version: 1.0 To: pgsql-admin@postgresql.org References: In-Reply-To: Content-Type: multipart/alternative; boundary="------------010601020209000207070705" X-SA-Exim-Connect-IP: 192.168.13.1 X-SA-Exim-Mail-From: geza@kzsdabas.hu Subject: Re: Using LDAP with postgresql 8.2 X-SA-Exim-Version: 4.2.1 (built Wed, 25 Jun 2008 17:20:07 +0000) X-SA-Exim-Scanned: Yes (on mail.kzsdabas.hu) X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.899 tagged_above=-10 required=5 tests=BAYES_00=-1.9, HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 201010/216 X-Sequence-Number: 35957 This is a multi-part message in MIME format. --------------010601020209000207070705 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi, I'm not an AD expert myself, but I've read somewhere, that AD disallows simple binds without using ssl. You could try enabling ssl on AD, or try the krb5 authentication method for pg. Good Luck Geza > > I've setup LDAP on Postgresql 8.3.6 by adding the following line to > pg_hba.conf. My Active Directory has a group called 'users group' > which contains an entry for user pgtest. > > host all pgtest xx.xxx.x.x/xx ldap > "ldap://server.mydomain.com:389/basedn;cn=;,ou=users > group,dc=mydomain,dc=com" > > I have restarted the PG server but when I try to connect via psql from > another host, I get the following error: - > > 2010-10-28 16:30:36 BST [1095]: [2-1] FATAL: LDAP authentication > failed for user "pgtest" > 2010-10-28 16:30:36 BST [1096]: [1-1] LOG: LDAP login failed for user > "cn=pgtest,ou=users group,dc=mydomain,dc=com" on server > "server.mydomain.com": error code 49 > > So it looks like the cn, ou and dc parameters are correct, but for > some reason Openldap is returning error 49, which is a generic > authentication failure message. > > Can anyone suggest anything that I might be doing wrong? Could it be > the line in pg_hba.conf that is wrong, or possibly the ldap package on > the server (debian linux) not working > properly? > > Any ideas much appreciated! > > > ------------------------------------------------------------------------ > From: kierenscott@hotmail.com > To: pgsql-admin@postgresql.org > Subject: Using LDAP with postgresql 8.2 > Date: Wed, 27 Oct 2010 17:57:32 +0000 > > Hi, > > I'm looking to implement LDAP authentication againt Active Directory > for my > Postgresql databases. What's people experiences of using LDAP for > authenticating logins with AD? > Is it easy to setup and is there anything to watch out for e.g. does > Postgresql do anything > intrusive on Active Directory (create anything) or does it just simply > bind to AD, validate the > username/password pair and return success/failure back to the client? > > Many thanks! --------------010601020209000207070705 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hi,
I'm not an AD expert myself, but I've read somewhere, that AD disallows simple binds without using ssl.
You could try enabling ssl on AD, or try the krb5 authentication method for pg.

Good Luck

Geza

I've setup LDAP on Postgresql 8.3.6 by adding the following line to pg_hba.conf. My Active Directory has a group called 'users group' which contains an entry for user pgtest.

host   all   pgtest    xx.xxx.x.x/xx      ldap "ldap://server.mydomain.com:389/basedn;cn=;,ou=users group,dc=mydomain,dc=com"

I have restarted the PG server but when I try to connect via psql from another host, I get the following error: -

2010-10-28 16:30:36 BST [1095]: [2-1] FATAL:  LDAP authentication failed for user "pgtest"
2010-10-28 16:30:36 BST [1096]: [1-1] LOG:  LDAP login failed for user "cn=pgtest,ou=users group,dc=mydomain,dc=com" on server "server.mydomain.com": error code 49

So it looks like the cn, ou and dc parameters are correct, but for some reason Openldap is returning error 49, which is a generic authentication failure message.

Can anyone suggest anything that I might be doing wrong? Could it be the line in pg_hba.conf that is wrong, or possibly the ldap package on the server (debian linux) not working
 properly?

Any ideas much appreciated!



From: kierenscott@hotmail.com
To: pgsql-admin@postgresql.org
Subject: Using LDAP with postgresql 8.2
Date: Wed, 27 Oct 2010 17:57:32 +0000

Hi,

I'm looking to implement LDAP authentication againt Active Directory for my
Postgresql databases. What's people experiences of using LDAP for authenticating logins with AD?
Is it easy to setup and is there anything to watch out for e.g. does Postgresql do anything
intrusive on Active Directory (create anything) or does it just simply bind to AD, validate the
username/password pair and return success/failure back to the client?

Many thanks!


--------------010601020209000207070705--