pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Guilherme Alberto <gui@maxihost.com.br>
To: pgsql-admin@postgresql.org
Subject: PostgreSQL Remote Connection
Date: Sun, 25 Sep 2005 12:30:53 -0300
Message-ID: <000d01c5c1e6$1f9bcbf0$3bd6cec8@maxihost> (raw)

Hello,

Im trying to make a remote connection using a Windows Program called "EMS PostgreSQL Manager".

I am having issues setting up the pg_hba.conf properly to allow a user to make connections only to his assigned database.

Following the PostgreSQL documentation I could sucessfuly connect using a user password with the following entry in pg_hba.conf:

host all all my_ip 255.255.255.255 md5

With the above line I could connect to the server using a user password, although I could see all the databases of the server and manage all of them.

When I change it to:

host database_that_user_should_connect all my_ip 255.255.255.255 md5

I get an error message: no pga_hba.conf entry for host "my_ip", user "user", database "template1" (dont know why it says template1 if the database I choose was another one)

I have also tried using:

host all all my_ip 255.255.255.255 ident test

With the proper lines inside pg_ident.conf for "test" *******:

pg_ident.conf
test user pg_user

With no success 

Anyone can help me ? I would like to allow a pg user to connect only to his assigned database providing the correct password.

Thank you very much.

Attachments:

frown.gif (image/gif, 378B) download view image

Message-ID: <000d01c5c1e6$1f9bcbf0$3bd6cec8@maxihost>
Permalink:  ../000d01c5c1e6$1f9bcbf0$3bd6cec8@maxihost/
Also on:    postgresql.org/message-id/000d01c5c1e6$1f9bcbf0$3bd6cec8@maxihost

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: gui@maxihost.com.br
  Subject: Re: PostgreSQL Remote Connection
  In-Reply-To: <000d01c5c1e6$1f9bcbf0$3bd6cec8@maxihost>
  References: <000d01c5c1e6$1f9bcbf0$3bd6cec8@maxihost>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox