Re: Problem with pg_hba.conf - Mailing list pgsql-general

From Tom Lane
Subject Re: Problem with pg_hba.conf
Date
Msg-id 9068.976725915@sss.pgh.pa.us
Whole thread Raw
In response to Problem with pg_hba.conf  (Niral Trivedi <niral.trivedi@insage.com>)
Responses Database just stopped working. HELP  (Steve Heaven <steve@thornet.co.uk>)
List pgsql-general
Niral Trivedi <niral.trivedi@insage.com> 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

That looks correct as far as it goes.

> But problem is I can connect to both db using both password.

Are you sure the postmaster is checking the password at all?  It sounds
to me like the postmaster might be selecting some earlier entry in
pg_hba.conf and not using these two.  Did you comment out the default
entry for "local all trust"?  Are you perhaps connecting via IP, rather
than via a Unix socket?

            regards, tom lane

pgsql-general by date:

Previous
From: Niral Trivedi
Date:
Subject: RE: Problem with pg_hba.conf
Next
From: Marcos
Date:
Subject: Apache+Postgresql (mod_auth_pgsql)