Re: Error connecting for first connect upon pgAdmin start (with solution)

Поиск
Список
Период
Сортировка
От Guillaume Lelarge
Тема Re: Error connecting for first connect upon pgAdmin start (with solution)
Дата
Msg-id 4D729140.5040706@lelarge.info
обсуждение исходный текст
Ответ на Error connecting for first connect upon pgAdmin start (with solution)  (Martin Schayna <mschayna@gmail.com>)
Ответы Re: Error connecting for first connect upon pgAdmin start (with solution)  (Martin Schayna <mschayna@gmail.com>)
Список 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.


-- 
Guillaumehttp://www.postgresql.frhttp://dalibo.com


В списке pgadmin-support по дате отправления:

Предыдущее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Feature request: ability to set hostaddr
Следующее
От: Guillaume Lelarge
Дата:
Сообщение: Re: Feature Request: SQL parameters