From: | Guillaume Lelarge <guillaume(at)lelarge(dot)info> |
---|---|
To: | Martin Schayna <mschayna(at)gmail(dot)com> |
Cc: | pgadmin-support(at)postgresql(dot)org |
Subject: | Re: Error connecting for first connect upon pgAdmin start (with solution) |
Date: | 2011-03-05 19:38:40 |
Message-ID: | 4D729140.5040706@lelarge.info |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
Le 03/03/2011 17:12, Martin Schayna a écrit :
> Small bug + solution
>
> pgAdmin III 1.12.0
> PostgreSQL 9.0
> Ubuntu Linux 10.04
> installed completely from Martin Pitt's PPA
> https://launchpad.net/~pitti/+archive/postgresql, but also
> reproducible with original Ubuntu repositories (PostgreSQL 8.4,
> pgAdmin III 1.10.2)
>
> Scenario:
>
> 1) start pgAdmin from console: $ pgadmin3
> 2) warning appears on console:
> WARNING: password file "/home/mase/.pgpass" has group or world
> access; permissions should be u=rw (0600) or less
This is right. libpq doesn't want to use .pgpass if its permissions are
higher than 600.
> 3) now try to connect some server by double-clicking server node in
> tree, error window appears and server is not connected:
> An error has occurred:
> Error connecting to the server: fe_sendauth: no password supplied
Another server? or the same one?
If the same one, it's quite right too. It cannot use the .pgpass file,
so it cannot send a password, and you can't connect.
> 4) subsequent tries works, until pgAdmin close
Define works?
> Solution:
>
> When I change permissions for .pgpass file as warning suggested,
> connection error for first connect upon pgAdmin start disappears and
> everything works like a charm. It looks like there is some lack in
> reading passwords from .pgpass when warning is shown.
>
You need to have 600 permissions flags to be able to use the .pgpass
file. This is a good thing that the libpq does for your security.
> Keep up good work, guys!
Thanks.
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
From | Date | Subject | |
---|---|---|---|
Next Message | Guillaume Lelarge | 2011-03-05 19:39:53 | Re: Feature Request: SQL parameters |
Previous Message | Guillaume Lelarge | 2011-03-05 19:30:42 | Re: Feature request: ability to set hostaddr |