Re: Postgresql gss user map doesn't work

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: xujian <jamesxu(at)outlook(dot)com>
Cc: "pgsql-admin(at)postgresql(dot)org" <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Postgresql gss user map doesn't work
Date: 2015-07-01 06:38:45
Message-ID: CABUevEycxZ5eY5d_4PUYcWKHcwGUKax=TX9nY39yysr7EMv9_w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

On Tue, Jun 30, 2015 at 11:37 PM, xujian <jamesxu(at)outlook(dot)com> wrote:

> it looks like I need to specify the mapping user name in the command, for
> instance, if my credential is xxx, I want to login as user company_com_xxx,
> I have to run command like
>
> /psql -d dbname -h postgresql.server.name -U company_com_xxx
>
> but why I need to specify the mapping user name company_com_xxx in
> command line?
> does anyone have same issue? thanks
>
>

Yes, that is working as intended. You always have to tell postgres which
user you want to log in with, pg_ident only allows you to authenticate with
a different name, you still have to tell the system which one you want.

You can also put the username in the PGUSER environment variable if it's
something you want to deploy across many users.

--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/

In response to

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Shih Théo 2015-07-01 07:06:36 What is the correct steps if tar process is killed during pg_start_backup() and pg_stop_backup()
Previous Message Joshua D. Drake 2015-07-01 01:12:56 Re: PostgreSQL doesn't log