Back to my original question, though. Any ideas why it is still prompting for password even though it had ‘trust’ in the pg_hba.conf? The .pgpass or the PGPASSWORD is only a work-around for that, I think. ‘Trust’ is supposed to:
Allow the connection unconditionally. This method allows anyone that can connect to the PostgreSQL database server to login as any PostgreSQL user they wish, without the need for a password or any other authentication
So, I shouldn’t need to set-up .pgpass or PGPASSWORD.
Any thoughts?
Scott Mead
Sr. Architect
OpenSCG
PostgreSQL, Java & Linux Experts
Thanks.
Maria A Rossi
Database Administration
PGDS (US)
email: maria.rossi@xxxxxxxxxxx
cell phone: 517.256.4392work phone: 517.367.3099
work phone extension: 23099
From: Glauco Torres [mailto:torres.glauco@xxxxxxxxx]
Sent: Tuesday, October 20, 2015 1:54 PM
To: Rossi, Maria <maria.rossi@xxxxxxxxxxx>
Subject: Re: Logging on without prompt for password
2015-10-20 15:50 GMT-02:00 Glauco Torres <torres.glauco@xxxxxxxxx>:
2015-10-20 15:44 GMT-02:00 Rossi, Maria <maria.rossi@xxxxxxxxxxx>:
We will try the .pgpass file at the user’s home directory, using *.* for port as suggested by Scott Mead. This way I don’t have to worry about setting the PGPASSWORD env var for the user.
I still need to create a role for the user, correct? It needs admin to be able to rung pg_dumpall.
Thanks everyone.
The manual helps a lot in these types of doubts
"Also you will need superuser privileges to execute the saved script in order to be allowed to add users and groups, and to create databases."
http://www.postgresql.org/docs/current/static/app-pg-dumpall.html
Sorry,
O copied the wrong part "Since pg_dumpall reads tables from all databases you will most likely have to connect as a database superuser in order to produce a complete dump."