pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: bzb.dev001@gmail.com <bzb.dev001@gmail.com>
To: 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 16:42:57 -0400
Message-ID: <55414251.90205@gmail.com> (raw)
In-Reply-To: <CAKFQuwZJwguP8wfYn0u8qxjMS3Ma5aFgLTOhtCnBc7eqyNKyOQ@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>
	<CAKFQuwZJwguP8wfYn0u8qxjMS3Ma5aFgLTOhtCnBc7eqyNKyOQ@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2015-04-29 03:32 PM, David G. Johnston 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:
>
>     On 2015-04-29 12:04 PM, David G. Johnston wrote:
>>
>>     On Wed, Apr 29, 2015 at 8:09 AM, bzb.dev001@gmail.com
>>     <mailto:bzb.dev001@gmail.com> <bzb.dev001@gmail.com
>>     <mailto:bzb.dev001@gmail.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.
>>
>     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
>
>     Incidentally, the postgresql server is running as 'postgres' user.
>
>
> ​I am out of ideas.  I am not currently running 9.4.x but if the 
> problem was a bug within PostgreSQL there would be more than a single 
> report.
>
> David J.

No problem.
Thanks for you help.

view thread (11+ messages)  latest in thread

Message-ID: <55414251.90205@gmail.com>
Permalink:  ../55414251.90205@gmail.com/
Also on:    postgresql.org/message-id/55414251.90205@gmail.com

 · 

reply

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, david.g.johnston@gmail.com
  Subject: Re: BUG #13188: .pgpass does not work
  In-Reply-To: <55414251.90205@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> <CAKFQuwZJwguP8wfYn0u8qxjMS3Ma5aFgLTOhtCnBc7eqyNKyOQ@mail.gmail.com> <55414251.90205@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