Skip site navigation (1) Skip section navigation (2)

postgresql 7.4.6 and pam_ldap

From: Thomas Leduc <thomas(dot)leduc(at)cerma(dot)archi(dot)fr>
To: pgsql-admin(at)postgresql(dot)org
Subject: postgresql 7.4.6 and pam_ldap
Date: 2005-01-05 16:43:21
Message-ID: 20050105164321.GA21400@volga.lan.cerma.archi.fr (view raw or flat)
Thread:
Lists: pgsql-admin
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=i386-redhat-linux' '--build=i386-redhat-linux'
[...]
'--with-openssl' '--with-pam' '--with-krb5=/usr' '--enable-nls'
[...]

% cat <<EOF > 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 <<EOF > /etc/pam.d/postgresql--tage
auth       required     pam_stack.so service=system-auth
EOF

% pg_ctl reload
% createuser --adduser --createdb leduc
% createdb --owner=leduc --echo leduc

% id postgres
uid=26(postgres) gid=26(postgres) groupes=26(postgres)
$ psql --quiet leduc
leduc=# SELECT 1+1;
...			IT WORKS !!!

% id
uid=252(leduc) gid=100(users) groupes=100(users)
% psql
Mot de passe : 
psql: FATAL:  PAM authentication échouée 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 identify password for [leduc]
Jan  5 17:41:21 tage postgresql(pam_unix)[12627]: authentication failure; logname= uid=26 euid=26 tty= ruser= rhost=  user=leduc

% psql -U leduc -W
Mot de passe : 
psql: FATAL:  PAM authentication échouée 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= uid=26 euid=26 tty= ruser= rhost=  user=leduc

-- 
Thomas LEDUC

CNRS UMR 1563 - Laboratoire CERMA - Ecole d'Architecture de Nantes
Tel: +33 (0) 2 40 59 04 59 --  Fax : +33 (0) 2 40 59 11 77
EAN - Rue Massenet - BP 81931 - 44319 NANTES cedex 3
GPG KeyID: B2342343 Fingerprint: D62CF1A9D4BEDE671602504C46514CC8B2342343


Responses

pgsql-admin by date

Next:From: Gémes GézaDate: 2005-01-05 21:20:25
Subject: Re: postgresql 7.4.6 and pam_ldap
Previous:From: Jimmy P ManiDate: 2005-01-05 05:45:35
Subject: backup

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group