ident auth does not works as usual

2023-08-26 Thread pan snowave
Well  , describe as follows:

pg_pba.conf
hostall root 127.0.0.1/32   ident
map=test
hostall all 127.0.0.1/32trust


pg_indent.conf

test   rootcce


and  login pg  via  root  user , it doesnt work

error info is

2023-08-26 16:56:29.484 CST [18349] LOG:  no match in usermap "test" for user 
"root" authenticated as "root"
2023-08-26 16:56:29.484 CST [18349] FATAL:  Ident authentication failed for 
user "root"
2023-08-26 16:56:29.484 CST [18349] DETAIL:  Connection matched pg_hba.conf 
line 91: "hostall root 127.0.0.1/32   ident 
   map=test"


i checked config file  many times, and could not find  any reason  of this 
error.

pls help me.

thanks.





Re: ident auth does not works as usual

2023-08-26 Thread Alban Hertroys


> On 26 Aug 2023, at 11:31, pan snowave  wrote:

(…)

> pg_indent.conf
> 
> test   rootcce

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.





Re: ident auth does not works as usual

2023-08-26 Thread David G. Johnston
On Saturday, August 26, 2023, pan snowave  wrote:

> Well  , describe as follows:
>
> pg_pba.conf
> hostall root 127.0.0.1/32   ident
>  map=test
> hostall all 127.0.0.1/32trust
>
>
> pg_indent.conf
>
> test   rootcce
>
>
> 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.