Re: Pg_hba not using local setting

Поиск
Список
Период
Сортировка
От Oliver Elphick
Тема Re: Pg_hba not using local setting
Дата
Msg-id 1047855329.1344.37.camel@linda.lfix.co.uk
обсуждение исходный текст
Ответ на Re: Pg_hba not using local setting  (Doug McNaught <doug@mcnaught.org>)
Список pgsql-general
On Fri, 2003-03-14 at 18:48, Doug McNaught wrote:
> 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.

The webserver is on the same mahine and is not specifying a hostname
when it connects to PostgreSQL; therefore a Unix socket is used and the
local line in pg_hba.conf governs it.  If you tell it to connect to
localhost, it will use TCP/IP instead.  You then need a host line for
127.0.0.1.

--
Oliver Elphick                                Oliver.Elphick@lfix.co.uk
Isle of Wight, UK                             http://www.lfix.co.uk/oliver
GPG: 1024D/3E1D0C1C: CA12 09E0 E8D5 8870 5839  932A 614D 4C34 3E1D 0C1C
                 ========================================
     "Bless them which persecute you; bless, and curse not.
      Rejoice with them that do rejoice, and weep with them
      that weep. Recompense to no man evil for evil. Provide
      things honest in the sight of all men."
                                  Romans 12:14,15,17


В списке pgsql-general по дате отправления:

Предыдущее
От: "Guillaume Houssay"
Дата:
Сообщение: Data TYPE Creation
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: [webmaster] Online docs down again