X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 8E85F3A431C for ; Thu, 6 Jan 2005 00:55:01 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 93782-03 for ; Thu, 6 Jan 2005 00:54:50 +0000 (GMT) Received: from www.postgresql.com (unknown [200.46.204.209]) by svr1.postgresql.org (Postfix) with ESMTP id DA7B73A4299 for ; Thu, 6 Jan 2005 00:54:52 +0000 (GMT) Received: from mail.kzsdabas.sulinet.hu (szerver2.kzsdabas.sulinet.hu [195.199.159.210]) by www.postgresql.com (Postfix) with SMTP id 67EB173970F for ; Wed, 5 Jan 2005 21:25:45 +0000 (GMT) Received: from localhost (localhost [127.0.0.1]) by mail.kzsdabas.sulinet.hu (Postfix) with ESMTP id 301CD64740D9; Wed, 5 Jan 2005 22:20:12 +0100 (CET) Received: from mail.kzsdabas.sulinet.hu ([127.0.0.1]) by localhost (mail.kzsdabas.sulinet.hu [127.0.0.1]) (amavisd-new, port 10025) with LMTP id 28666-07; Wed, 5 Jan 2005 22:20:11 +0100 (CET) Received: from [10.0.13.1] (kag.kzsdabas.hu [10.0.13.1]) by mail.kzsdabas.sulinet.hu (Postfix) with ESMTP id 2C62B64740C0; Wed, 5 Jan 2005 22:20:11 +0100 (CET) Message-ID: <41DC5A19.9020506@kzsdabas.sulinet.hu> Date: Wed, 05 Jan 2005 22:20:25 +0100 From: =?ISO-8859-1?Q?G=E9mes_G=E9za?= User-Agent: Mozilla/5.0 (X11; U; Linux i686; hu; rv:1.7.2) Gecko/20040804 X-Accept-Language: hu, en-us MIME-Version: 1.0 To: Thomas Leduc Cc: pgsql-admin@postgresql.org Subject: Re: postgresql 7.4.6 and pam_ldap References: <20050105164321.GA21400@volga.lan.cerma.archi.fr> In-Reply-To: <20050105164321.GA21400@volga.lan.cerma.archi.fr> X-Enigmail-Version: 0.85.0.0 X-Enigmail-Supports: pgp-inline, pgp-mime Content-Type: text/plain; charset=ISO-8859-1; format=flowed X-Virus-Scanned: by amavisd-new at kzsdabas.sulinet.hu Content-Transfer-Encoding: quoted-printable X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.28 tagged_above=0 required=5 tests=AWL, DNS_FROM_RFC_ABUSE X-Spam-Level: X-Archive-Number: 200501/31 X-Sequence-Number: 15890 Thomas Leduc =EDrta: >Hi, >I know that i'm not the 1st one who want's to use pam_ldap to >authenticate users (55 posts with keywords ldap and pam...). But it >also didn't work for me. Please, what's wrong with the following: > >% pg_config --configure >'--host=3Di386-redhat-linux' '--build=3Di386-redhat-linux' >[...] >'--with-openssl' '--with-pam' '--with-krb5=3D/usr' '--enable-nls' >[...] > >% cat < pg_hba.conf >local all postgres ident sameuser >local all all pam postgresql >host all all 127.0.0.1/32 pam postgresql >host all all 192.168.10.0/24 pam postgresql >EOF > >% cat < /etc/pam.d/postgresql--tage >auth required pam_stack.so service=3Dsystem-auth >EOF > >% pg_ctl reload >% createuser --adduser --createdb leduc >% createdb --owner=3Dleduc --echo leduc > >% id postgres >uid=3D26(postgres) gid=3D26(postgres) groupes=3D26(postgres) >$ psql --quiet leduc >leduc=3D# SELECT 1+1; >... IT WORKS !!! > >% id >uid=3D252(leduc) gid=3D100(users) groupes=3D100(users) >% psql >Mot de passe :=20 >psql: FATAL: PAM authentication =E9chou=E9e pour l'utilisateur "leduc" >... IT DOESN'T WORK !!! >% tail -f /var/log/messages >Jan 5 17:41:17 tage postgresql(pam_unix)[12625]: auth could not identif= y password for [leduc] >Jan 5 17:41:21 tage postgresql(pam_unix)[12627]: authentication failure= ; logname=3D uid=3D26 euid=3D26 tty=3D ruser=3D rhost=3D user=3Dleduc > >% psql -U leduc -W >Mot de passe :=20 >psql: FATAL: PAM authentication =E9chou=E9e pour l'utilisateur "leduc" >... IT DOESN'T WORK !!! >% tail -f /var/log/messages >Jan 5 17:42:11 tage postgresql(pam_unix)[12635]: authentication failure= ; logname=3D uid=3D26 euid=3D26 tty=3D ruser=3D rhost=3D user=3Dleduc > > =20 > I would suggest to retry it with a postgres user readable=20 /etc/pam.d/postgresql an with a pg_hba.conf without postgres specified on the last field after=20 pam. Also if you want ldap authentication, take care, that in=20 /etc/pam.d/postgresql you don't reference any other non pam_ldap module,=20 and your /etc/ldap.conf is readable by postgres user. Good Luck! Geza