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 11:09:28 -0400
Message-ID: <5540F428.8000605@gmail.com> (raw)
In-Reply-To: <CAKFQuwbCgp0jXOzQ+O_KVG5_-N+Y+bzfZ_4K8_VYS-gQrKhLsg@mail.gmail.com>
References: <20150428181007.2546.64960@wrigleys.postgresql.org>
	<CAKFQuwbCgp0jXOzQ+O_KVG5_-N+Y+bzfZ_4K8_VYS-gQrKhLsg@mail.gmail.com>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>

On 2015-04-29 01:06 AM, David G. Johnston wrote:
> On Tuesday, April 28, 2015, <bzb.dev001@gmail.com 
> <mailto:bzb.dev001@gmail.com>> wrote:
>
>     The following bug has been logged on the website:
>
>     Bug reference:      13188
>     Logged by:          wt
>     Email address: bzb.dev001@gmail.com <javascript:;>
>     PostgreSQL version: 9.4.1
>     Operating system:   linux
>     Description:
>
>     Tried to use ~/.pgpass file to automatically specify the password
>     when I use
>     the psql console app. according to the info from "PostgreSQL 9.4.0
>     Documentation", Section 31.15. The Password File.
>
>     Postgresql is configured to use md5 for login.
>
>
>     file: pg_hba.conf
>     -----------------
>     local   all             all  md5
>     host    all             all 127.0.0.1/32 <http://127.0.0.1/32;   
>             md5
>     host    all             all             ::1/128  md5
>
>
>     file: ~/.pgpass
>     ---------------
>     #hostname : port : database : username : password
>     * : 5432 : * : postgres : somepassword
>
>
>     When I exec psql without specifying the password, I cannot login...
>
>     $ psql --host=localhost --port=5432 --username=postgres --no-password
>     psql: fe_sendauth: no password supplied
>
>
>
> Best guess you don't have the correct permissions set.
>
> http://www.postgresql.org/docs/devel/static/libpq-pgpass.html
>
> Last paragraph.
>
> I would also remove the padding white space.  The syntax is documented 
> without and while the documentation is non-specific I've personally 
> always avoided it and have never had a problem.
>
> David J. 

The permission settings for .pgpass is correct.  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

$ psql  --host=localhost --port=5432 --username=postgres --no-password
psql: fe_sendauth: no password supplied

view thread (11+ messages)  latest in thread

Message-ID: <5540F428.8000605@gmail.com>
Permalink:  ../5540F428.8000605@gmail.com/
Also on:    postgresql.org/message-id/5540F428.8000605@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: <5540F428.8000605@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>

* 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