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

Re: [INTERFACES] Re: connecting: unix socket? Yes. TCPIP port? No.-i? Yes.

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bob VonMoss <bvonmoss(at)bigfoot(dot)com>
Cc: pgsql-interfaces(at)postgreSQL(dot)org
Subject: Re: [INTERFACES] Re: connecting: unix socket? Yes. TCPIP port? No.-i? Yes.
Date: 1999-02-10 15:22:15
Message-ID: 11081.918660135@sss.pgh.pa.us (view raw or flat)
Thread:
Lists: pgsql-interfaces
Bob VonMoss <bvonmoss(at)bigfoot(dot)com> writes:
> We've tried:
> host my_db 0.0.0.0   0.0.0.0 ident sameuser

As you already found out, that won't work if you're not running an ident
daemon on your connecting machine.  (You aren't *really* running with an
0.0.0.0 mask are you?  That means anyone anywhere on the net can get
into your database, if they can reach the machine it's on...)

> host my_db 0.0.0.0   0.0.0.0 password sameuser

See the documentation:

#   password:  Authentication is done by matching a password supplied in clear
#	       by the host.  If AUTH_ARGUMENT is specified then the password
#              is compared with the user's entry in that file (in the $PGDATA
#	       directory).  See pg_passwd(1).  If it is omitted then the
#	       password is compared with the user's entry in the pg_shadow
#	       table.

Unless your admin made a file named "sameuser" to store Postgres
passwords in, this will not work.  I think you want to remove "sameuser".
(Also, did he remember to set a Postgres password for you?)

> I'm hoping that it will eventually work through JDBC, but it doesn't
> work with
> psql -h my-isp.com -d my_db
> Same messages: "User authentication failed"

Even if the host system were correctly configured for password
authentication, this psql invocation would fail since you didn't supply
a username and password.  Need -u option.

			regards, tom lane

pgsql-interfaces by date

Next:From: AtikaDate: 1999-02-10 16:22:44
Subject: ODBC driver for Linux RedHat 5.1
Previous:From: Mark HimsleyDate: 1999-02-10 14:34:43
Subject: Re: [INTERFACES] question on accessing PostgreSQL with C

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