Problem with .pgpass - Mailing list pgsql-admin

From Nicolas Michel
Subject Problem with .pgpass
Date
Msg-id 1242660190.20437.205.camel@nm-laptop
Whole thread Raw
Responses Re: Problem with .pgpass
List pgsql-admin
Hi here,

I'm trying to make my dump script working but it is not.

I tried to put my password in a .pgpass file into the home directory of the root user (so /root/.pgpass). Here is a cat of that file :
*:*:*:*:test

(I tried only with stars to be sure my rule was not too strict).

So, il I try this command :
root@pc:~ # psql -h localhost -U postgres
I get :
psql: FATAL:  authentification par mot de passe échouée pour l'utilisateur  « postgres »
(this is in french but it means that the password authentication method failed for the user 'postgres')

If I rename my .pgpass into .pgpass.old, I can log in to postgres with the same command :
root@pc:~ # psql -h localhost -U postgres
When prompt for a password, I enter 'test' and it's working ...

Someone understand where's the problem?

pgsql-admin by date:

Previous
From: Zavam, Vinícius
Date:
Subject: Re: installation of Postgre
Next
From: Tom Lane
Date:
Subject: Re: Problem with .pgpass