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

Re: Authentication Problems

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Graham Vickrage <graham(at)digitalplanit(dot)com>
Cc: Postgres Admin <pgsql-admin(at)postgresql(dot)org>
Subject: Re: Authentication Problems
Date: 2001-03-14 16:13:27
Message-ID: Pine.LNX.4.30.0103141710510.1211-100000@peter.localdomain (view raw, whole thread or download thread mbox)
Lists: pgsql-admin
Graham Vickrage writes:

> host         all     	ident sameuser
> host         all     password
> I assumed that the above would solve my problem, which it only half manages.
> The local client connections are working correctly after putting
> PGHOST=localhost as an environment variable.
> HOWEVER when I connect via an internet site it will not allow a connection
> (password auth.), the error I get is: -
> DBI->connect failed: No pg_hba.conf entry for host localhost, user usr,
> database db

When the "internet site" is actually the localhost, then the first record
will match.  However, that record will not allow the connection because
"sameuser" is not the case.

> Is this because connections from the internet are currently being made as
> unix domain sockets instead of tcp/ip loopback via apache? If so how do I
> distinguish between internet and local connections.

If the connection is via Unix domain sockets, then you'd get a different
error message.

Peter Eisentraut      peter_e(at)gmx(dot)net

In response to

pgsql-admin by date

Next:From: John W CunninghamDate: 2001-03-14 17:36:53
Subject: RE: Crash
Previous:From: Tom LaneDate: 2001-03-14 15:59:04
Subject: Re: Crash

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