From: Kevin Grittner <Kevin.Grittner@wicourts.gov>
To: Karuna Karpe <karuna.karpe@os3infotech.com>
To: pgsql-admin@postgresql.org
Subject: Re: user management and edbldr use
Date: Mon, 24 Oct 2011 14:35:10 -0500
Message-ID: <4EA5779E02000025000424F2@gw.wicourts.gov> (raw)
In-Reply-To: <CAC-LqboVfapMU-UOmvOp-6c=T5EmV3=QWM9izEWZ7mYTKt+NiA@mail.gmail.com>
References: <CAC-LqboVfapMU-UOmvOp-6c=T5EmV3=QWM9izEWZ7mYTKt+NiA@mail.gmail.com>
Karuna Karpe <karuna.karpe@os3infotech.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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: Kevin.Grittner@wicourts.gov, karuna.karpe@os3infotech.com
Subject: Re: user management and edbldr use
In-Reply-To: <4EA5779E02000025000424F2@gw.wicourts.gov>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox