Problem with pg_hba.conf

Started by Niral Trivediover 25 years ago2 messagesgeneral
Jump to latest
#1Niral Trivedi
niral.trivedi@insage.com

All,

I am having trouble doing db authentication with 'pg_hba.conf' file..

I have added two users using 'CREATE USER' command for a db. And then I have
created two separated password file to do authentication to two different db
in the system.

Also, I have added separate lines in 'pg_hba.conf' file for two db as
follows:

local db1 crypt file1.dat
local db2 crypt file2.dat

But problem is I can connect to both db using both password. What I supposed
to get is, I can connect to 'db1' only with username in 'file1.dat' and
'db2' with username in 'file2.dat'. But that is not happening!!!

Can anybody give some suggestions on this??

Thanks in advance..

Niral

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Niral Trivedi (#1)
Re: Problem with pg_hba.conf

Niral Trivedi writes:

Also, I have added separate lines in 'pg_hba.conf' file for two db as
follows:

local db1 crypt file1.dat
local db2 crypt file2.dat

Separate password files don't work with 'crypt', only 'password'.

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/