Re: [Auth] "ident" method and LDAP user accounts - Mailing list pgsql-general

From Florian G. Pflug
Subject Re: [Auth] "ident" method and LDAP user accounts
Date
Msg-id 4226D320.7070407@phlo.org
Whole thread Raw
In response to [Auth] "ident" method and LDAP user accounts  (Stephane Bortzmeyer <bortzmeyer@nic.fr>)
Responses Re: [Auth] "ident" method and LDAP user accounts
List pgsql-general
Stephane Bortzmeyer wrote:
> All the user accounts, including mine, are in a LDAP database. Thanks
> to NSS (Name Service Switch) all applications have access to the LDAP
> accounts (getpwuid(3) and getpwnam(3) use LDAP). But not PostgreSQL.
I did similar setups and both gentoo and debian/sarge, and this was
never a problem.

Might it be that the postgres user is not allowed to read /etc/ldap.conf
- or however your nss_ldap config file is called? I'd try su-ing to the
postgres user, and check if everything (ls -l /home, ... - you get the
idea) works as expected.

> When I connect locally (Linux as SO_PEERCRED so the ident daemon is
> not used) with the "ident" method, I get rejected.
>
> If I create an ident map to map the numeric UID to my name, it works:
>
> # MAPNAME     IDENT-USERNAME    PG-USERNAME
> ldapuser      1000              bortzmeyer
If all else fails, you could create this via a shellscript from your
ldap database - but of course thats ugly...

greetings, Florian Pflug

Attachment

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: [Auth] "ident" method and LDAP user accounts
Next
From: Stephane Bortzmeyer
Date:
Subject: Re: [Auth] "ident" method and LDAP user accounts