Received: from maia.hub.org (maia-3.hub.org [200.46.204.243]) by mail.postgresql.org (Postfix) with ESMTP id 7B4391337B82 for ; Fri, 29 Oct 2010 16:36:25 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.243]) (amavisd-maia, port 10024) with ESMTP id 70892-02 for ; Fri, 29 Oct 2010 19:36:18 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mail.postgresql.org (Postfix) with ESMTP id 98FDF1336DB6 for ; Fri, 29 Oct 2010 16:36:17 -0300 (ADT) Received: by wwi18 with SMTP id 18so4511359wwi.1 for ; Fri, 29 Oct 2010 12:36:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:cc:content-type :content-transfer-encoding; bh=NXwXK26Dj7q9US4BNqnms5XTSkvwk7wHZvIC/qyF9js=; b=durP/hlyA0Aph+ph2sDcB4HFQt3zNEQwJ/icGQkVKBwJsd95TXbfqgq74D+YigHQhW P/CFRERtpR9xMpew/V9JJZVen5pTtF0sWVfqpL3QmtPDqvOO92qWMJWHwstAlc3IXxOo EYgeicnF/L7V0NaChvb4A4WNG19oNWHM80V6w= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; b=cLZ+vhuiQ8KUhiSNUvTx/wffG55PXMTXpvUOewnOhzp7/rUURCzuMzTTfHePF63ZWK mSjLLDFbtncQWwfgdLqWqsZJXp7ZS3FHCrCu6TzjXtydqHPmJBBadAzyVMg3tGxF5Xa3 MkZRBGFtay8Q3v5TPvvtTq0bBHxPDY9vUXPj8= MIME-Version: 1.0 Received: by 10.216.6.201 with SMTP id 51mr2007954wen.110.1288380975983; Fri, 29 Oct 2010 12:36:15 -0700 (PDT) Received: by 10.216.157.82 with HTTP; Fri, 29 Oct 2010 12:36:15 -0700 (PDT) In-Reply-To: References: Date: Fri, 29 Oct 2010 17:36:15 -0200 Message-ID: Subject: Re: Using LDAP with postgresql 8.2 From: Victor Hugo Cc: pgsql-admin@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-0.879 tagged_above=-10 required=5 tests=BAYES_00=-1.9, MISSING_HEADERS=1.021, RCVD_IN_DNSWL_NONE=-0.0001 X-Spam-Level: X-Archive-Number: 201010/218 X-Sequence-Number: 35959 Hi, Do you compile your postgresql with clause --with-ldap ?? Configuration pg_hba.conf: host base_central all 0.0.0.0 0.0.0.0 ldap "ldap://172.16.10.2/dc=3Dmydomain,dc=3Dcom;uid=3D;,ou=3DUsers,dc=3Dmydomain= ,dc=3Dcom" Verify now... See you soon. []=B4s victor hugo Brazil-RJ 2010/10/28 Kieren Scott : > Hi, > > 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=A0=A0 all=A0=A0 pgtest=A0=A0=A0 xx.xxx.x.x/xx =A0=A0=A0=A0 ldap > "ldap://server.mydomain.com:389/basedn;cn=3D;,ou=3Dusers > group,dc=3Dmydomain,dc=3Dcom" > > 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:=A0 LDAP authentication faile= d for > user "pgtest" > 2010-10-28 16:30:36 BST [1096]: [1-1] LOG:=A0 LDAP login failed for user > "cn=3Dpgtest,ou=3Dusers group,dc=3Dmydomain,dc=3Dcom" 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 > =A0properly? > > 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 bi= nd > to AD, validate the > username/password pair and return success/failure back to the client? > > Many thanks! > --=20 []=B4s Victor Hugo