Thread: password authentication failed for ..

password authentication failed for ..

From
"Manu M P"
Date:
Hi

I have the data base "test" and two users "test1" "test2". I added the following record to pg_hba.conf

local test password passwords

I then created the "passwords" file in $PGDATA using pg_pasword and added entries for the two users "test1" and
"test2". 

But when i tried to connect "test" using

psql test -U user1

i am always getting the message "password authentication failed for the user user1"

I enterd the password correctly.

How can i remove the problem?

thanks

Re: password authentication failed for ..

From
Doug McNaught
Date:
"Manu M P" <manu.mp@maildrop.m2comsys.com> writes:

> Hi
>
> I have the data base "test" and two users "test1" "test2". I added the following record to pg_hba.conf
>
> local test password passwords
>
> I then created the "passwords" file in $PGDATA using pg_pasword and
> added entries for the two users "test1" and "test2".

Ummm...

Passwords are stored in the 'pg_shadow' table and set using
CREATE/ALTER USER, not in a file.

I've never heard of a 'pg_password' program and it is not part of the
standard distribution.

-Doug

Re: password authentication failed for ..

From
Tom Lane
Date:
Doug McNaught <doug@mcnaught.org> writes:
> "Manu M P" <manu.mp@maildrop.m2comsys.com> writes:
>> I then created the "passwords" file in $PGDATA using pg_pasword and
>> added entries for the two users "test1" and "test2".

> I've never heard of a 'pg_password' program and it is not part of the
> standard distribution.

pg_passwd did exist in releases up to 7.2, but we got rid of it because
that functionality got moved into ALTER USER.

            regards, tom lane