From: bzb.dev001@gmail.com <bzb.dev001@gmail.com>
To: Jeff Janes <jeff.janes@gmail.com>
Cc: David G. Johnston <david.g.johnston@gmail.com>
Cc: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Subject: Re: BUG #13188: .pgpass does not work
Date: Wed, 29 Apr 2015 17:39:30 -0400
Message-ID: <55414F92.5030901@gmail.com> (raw)
In-Reply-To: <CAMkU=1y+F+sg4+UNOPsUc8BfJmiaukSJR8LPAOqoewF7N4Kgag@mail.gmail.com>
References: <20150428181007.2546.64960@wrigleys.postgresql.org>
<CAKFQuwbCgp0jXOzQ+O_KVG5_-N+Y+bzfZ_4K8_VYS-gQrKhLsg@mail.gmail.com>
<5540F428.8000605@gmail.com>
<CAKFQuwZ7DC=zC0CxHqUAnf47iJXcSceNJpH4j2Xhgndm=unYxA@mail.gmail.com>
<554121A9.3050207@gmail.com>
<CAMkU=1y+F+sg4+UNOPsUc8BfJmiaukSJR8LPAOqoewF7N4Kgag@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
On 2015-04-29 04:41 PM, Jeff Janes wrote:
> On Wed, Apr 29, 2015 at 11:23 AM, bzb.dev001@gmail.com
> <mailto:bzb.dev001@gmail.com> <bzb.dev001@gmail.com
> <mailto:bzb.dev001@gmail.com>> wrote:
>
>>
> I've changed back the owner of .pgpass to the account that I've
> logged in as. This is the account that I'm using to run psql.
> All the spaces in .pgpass is removed.
> Checked that the permission settings of .pgpass is ok.
> restarted the server...
>
> $ sudo service postgresql restart
>
> Unfortunately, it is still not working.
>
> $ psql --host=localhost --port=5432 --username=postgres --no-password
> psql: fe_sendauth: no password supplied
>
>
> I wonder if it is even finding the file in the first place.
>
> strace psql --host=localhost --port=5432 --username=postgres
> --no-password 2>&1 | fgrep pgpass
>
> This is what I get:
>
> stat("/home/jjanes/.pgpass", {st_mode=S_IFREG|0600, st_size=196, ...}) = 0
> open("/home/jjanes/.pgpass", O_RDONLY) = 3
>
> For me it found the file and opened it successfully.
>
> Cheers,
>
> Jeff
I finally figured out why it didn't work. the port# specified in my
.pgpass was incorrect.
My stupidity.
Thanks to all for the help.
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-bugs@postgresql.org
Cc: bzb.dev001@gmail.com, jeff.janes@gmail.com, david.g.johnston@gmail.com
Subject: Re: BUG #13188: .pgpass does not work
In-Reply-To: <55414F92.5030901@gmail.com>
References: <20150428181007.2546.64960@wrigleys.postgresql.org> <CAKFQuwbCgp0jXOzQ+O_KVG5_-N+Y+bzfZ_4K8_VYS-gQrKhLsg@mail.gmail.com> <5540F428.8000605@gmail.com> <CAKFQuwZ7DC=zC0CxHqUAnf47iJXcSceNJpH4j2Xhgndm=unYxA@mail.gmail.com> <554121A9.3050207@gmail.com> <CAMkU=1y+F+sg4+UNOPsUc8BfJmiaukSJR8LPAOqoewF7N4Kgag@mail.gmail.com> <55414F92.5030901@gmail.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