From: | Andrew Taylor <andydtaylor(at)gmail(dot)com> |
---|---|
To: | pgadmin-support(at)postgresql(dot)org |
Subject: | Password entry in pgadmin3; pg_hba.conf vs .pgpass. Permissioning issue? |
Date: | 2012-11-26 12:55:47 |
Message-ID: | CAFAE3JytsUGOcBywnUytBxA2M8zAbtsdgWxkUTKF8j3Ax43n3Q@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
[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.
I have been messing around with strace trying to figure out the
location of pgpass which is being sought out when I run psql/pgadmin3
but the results are inconclusive. They both (now)seem to be looking in
the andyt home directory. Not sure if this was the case earlier,
sorry! I was earlier placing .pgpass here there and everythwhere, but
in particular /var/lib/postresql.
Grateful for any guidance,
Regards,
Andy
Key file contents:
1 pg_hba.conf:
local all postgres md5
# local all postgres trust
# TYPE DATABASE USER ADDRESS METHOD
# "local" is for Unix domain socket connections only
local all all md5
# local all all trust
local django_db django_dev md5
# local django_db django_dev trust
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# host all all 127.0.0.1/32 trust
# IPv6 local connections:
host all all ::1/128 md5
# host all all ::1/128 trust
2 ,pgpass
127.0.0.1:5432:*:postgres:Password@
:5432:*:django_dev:Password@
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2012-11-26 18:41:56 | Re: Crash on selecting schema with domain |
Previous Message | Guillaume Lelarge | 2012-11-26 08:08:37 | Re: pgAdmin crashes when checking "Security of definer" |