pg_hba.conf: 'trust' vs. 'md5' Issues

From: "Jeanna Geier" <jgeier(at)apt-cafm(dot)com>
To: <pgsql-admin(at)postgresql(dot)org>
Subject: pg_hba.conf: 'trust' vs. 'md5' Issues
Date: 2006-09-26 13:43:27
Message-ID: 006201c6e171$bee28c70$6700a8c0@geier
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin pgsql-hackers

Hi All-

I'm having some issues with connecting to my servers if I put 'md5' as the
connection method in my pg_hba.conf (which is what I want!). If I put
'trust', I can connect without any issues.

I built 8.0.8 from source because we wanted to use SSL; and my pg_hba.conf
file currently looks as follows:

# TYPE DATABASE USER CIDR-ADDRESS METHOD
# IPv4 local connections:
#host all all 127.0.0.1/32 trust
# IPv6 local connections:
#host all all ::1/128 trust
hostssl all all 127.0.0.1/32 trust

If I change the hostssl line to: hostssl all all 127.0.0.1/32 md5, restart
the server, and attempt to connect via pgadmin, I see the message
'Connecting to the database... Failed.' If I attempt to connect to a
database using the command line:
C:\msys\1.0\local\pgsql\bin>psql -d apt -U postgres
Password:
psql: FATAL: no pg_hba.conf entry for host "127.0.0.1", user
"postgres", database "apt", SSL off
C:\msys\1.0\local\pgsql\bin>

But if I change the hostssl line back to: hostssl all all 127.0.0.1/32 trust
and restart the server, I can connect through both pgadmin and the command
line.

Would I have to had done something special when building Postgres to enable
the use of md5? My command line parameters were:
./configure --with-openssl --with-includes=/usr/local/include --with-libraries=/usr/local/lib
--without-zlib

Thanks in advance for all of your help! If you need any more info, just let
me know. I really need to get this issue resolved.

Thanks,
-Jeanna

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message theman 2006-09-26 14:46:04 Re: COPY FROM command v8.1.4
Previous Message Juan Miguel Paredes 2006-09-26 13:34:11 Re: Beginner's Question: No pg_hba.conf entry for host...SSL Off

Browse pgsql-hackers by date

  From Date Subject
Next Message Jeff Frost 2006-09-26 15:01:24 Re: pg_hba.conf: 'trust' vs. 'md5' Issues
Previous Message Asok Chattopadhyay 2006-09-26 13:23:39 Transaction is read-only in auto commit mode