pg.ddx.io  pgsql-interfaces@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Herouth Maoz <herouth@oumail.openu.ac.il>
To: Mark Dzmura <mdz@phalanx.phalanx.net>
To: pgsql-interfaces@postgreSQL.org
Subject: Re: [INTERFACES] (Yet another) unable to connect w/ JDBC via hostname
Date: Wed, 28 Jul 1999 15:01:11 +0300
Message-ID: <l03130301b3c4a09ae327@[147.233.159.109]> (raw)
In-Reply-To: <379DF04A.D83FB420@phalanx.net>

At 20:45 +0300 on 27/07/1999, Mark Dzmura wrote:


> 4. The access file, pg_hba.conf contains the following line:
>
>    host         all   208.205.224.0   255.255.255.0     ident     sameuser
>
>    The intention is to allow any host on the local network to
>    access any database using "ident" validation semantics (unix users).
>
> 5. The database was stopped and started after making these changes.
>
> 6. The following Java code tries to open a connection (in both
>    the working and non-working cases):
>
>    Connection db = DriverManager.getConnection(dbURL,
>               user,
>               pass);
>
>  The user and pass strings are a valid unix user and password,
>  and the user has full access to the database in question.
>
>  As mentioned above, This call throws an exception if dbURL is
>  fully qualified (even if the machine name is the localhost),
>  but NOT if it refers to a local database.

1. Does identd run on your system?

2. Is the user you pass to the connection the same as the one that
   actually runs the program? This is important, because you asked
   Postgres to check by Ident that the user who tries to connect is
   indeed who he says he is (hence "sameuser").

   Since you didn't show the pg_hba.conf line that pertains to
   localhost (127.0.0.1), I assume that it uses 'trust'. This would
   explain the differences in behaviour.

BTW, if you use ident, you may as well pass an empty password. It is not
checked.

Herouth

--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma





view thread (2+ messages)

Message-ID: <l03130301b3c4a09ae327@[147.233.159.109]>
Permalink:  ../l03130301b3c4a09ae327@%5B147.233.159.109%5D/
Also on:    postgresql.org/message-id/l03130301b3c4a09ae327@[147.233.159.109]

 · 

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-interfaces@postgresql.org
  Cc: herouth@oumail.openu.ac.il, mdz@phalanx.phalanx.net
  Subject: Re: [INTERFACES] (Yet another) unable to connect w/ JDBC via hostname
  In-Reply-To: <l03130301b3c4a09ae327@[147.233.159.109]>
  References: <379DF04A.D83FB420@phalanx.net> <l03130301b3c4a09ae327@[147.233.159.109]>

* 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