pg.ddx.io pgsql-general@postgresql.org mailing list archive
help / color / mirror / Atom feed回复: ident auth does not works as usual
2+ messages / 1 participants
[nested] [flat]
* 回复: ident auth does not works as usual
@ 2023-08-27 01:54 pan snowave <windxp@live.cn>
1 sibling, 0 replies; 2+ messages in thread
From: pan snowave @ 2023-08-27 01:54 UTC (permalink / raw)
To: Alban Hertroys <haramrae@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
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.
^ permalink raw reply [nested|flat] 2+ messages in thread
* 回复: ident auth does not works as usual
@ 2023-08-28 03:30 pan snowave <windxp@live.cn>
1 sibling, 0 replies; 2+ messages in thread
From: pan snowave @ 2023-08-28 03:30 UTC (permalink / raw)
To: David G. Johnston <david.g.johnston@gmail.com>; +Cc: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
Hi
"Show your psql command that is failing."
[root@~ pg]# /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"
If the error is Ident authentication failed for user "cce", i think the ident config file taked effect.
Reference information:
PG version 15.3
Thanks.
________________________________
发件人: David G. Johnston <david.g.johnston@gmail.com>
发送时间: 2023年8月26日 14:43
收件人: pan snowave <windxp@live.cn>
抄送: pgsql-general@lists.postgresql.org <pgsql-general@lists.postgresql.org>
主题: Re: ident auth does not works as usual
On Saturday, August 26, 2023, pan snowave <windxp@live.cn<mailto:windxp@live.cn>> wrote:
Well , describe as follows:
pg_pba.conf
host all root 127.0.0.1/32<http://127.0.0.1/32; ident map=test
host all all 127.0.0.1/32<http://127.0.0.1/32; trust
pg_indent.conf
test root cce
and login pg via root user , it doesnt work
You are saying root os user can login as pg role cce but that line of the pg_hba.conf doesn’t permit cce to login. In short, the mapping is useless.
David J.
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2023-08-28 03:30 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2023-08-27 01:54 ` pan snowave <windxp@live.cn>
2023-08-28 03:30 ` 回复: ident auth does not works as usual pan snowave <windxp@live.cn>
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