Skip site navigation (1) Skip section navigation (2)

BUG #3049: psql does not honor md5 in pg_hba.conf file

From: "Aaron Zedonis" <azedonis(at)ntag(dot)com>
To: pgsql-bugs(at)postgresql(dot)org
Subject: BUG #3049: psql does not honor md5 in pg_hba.conf file
Date: 2007-02-21 20:57:14
Message-ID: 200702212057.l1LKvEwe085025@wwwmaster.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-bugs
The following bug has been logged online:

Bug reference:      3049
Logged by:          Aaron Zedonis
Email address:      azedonis(at)ntag(dot)com
PostgreSQL version: 8.1
Operating system:   Windows
Description:        psql does not honor md5 in pg_hba.conf file
Details: 

I have set up a server on a Linux machine, in my case the IP is 10.0.0.104. 
I have configured the pga_hba.conf file so that all external requests
require password authentication.  e.g. 

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
local   all         all                                trust
host    all         all         127.0.0.1/32           md5
host    ntag        ntag        10.0.0.104  255.255.255.0  md5
host    ntag        report      207.145.64.220  255.255.255.248  md5

When I attempt to login from a different Linux machine, I am correctly
challenged for my password.  e.g.

$ /usr/local/pgsql/bin/psql -h 10.0.0.104 -U ntag ntag
Password for user ntag:
Welcome to psql 8.1.4, the PostgreSQL interactive terminal.
...

When I attempt to login from a Windows machine, I am not challenged for my
password:

C:\Documents and Settings\azedonis>psql -h 10.0.0.104 -U ntag ntag
Welcome to psql 8.1.4, the PostgreSQL interactive terminal. 
...

Logging in from the DOS prompt, or a Cygwin terminal has the same result.

If (from the Windows machine) I attempt to login with the postgres user, I
get the following error:
psql: FATAL:  no pg_hba.conf entry for host "10.0.0.60", user "postgres",
database "ntag"

So, it is reading the pg_hba.conf file.

As another test, I changed the pg_hba.conf file to require md5
authentication on all (including local) connections, and I restarted the
postmaster.  This had no impact on the above tests.

The pgAdmin III tool for Windows correctly honors the pg_hba.conf file.

Responses

pgsql-bugs by date

Next:From: Tom LaneDate: 2007-02-22 07:28:21
Subject: Re: pg_dump and truncate
Previous:From: Feng ChenDate: 2007-02-21 19:56:38
Subject: pg_dump and truncate

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group