Skip site navigation (1) Skip section navigation (2)

Re: pg_hba.conf confusion

From: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
To: "David M(dot) Kaplan" <dmkaplan(at)ucdavis(dot)edu>
Cc: pgsql-bugs(at)postgresql(dot)org
Subject: Re: pg_hba.conf confusion
Date: 2002-06-18 16:42:36
Message-ID: (view raw, whole thread or download thread mbox)
Lists: 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    ident    sameuser
> host    all    password
> where my machine is and the client is 
> Connecting using psql -h failed stating:
> FATAL 1: IDENT authentification failed for user 'me'
> Then I changed the order of the lines in my configuration file:
> host    all    password
> host       all    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, that is tcp to localhost,
not socket authentication. I think you wanted:

local   all                                      ident    sameuser
host    all    password

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

In response to

pgsql-bugs by date

Next:From: Reinhard MaxDate: 2002-06-18 16:51:57
Subject: Re: pg_hba.conf confusion
Previous:From: David M. KaplanDate: 2002-06-18 16:28:19
Subject: Re: pg_hba.conf confusion

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group