Re: BUG #13188: .pgpass does not work

From: "David G(dot) Johnston" <david(dot)g(dot)johnston(at)gmail(dot)com>
To: "bzb(dot)dev001(at)gmail(dot)com" <bzb(dot)dev001(at)gmail(dot)com>
Cc: "pgsql-bugs(at)postgresql(dot)org" <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #13188: .pgpass does not work
Date: 2015-04-29 16:04:03
Message-ID: CAKFQuwZ7DC=zC0CxHqUAnf47iJXcSceNJpH4j2Xhgndm=unYxA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-bugs

On Wed, Apr 29, 2015 at 8:09 AM, bzb(dot)dev001(at)gmail(dot)com <bzb(dot)dev001(at)gmail(dot)com>
wrote:
I have even changed the ownership of the file to postgres:postgres since
I'm logged on as another user and .pgpass is located in this user's home
directory. Yet it still does not work.
>
>
> $ ls -l .pgpass
> -rw------- 1 postgres postgres 79 Apr 29 10:24 .pgpass
>

​Sorry, I missed this the first time reading. This is your problem. The
"postgres" Linux user and the "postgres" PostgreSQL user are not related to
each other - particularly when using md5 authentication. The permissions
on the .pgpass file must be of the user executing "psql" - which you've
indicated is not "postgres".

So, likely your first attempt failed because you had whitespace. You
changed the permissions and now have two problems. You then fix the
whitespace and are back to a single problem. Change the permissions back
and it should now work.

David J.


In response to

Responses

Browse pgsql-bugs by date

  From Date Subject
Next Message autarch 2015-04-29 16:56:21 BUG #13195: ALTER TABLE with DEFAULT NULL is different than implicit default
Previous Message bzb.dev001@gmail.com 2015-04-29 15:57:19 Re: BUG #13188: .pgpass does not work