I have done some testing with the IP4 and IP6 host settings. Even though my desktop and the server use IP4, and if I only change IP4 entry for postgres to md5,
leaving IP6 host setting as trust, the server allows postgres to work without a password. After I set IP6 (::1/128) to md5 the server then rejects access from web pages using the postgres account, since it has no password set yet. Even with local postgres set to md5, I was able to run a script on the server that uses the account postgres to perform a backup. I thought it would fail since
postgres as no password set yet. However, after setting host postgres IP6 (::1/128) to md5, then after executing the script I was prompted for a password. It seems the local and IP4 are being ignored and only IP6 is controlling the trust/md5 behavior. local all postgres md5 local all web_u1 md5 host all postgres 127.0.0.1/32 md5 host all web_u1 127.0.0.1/32 md5 host all postgres ::1/128 trust host all web_u1 ::1/128 md5 From: Keith [mailto:keith@xxxxxxxxxxx]
On Mon, Nov 9, 2015 at 6:38 PM, Marc Fromm <Marc.Fromm@xxxxxxx> wrote:
The pg_hba.conf is all about authentication and completely independent of the GRANT system in the database.
|