Search Postgresql Archives

回复: ident auth does not works as usual

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.g.johnston@xxxxxxxxx>
发送时间: 2023年8月28日 14:44
收件人: pan snowave <windxp@xxxxxxx>
抄送: Alban Hertroys <haramrae@xxxxxxxxx>; pgsql-general@xxxxxxxxxxxxxxxxxxxx <pgsql-general@xxxxxxxxxxxxxxxxxxxx>
主题: Re: ident auth does not works as usual
 
On Mon, Aug 28, 2023 at 7:34 AM pan snowave <windxp@xxxxxxx> 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.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]

  Powered by Linux