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

Re: user management and edbldr use

From: "Kevin Grittner" <Kevin(dot)Grittner(at)wicourts(dot)gov>
To: "Karuna Karpe" <karuna(dot)karpe(at)os3infotech(dot)com>, <pgsql-admin(at)postgresql(dot)org>
Subject: Re: user management and edbldr use
Date: 2011-10-24 19:35:10
Message-ID: 4EA5779E02000025000424F2@gw.wicourts.gov (view raw or flat)
Thread:
Lists: pgsql-admin
Karuna Karpe <karuna(dot)karpe(at)os3infotech(dot)com> wrote:
 
> I am create one linux user that "dba"
 
> I create one database user "dba_user"
 
> I add entry into pg_ident.conf
> 
> MAPNAME       SYSTEM-USERNAME         PG-USERNAME
>   dba_map       dba                     dba_user
> 
> I want to connect dba user to database edb.
> ./psql -d edb -U dba
> 
> it give error can't connect.  Please explain me how do this?
 
You didn't show your pg_hba.conf file, which is a critical part of
this picture; but from what you did show, it appears that you're not
trying to use this correctly.  The mapping you show would allow a
user who had been authenticated as dba externally to log in to
PostgreSQL as dba_user.  You should be using the PostgreSQL user
name on the psql command line, not the OS user name.  You need a
pg_hba.conf line which specifies how the OS user will be
authenticated and specifying which map will be used to get from that
OS user to which PostgreSQL user(s).  Note that there might be more
than one PostgreSQL user that a particular OS user is allowed to use
for connections.
 
http://www.postgresql.org/docs/current/interactive/auth-username-maps.html
 
-Kevin

In response to

pgsql-admin by date

Next:From: Greg WilliamsonDate: 2011-10-24 21:56:08
Subject: postgres 9.0.4, pg_restore and indexes
Previous:From: Sally NayerDate: 2011-10-24 13:52:38
Subject: Create Temp tables on SLave

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