Re: Password entry in pgadmin3; pg_hba.conf vs .pgpass. Permissioning issue?

From: Dave Page <dpage(at)pgadmin(dot)org>
To: Fernando Hevia <fhevia(at)gmail(dot)com>
Cc: Andrew Taylor <andydtaylor(at)gmail(dot)com>, Pgadmin-Support <pgadmin-support(at)postgresql(dot)org>
Subject: Re: Password entry in pgadmin3; pg_hba.conf vs .pgpass. Permissioning issue?
Date: 2012-11-27 17:43:24
Message-ID: CA+OCxozaDQ_foHE92ZbOFivGsN7_17c-tdBaON-hPTLrc3cavw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-support

On Tue, Nov 27, 2012 at 5:27 PM, Fernando Hevia <fhevia(at)gmail(dot)com> wrote:
>
> On Mon, Nov 26, 2012 at 9:55 AM, Andrew Taylor <andydtaylor(at)gmail(dot)com>
> wrote:
>> [also posted to Django users Google group]
>>
>> Hi all,
>>
>> Can I bypass the need for password entry in pgadmin3 by
>> changing/locating/permissioning a .pgpass files instead of modifying
>> pg_hba.conf to 'trust'? pg_hba.conf currently set at md5 for
>> everything.
>>
>> 1. I can merrily connect to the postgres server on my local ubuntu
>> machine as user postgres in bash by "su postgres" then "psql".
>> 2. But if I want to be able to use pgadmin 3 GUI without entering a
>> password I need to do this as my user, andyt and this doesn't work (I
>> did chmod 600 this file to give rw access to one owner only). This
>> feels like a permissioning issue but with that chmod 600 restriction
>> on pgpass I'm not sure how to progress.
>>
>>
>
> pgAdmin should use ~/.pgpass in unixes. At least that is what the
> documentation says.

It does, and the equivalent pgpass file on Windows.

> You can make a quick test: create a new server entry with user & password
> saved. Then check your ~/.pgpass file to see if the new server shows up.
>
> Make sure to comply the pgpass format and permission requirements:
> http://www.postgresql.org/docs/current/interactive/libpq-pgpass.html

Or just login once from pgAdmin and click the "Save Password" option.
That'll write the pgpass file for you.

--
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Responses

Browse pgadmin-support by date

  From Date Subject
Next Message Evan Martin 2012-11-28 01:23:19 Re: Crash on selecting schema with domain
Previous Message Fernando Hevia 2012-11-27 17:27:26 Re: Password entry in pgadmin3; pg_hba.conf vs .pgpass. Permissioning issue?