From: Tom Lane <tgl@sss.pgh.pa.us>
To: cedric.mesnil@trusted-logic.fr
To: pgsql-admin@postgresql.org
Subject: Re: hba_conf: only first line is checked
Date: Sat, 27 Jan 2001 00:54:13 -0500
Message-ID: <20584.980574853@sss.pgh.pa.us> (raw)
In-Reply-To: <3A706F2D.4A912000@trusted-logic.fr>
References: <3A706F2D.4A912000@trusted-logic.fr>
=?iso-8859-1?Q?C=E9dric?= Mesnil <cedric.mesnil@trusted-logic.fr> writes:
> I want to allow some user to connect to my db with password authentication against
> a first password file and allow other user against a second one. I ve writen the following pg_hba.conf:
> host all 192.168.1.201 255.255.255.255 password passwd
> host all 192.168.1.201 255.255.255.255 password passwd2
This does not make any sense to me. Why don't you just merge the two
password files? If you want to have distinct password files for
distinct situations, then the situations have to actually be distinct,
ie, different host addresses or database names in pg_hba.conf. The
postmaster will stop on the first pg_hba.conf line that matches the
client hostaddress and requested database, so the second line in the
above example can never be reached. This is not a bug; if we changed
it then we'd break a lot of other useful cases.
regards, tom lane
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: tgl@sss.pgh.pa.us, cedric.mesnil@trusted-logic.fr
Subject: Re: hba_conf: only first line is checked
In-Reply-To: <20584.980574853@sss.pgh.pa.us>
References: <3A706F2D.4A912000@trusted-logic.fr> <20584.980574853@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox