[prev in list] [next in list] [prev in thread] [next in thread] 

List:       postgresql-general
Subject:    =?gb2312?B?u9i4tDogaWRlbnQgYXV0aCBkb2VzIG5vdCB3b3JrcyBhcyB1c3VhbA==?=
From:       pan snowave <windxp () live ! cn>
Date:       2023-08-28 3:30:17
Message-ID: OS3P286MB1933E0EFD47E8EEA7D1A4A07D3E0A () OS3P286MB1933 ! JPNP286 ! PROD ! OUTLOOK ! COM
[Download RAW message or body]

[Attachment #2 (text/plain)]

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.


[Attachment #3 (text/html)]

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} \
</style> </head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> Hi</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof"> <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof ContentPasted0"> &quot;Show your psql command \
that is failing.&quot;</div> <div style="font-family: Calibri, Helvetica, sans-serif; \
font-size: 12pt; color: rgb(0, 0, 0);" class="elementToProof ContentPasted0"> <br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: \
rgb(0, 0, 0);" class="elementToProof ContentPasted0 ContentPasted1"> [root@~ pg]# \
/usr/local/pgsql/bin/psql &nbsp; -p5432 -d db1&nbsp; &nbsp; &nbsp;-h127.0.0.1 <div \
class="ContentPasted1">psql: error: connection to server at &quot;127.0.0.1&quot;, \
port 5432 failed: FATAL: &nbsp;Ident authentication failed for user \
&quot;root&quot;</div> <div class="ContentPasted1"><br>
</div>
<div class="ContentPasted1">If the error is&nbsp;&nbsp;<span style="display: inline \
!important; background-color: rgb(255, 255, 255);" class="ContentPasted2">Ident \
authentication failed for user &quot;<b>cce</b>&quot;, i think the ident config file \
taked effect.</span></div> <div class="ContentPasted1"><span style="display: inline \
!important; background-color: rgb(255, 255, 255);" class="ContentPasted2"><br> \
</span></div> <div class="ContentPasted1"><span style="display: inline !important; \
background-color: rgb(255, 255, 255);" class="ContentPasted2 \
ContentPasted3">Reference information:<br> </span></div>
<div class="ContentPasted1"><span style="display: inline !important; \
background-color: rgb(255, 255, 255);" class="ContentPasted2 ContentPasted3">PG \
version 15.3</span></div> <div class="ContentPasted1"><span style="display: inline \
!important; background-color: rgb(255, 255, 255);" class="ContentPasted2"><br> \
</span></div> <div class="ContentPasted1"><br>
</div>
<div class="ContentPasted1">Thanks.</div>
</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" \
style="font-size:11pt" color="#000000"><b>·¢¼þÈË:</b> David G. Johnston \
&lt;david.g.johnston@gmail.com&gt;<br> <b>·¢ËÍʱ¼ä:</b> 2023Äê8Ô 26ÈÕ 14:43<br>
<b>ÊÕ¼þÈË:</b> pan snowave &lt;windxp@live.cn&gt;<br>
<b>³­ËÍ:</b> pgsql-general@lists.postgresql.org \
&lt;pgsql-general@lists.postgresql.org&gt;<br> <b>Ö÷Ìâ:</b> Re: ident auth does not \
works as usual</font> <div>&nbsp;</div>
</div>
<div>On Saturday, August 26, 2023, pan snowave &lt;<a \
href="mailto:windxp@live.cn">windxp@live.cn</a>&gt; wrote:<br> <blockquote \
class="x_gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; \
padding-left:1ex"> <div dir="ltr">
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> Well&nbsp; , describe as follows:</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> pg_pba.conf</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> host &nbsp; &nbsp;all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
root &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://127.0.0.1/32" \
target="_blank"> 127.0.0.1/32</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; ident &nbsp; \
&nbsp;map=test <div>host &nbsp; &nbsp;all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
all &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <a href="http://127.0.0.1/32" \
target="_blank"> 127.0.0.1/32</a> &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; \
&nbsp;trust</div> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> pg_indent.conf</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> test&nbsp; &nbsp;root&nbsp; &nbsp; cce</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> <br>
</div>
<div style="font-family:Calibri,Helvetica,sans-serif; font-size:12pt; \
color:rgb(0,0,0)"> and&nbsp; login pg&nbsp; via&nbsp; root&nbsp; user , it doesnt \
work</div> </div>
</blockquote>
<div><br>
</div>
<div>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.&nbsp; In short, the mapping is \
useless.</div> <div><br>
</div>
<div>David J.</div>
</div>
</body>
</html>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic