回复: ident auth does not works as usual

From: pan snowave <windxp(at)live(dot)cn>
To: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
Cc: Alban Hertroys <haramrae(at)gmail(dot)com>, "pgsql-general(at)lists(dot)postgresql(dot)org" <pgsql-general(at)lists(dot)postgresql(dot)org>
Subject: 回复: ident auth does not works as usual
Date: 2023-09-19 03:46:07
Message-ID: OS3P286MB1933DC61D588D95C768F1F2CD3FAA@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

HI

I've got the right meanng of pg_hba.conf and pg_ident.conf.

My previous understanding was incorrect. I thought pgserver would automatically handle the conversion between OS users and PostgreSQL roles.

Thanks all.

________________________________
发件人: David G. Johnston <david(dot)g(dot)johnston(at)gmail(dot)com>
发送时间: 2023年8月28日 14:44
收件人: pan snowave <windxp(at)live(dot)cn>
抄送: Alban Hertroys <haramrae(at)gmail(dot)com>; pgsql-general(at)lists(dot)postgresql(dot)org <pgsql-general(at)lists(dot)postgresql(dot)org>
主题: Re: ident auth does not works as usual

On Mon, Aug 28, 2023 at 7:34 AM pan snowave <windxp(at)live(dot)cn<mailto:windxp(at)live(dot)cn>> wrote:
But when i connect to psserver by using os user root
/usr/local/pgsql/bin/psql -p5432 -d db1 -h127.0.0.1

If you want to login as the cce role add " -U cce " to your command line (or one of the various other ways you can specify a db role name via the cli or libpq)

psql -U cce -h 127.0.0.1 -d db1

Keep in mind you could very well have two lines in your pg_ident.conf file:

test root cce
test root ddf

David J.

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Anthony Apollis 2023-09-19 17:09:15 Calculating Days/Time(Are Loops Neccessary?)
Previous Message Wen Yi 2023-09-19 00:59:28 [Beginner Question]What should I do if I want to achieve lsm-tree index in postgresql?