Thread: pg_hba.conf with the "password" auth failed to work sometimes...

pg_hba.conf with the "password" auth failed to work sometimes...

From
matthew wong
Date:
Hello all,

    i'm using the version 7.0.3 on Redhat 7.1.

    i found sometimes when i setup the pg_hba.conf
    to restrict to only allow a client from certain
    ip to access a database with password auth, but
    i found even i give an invalid password, the
    client still can connect to this database.

    pg_hba.conf
    -----------
    host  mydb  192.168.0.100  255.255.255.0  password  user.hba

    user.hba
    ----------
    user:


    any idea?

---

Wong Ka Ho Matthew
System Engineer
Sky Telemedia Limited
Tel: (852) 2845 8315
Fax: (852) 2845 7890
email: mattheww@skytelemedia.com

Re: pg_hba.conf with the "password" auth failed to work sometimes...

From
Tom Lane
Date:
matthew wong <mattheww@skytelemedia.com> writes:
>     i found sometimes when i setup the pg_hba.conf
>     to restrict to only allow a client from certain
>     ip to access a database with password auth, but
>     i found even i give an invalid password, the
>     client still can connect to this database.

Is there another line in pg_hba.conf that might allow this client
to connect?  The postmaster will use the first entry that matches
the connection source address and target database...

            regards, tom lane