pg_hba.conf problem?

From: "Carlo Florendo" <fcarlo(at)ntsp(dot)nec(dot)co(dot)jp>
To: <pgsql-general(at)postgresql(dot)org>
Subject: pg_hba.conf problem?
Date: 2002-02-11 10:05:07
Message-ID: 00ba01c1b2e3$95501ba0$213b1cac@ntsp.nec.co.jp
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I try to connect to the postgres db from one machine to the other.
If I set the pg_hba.conf authentication entry for the client machine in the server machine to "trust",
one could connect successfully. However, if I change the entry into "crypt" or
"password", one couldn't connect even if the specified password was
typed correctly.

This is how my pg_shadow looks like:

template1=# select * from pg_shadow;
usename | usesysid | usecreatedb | usetrace | usesuper | usecatupd | passwd
valuntil
----------+----------+-------------+----------+----------+-----------+--------+
postgres | 26 | t | t | t | t | abc123 |
amgarcia | 27 | t | f | f | f | abc123 |
(2 rows)

This one below is part of my pg_hba.conf file:

# This default configuration allows any local user to connect as any
# PostgreSQL username, over either UNIX domain sockets or IP:

host all 127.0.0.1 255.255.255.255 crypt
host athena 172.28.61.13 255.255.255.255 trust amgarcia

# If you want to allow non-local connections, you will need to add more
# "host" records (and don't forget to start the postmaster with "-i"!).

Basically, I want user "amgarcia" to authenticate before connecting to the database.
If I change the "trust" to "crypt", the server asks for a password. It, however, does
not want to accept the password "abc123".

This is how the client (coolio) connects to the server (tissue) to the database
"athena".

amgarcia(at)coolio ~$ psql -d athena -h tissue.ntsp.nec.co.jp amgarcia
Password:

I enter the correct password "abc123" but I get this message:

psql: Password authentication failed for user 'amgarcia'

If I change "password" or "crypt" into "trust", there is no problem in connecting.
However, this is not what I want. I want user "amgarcia" to be able to authenticate
first before connecting to the server.

How could I do this? (I use postgres 7.1.3 under redhat 7.2)

Thanks a lot!!!!!

Carlo F. Florendo
NEC Telecoms
fcarlo(at)ntsp(dot)nec(dot)co(dot)jp

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Jean-Michel POURE 2002-02-11 10:20:04 Re: Fetature enhancement request : use of libgda in PostgreSQL to access legacy databases.
Previous Message Sander Steffann 2002-02-11 10:04:22 Re: postgresql -- what's in a name?