pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work.
2+ messages / 2 participants
[nested] [flat]

* Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work.
@ 2018-07-24 21:32 PG Doc comments form <noreply@postgresql.org>
  2018-07-25 17:12 ` Re: Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work. Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Doc comments form @ 2018-07-24 21:32 UTC (permalink / raw)
  To: pgsql-docs@lists.postgresql.org; +Cc: postgress@sendthemtomir.com

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/9.6/static/libpq-pgpass.html
Description:

https://www.postgresql.org/docs/10/static/libpq-pgpass.html

$ dpkg -l | grep -i postgres
ii  libpq5:amd64                        10.4-0ubuntu0.18.04               
amd64        PostgreSQL C client library
ii  postgresql-client                   10+190                            
all          front-end programs for PostgreSQL (supported version)
ii  postgresql-client-10                10.4-0ubuntu0.18.04               
amd64        front-end programs for PostgreSQL 10
ii  postgresql-client-common            190                               
all          manager for multiple PostgreSQL client versions

.pgpass does not work with 10.4

/home/ubuntu/.pgpass is 0600 (tried 0400 alsp), owner and group ubuntu with
psql run as ubuntu.  I tried adding an extra carriage return at the end of
the file.

Using psql with a -w, I get `psql: fe_sendauth: no password supplied`.
Removing the -w, the error message is `psql: FATAL:  password authentication
failed for user "ubuntu"` after entering a password.

I'm using the format from the doc page,
`hostname:port:database:username:password`. There are no special characters
in the user or pass (or anywhere).

The docs are wrong, apparently this has been deprecated.


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work.
  2018-07-24 21:32 Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work. PG Doc comments form <noreply@postgresql.org>
@ 2018-07-25 17:12 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2018-07-25 17:12 UTC (permalink / raw)
  To: postgress@sendthemtomir.com; +Cc: pgsql-docs@lists.postgresql.org

=?utf-8?q?PG_Doc_comments_form?= <noreply@postgresql.org> writes:
> .pgpass does not work with 10.4

Works for me.  Care to provide a complete example?

$ cat $PGDATA/pg_hba.conf
...
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
# IPv6 local connections:
host    all             all             ::1/128                 md5
...

regression=# create user joe password 'joespw';
CREATE ROLE

$ ls -l ~/.pgpass
-rw-------. 1 tgl tgl 25 Jul 25 13:09 /home/tgl/.pgpass
$ cat ~/.pgpass
localhost:*:*:joe:joespw

$ psql -U joe -h localhost regression
psql (10.4)
Type "help" for help.

I can replicate your symptoms if there's not actually a matching
entry in the .pgpass file ...

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2018-07-25 17:12 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-24 21:32 Docs for version 10 incorrectly claim that ~/.pgpass with 0600 perms work. PG Doc comments form <noreply@postgresql.org>
2018-07-25 17:12 ` Tom Lane <tgl@sss.pgh.pa.us>

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