pg_hba.conf: 'trust' vs. 'md5' Issues - Mailing list pgsql-admin

From Jeanna Geier
Subject pg_hba.conf: 'trust' vs. 'md5' Issues
Date
Msg-id 006201c6e171$bee28c70$6700a8c0@geier
Whole thread Raw
Responses Re: pg_hba.conf: 'trust' vs. 'md5' Issues
List pgsql-admin
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


pgsql-admin by date:

Previous
From: "Milen A. Radev"
Date:
Subject: Re: Beginner's Question: No pg_hba.conf entry for host...SSL Off
Next
From: "theman"
Date:
Subject: Re: COPY FROM command v8.1.4