1

This seems stupid simple but it's not working.

My pg_hba.conf:

# type  database        user         address          type
local   all             postgres                      peer  # postgres user
local   all             fred                          peer  # fred should be able to get in w/o password
host    all             all          127.0.0.1/32     peer  # ipv6 local connections
host    all             all          ::1/128          peer  # ipv4 local
host    all             all          0.0.0.0/0        md5   # authenticated from any host

Now, good old fred can connect find when just doing psql freddb, but when fred tries psql -h localhost freddb it prompts for a password, which I feel like it shouldn't by virtue of the third line in pg_hba. What gives, friends? Help old fred out here.

2

1 Answer 1

1

Peer authentication is supported on local sockets only. When you try to restart postgres with the given configuration it will fail with a fatal error.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .