Re: postgresql connection problems

From: "Frances Collier" <fcollier(at)preparedresponse(dot)com>
To: "'Shane Ambler'" <pgsql(at)007Marketing(dot)com>
Cc: <pgsql-novice(at)postgresql(dot)org>
Subject: Re: postgresql connection problems
Date: 2006-04-20 15:47:36
Message-ID: 20060420154812.711FF5AF8FA@svr4.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Thank you so much. I changed devfrances to host in the pg_hba.conf file and
it worked. I thought "host" was a placeholder and I needed to put in an
actual machine name/ip. Thank you also for the link. I didn't see that the
first time around.

Sincerely,
Frances Collier

-----Original Message-----
From: Shane Ambler [mailto:pgsql(at)007Marketing(dot)com]
Sent: Tuesday, April 18, 2006 7:21 PM
To: Frances Collier; PostgreSQL Mailing lists
Subject: Re: [NOVICE] postgresql connection problems

I am guessing that entering devfrances you are entering a dns hostname of
the machine to allow connections - this is what would replace the
192.168.1.23 address but dns hostnames are not supported in pg_hba.conf. You
can enter a network such as 192.168.1.0/24 to allow anyone in the local
network to connect.

You must enter host at the start of the line not the dns hostname of the
machine you want to allow a connection from.

If you read the top of the pg_hba.conf file you will find the first column
refers to the type of connection - accepted values are :-
local
host
hostssl
hostnossl

A local connection is a client connection from the same machine as the
server. The host connections refer to clients connecting from another
machine over tcp.

So a line like
host all all 192.168.1.23/32 password
Would allow a connection to any database using any login username from the
machine at 192.168.1.23 using password authentication.

You can use the hostssl and hostnossl to specify that the connection from
that machine must use an ssl connection or cannot connect with an ssl
connection.

http://www.postgresql.org/docs/8.1/interactive/client-authentication.html
Provides the full documentation on these settings.

On 19/4/2006 8:49, "Frances Collier" <fcollier(at)preparedresponse(dot)com> wrote:

> Hello All,
>
> I am attempting to access postgresql on another machine through PGAdmin
III.
> I filled out the defaults in the "New Server Registration" dialog and
when
> I hit "OK" I get an error stating "Error connecting to the server: FATAL:
> missing or erroneous pg_hba.conf file HINT: See server log for details."
>
> The log file states that I have an invalid entry...
> The pg_hba.conf looks like the following:
>
> #IPV4 local connections:
> host all all 127.0.0.1/32 md5
> devfrances all all 192.168.1.23/32 password
>
> Note: I've also tried changing the devfrances to "... 192.168.1.23
> 255.255.255.0..." and "...md5" and "...trust"
>
> I've read all the documentation I can find on this particular setup and as
> far as I can tell, I am not doing anything wrong. Any ideas?
>
> Thank you,
> Frances Collier
>
>
>
>
> ---------------------------(end of broadcast)---------------------------
> TIP 4: Have you searched our list archives?
>
> http://archives.postgresql.org
>

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Ennio-Sr 2006-04-20 20:40:40 Re: Colors/bold chars in a select?
Previous Message Wang, Marcus 2006-04-20 04:44:01 Re: pg_dump and restore - views