pg_hba.conf and password authentication problem

Поиск
Список
Период
Сортировка
От Si Chen
Тема pg_hba.conf and password authentication problem
Дата
Msg-id 41CB2A6B.8050609@graciousstyle.com
обсуждение исходный текст
Список pgsql-admin
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

В списке pgsql-admin по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: VACUUMing for 30 minutes
Следующее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: restore data from DB base?