Right now my Postgres' pg_hba.conf file has the following lines:
# "local" is for Unix domain socket connections only
local all all md5
# IPv4 local connections:
host all all 127.0.0.1/32 md5
# IPv6 local connections:
host all all ::1/128 md5
#Should allow connection without password
host all all 0.0.0.0/0 trust
host all all ::0/0 trust
(I know that this is insecure. I'm just testing, and once it is successful, I'll keep it only specific users & databases)
My understanding was that trust
should allow a user to connect without a password.
But when I do psql -U postgres -d postgres -h 127.0.0.1 -w
, I get the error message: psql: fe_sendauth: no password supplied
What do I need to do to allow users to connect without a password?