[postgis-devel] Mapping users in PostgreSQL

Tom Lane tgl at sss.pgh.pa.us
Sat Nov 7 18:10:58 PST 2009


=?UTF-8?Q?Jorge_Ar=C3=A9valo?= <jorge.arevalo at gmail.com> writes:
> And in pg_ident.conf file:
> # MAPNAME     IDENT-USERNAME    PG-USERNAME
>    mymap           jorge                            gis

> "jorge" is my Linux user, and "gis" is my database user.

> But I always get an authentication fail if I try a direct connection
> with "psql" and my user. The log file doesn't show any error.

You're misunderstanding what identmap does.  That line says that OS user
"jorge" is *allowed* to connect as database user "gis".  It doesn't
magically substitute that username, though, and psql doesn't know any
better than to send "jorge" as the database username.  You could do
"psql -U gis", or set PGUSER in your environment.

			regards, tom lane



More information about the postgis-devel mailing list