Re: pg_hba.conf confusion

Поиск
Список
Период
Сортировка
От Bruce Momjian
Тема Re: pg_hba.conf confusion
Дата
Msg-id 200206181642.g5IGgak04023@candle.pha.pa.us
обсуждение исходный текст
Ответ на pg_hba.conf confusion  ("David M. Kaplan" <dmkaplan@ucdavis.edu>)
Список pgsql-bugs
David M. Kaplan wrote:
> Hi,
>
> I recently experienced a weird bug with postgresql. I am running:
>
> postgresql-7.2.1-8
> postgresql-server-7.2.1-5
>
> I was trying to connect to a database on a my machine from another
> machine.  Initially, my pg_hba.conf looked like:
>
> host       all         127.0.0.1     0.0.0.0    ident    sameuser
> host    all    192.168.1.2    255.255.255.128    password
>
> where my machine is 192.168.1.1 and the client is 192.168.1.2.
> Connecting using psql -h 192.168.1.1 failed stating:
>
> FATAL 1: IDENT authentification failed for user 'me'
>
> Then I changed the order of the lines in my configuration file:
>
> host    all    192.168.1.2    255.255.255.128    password
> host       all         127.0.0.1     0.0.0.0    ident    sameuser
>
> Now the connection worked without problems.  In the first case, it seems
> to be trying to use IDENT authentification, even though that should only
> apply to localhost.

ident only socket authentication when you connection type is 'local',
not 'host'.  Even though you said 127.0.0.1, that is tcp to localhost,
not socket authentication. I think you wanted:

local   all                                      ident    sameuser
host    all    192.168.1.2    255.255.255.128    password

--
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026

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

Предыдущее
От: Reinhard Max
Дата:
Сообщение: Re: pg_hba.conf confusion
Следующее
От:
Дата:
Сообщение: could not convert (0xf9db) BIG5 to UTF-8