Re: Pg_hba not using local setting - Mailing list pgsql-general

From Doug McNaught
Subject Re: Pg_hba not using local setting
Date
Msg-id m31y19g4xn.fsf@varsoon.wireboard.com
Whole thread Raw
In response to Re: Pg_hba not using local setting  (James Hall <James.Hall@RadioShack.com>)
Responses Re: Pg_hba not using local setting  (Oliver Elphick <olly@lfix.co.uk>)
List pgsql-general
James Hall <James.Hall@RadioShack.com> writes:

> Thanks for your response.
>
> I changed pg_hba.conf to include the server ip address as shown below:
> ---
> Local        all        trust
> Host        all        123.456.789.10        255.255.255.0
> password
> ---
>
> But still have the same result (users can login with any password if local
> is set to trust). The web server is on the same machine as the database, no
> java used.
>
> Did I misunderstand your comment regarding telling the webserver to connect
> using an IP address?

Yes.

You need to set the webapp's database config to make it connect to
an IP address instead of using the Unix socket (which it does by
default for same-machine connections).  I can't tell you how to do
this because you haven't said what language/app server you're using
for the website.

-Doug

pgsql-general by date:

Previous
From: Doug McNaught
Date:
Subject: Re: contrib/lo and restoring databases
Next
From: Andrew Sullivan
Date:
Subject: Re: The folding of unquoted names to lower case in PostgreSQL