From: | "bzb(dot)dev001(at)gmail(dot)com" <bzb(dot)dev001(at)gmail(dot)com> |
---|---|
To: | "David G(dot) Johnston" <david(dot)g(dot)johnston(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 15:09:28 |
Message-ID: | 5540F428.8000605@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-bugs |
On 2015-04-29 01:06 AM, David G. Johnston wrote:
> On Tuesday, April 28, 2015, <bzb(dot)dev001(at)gmail(dot)com
> <mailto:bzb(dot)dev001(at)gmail(dot)com>> wrote:
>
> The following bug has been logged on the website:
>
> Bug reference: 13188
> Logged by: wt
> Email address: bzb(dot)dev001(at)gmail(dot)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
From | Date | Subject | |
---|---|---|---|
Next Message | David G. Johnston | 2015-04-29 15:50:05 | Re: BUG #13188: .pgpass does not work |
Previous Message | Amit Kapila | 2015-04-29 11:41:51 | Re: Re: BUG #12990: Missing pg_multixact/members files (appears to have wrapped, then truncated) |