pg.ddx.io  pgsql-general@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: pan snowave <windxp@live.cn>
To: Alban Hertroys <haramrae@gmail.com>
Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Subject: 回复: ident auth does not works as  usual
Date: Sun, 27 Aug 2023 01:54:25 +0000
Message-ID: <OS3P286MB193327FB105CD72F695D0946D3E1A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <B8F2D70E-A224-409A-A8DA-330552FBF962@gmail.com>
References: <OS3P286MB1933B415C59DC5C600DC0983D3E2A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM>
	<B8F2D70E-A224-409A-A8DA-330552FBF962@gmail.com>

Hi,

Sorry,   the name of ident file  that i used  is wrong,  it is pg_ident.conf (the same as you says)

And, I found  pg_ident.conf works, because  i can found ident entry in pg views ,

 line_number | map_name | sys_name | pg_username | error
-------------+----------+----------+-------------+-------
          43 | test     | root     | cce         |

But when i connect to psserver by using os user root
/usr/local/pgsql/bin/psql   -p5432 -d db1     -h127.0.0.1
psql: error: connection to server at "127.0.0.1", port 5432 failed: FATAL:  Ident authentication failed for user "root"

I have check  config files many times,  everything is right, and hba config file content is:

# "local" is for Unix domain socket connections only
local   all             all                                     peer
# IPv4 local connections:
host    all             root             127.0.0.1/32           ident    map=test
host    all             all             127.0.0.1/32            trust
# IPv6 local connections:
host    all             all             ::1/128                 md5
# Allow replication connections from localhost, by a user with the
# replication privilege.
local   replication     all                                     trust
host    replication     all             127.0.0.1/32            trust
host    replication     all             ::1/128                 trust


Thanks.

________________________________
发件人: Alban Hertroys <haramrae@gmail.com>
发送时间: 2023年8月26日 10:38
收件人: pan snowave <windxp@LIVE.CN>
抄送: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
主题: Re: ident auth does not works as usual


> On 26 Aug 2023, at 11:31, pan snowave <windxp@LIVE.CN> wrote:

(…)

> pg_indent.conf
>
> test   root    cce

If that is indeed the name of the file, that would explain your problem. No doubt that it should be named pg_ident.conf instead, without the ’n'.

Alban Hertroys
--
If you can't see the forest for the trees,
cut the trees and you'll find there is no forest.



view thread (2+ messages)  latest in thread

Message-ID: <OS3P286MB193327FB105CD72F695D0946D3E1A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM>
Permalink:  ../OS3P286MB193327FB105CD72F695D0946D3E1A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM/
Also on:    postgresql.org/message-id/OS3P286MB193327FB105CD72F695D0946D3E1A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM

 · 

reply

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 from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-general@postgresql.org
  Cc: windxp@live.cn, haramrae@gmail.com
  Subject: Re: 回复: ident auth does not works as  usual
  In-Reply-To: <OS3P286MB193327FB105CD72F695D0946D3E1A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM>
  References: <OS3P286MB1933B415C59DC5C600DC0983D3E2A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM> <B8F2D70E-A224-409A-A8DA-330552FBF962@gmail.com> <OS3P286MB193327FB105CD72F695D0946D3E1A@OS3P286MB1933.JPNP286.PROD.OUTLOOK.COM>

* 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