From: Si Chen <schen@graciousstyle.com>
To: pgsql-admin@postgresql.org
Subject: pg_hba.conf and password authentication problem
Date: Thu, 23 Dec 2004 12:28:27 -0800
Message-ID: <41CB2A6B.8050609@graciousstyle.com> (raw)
I am having a really strange password authentication problem.
I created a user with
$ createuser -W myuser
and a database with
$ createdb mydb
Then, I put in /var/lib/pgsql/data/pg_hba.conf:
host mydb myuser 127.0.0.1 255.255.255.255 password
Yet whenever I try to login to the database using either JDBC or the
command line:
$ psql -W mydb -U myuser -h 127.0.0.1
and enter the correct password (believe me--it was correct!) I get the
psql: FATAL: Password authentication failed for user "myuser"
Could it be a mis-specified IP or netmask combination? I have the exact
same database and user on another server where everything works
properly. (I'm trying to set up a backup server.) On the main server
where the password authentication works, I have in /etc/hosts
127.0.0.1 localhost localhost.localdomain
and a
$ /sbin/ifconfig
gives
lo inet addr: 127.0.0.1 Mask 255.0.0.0
On the backup server, I have in /etc/hosts
127.0.0.1 localhost
and
$ /sbin/ifconfig
lo inet addr: 127.0.0.1 Mask 255.0.0.0
The IP addresses themselves have different netmasks of 255.255.255.248
and 255.255.255.128.
Where should I be looking for the source of this problem? Sorry but I
couldn't find anything about it in the documentation or online and don't
even know where to start.
Thanks in advance!
Si Chen
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: schen@graciousstyle.com
Subject: Re: pg_hba.conf and password authentication problem
In-Reply-To: <41CB2A6B.8050609@graciousstyle.com>
References: <41CB2A6B.8050609@graciousstyle.com>
* 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