Tenuous Django link but thought no one would mind if I asked the following:
Can I bypass the need for password entry in pgadmin3 by changing/locating 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:Passowrd@
:5432:*:django_dev:Password@
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/WrCXCoEpc7kJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment