Received: from sss.pgh.pa.us (sss.pgh.pa.us [209.114.132.154]) by mail.postgresql.org (8.11.1/8.11.1) with ESMTP id f0R5sKq99766 for ; Sat, 27 Jan 2001 00:54:20 -0500 (EST) (envelope-from tgl@sss.pgh.pa.us) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.11.1/8.11.1) with ESMTP id f0R5sD920587; Sat, 27 Jan 2001 00:54:13 -0500 (EST) To: cedric.mesnil@trusted-logic.fr, pgsql-admin@postgresql.org Subject: Re: hba_conf: only first line is checked In-reply-to: <3A706F2D.4A912000@trusted-logic.fr> References: <3A706F2D.4A912000@trusted-logic.fr> Comments: In-reply-to =?iso-8859-1?Q?C=E9dric?= Mesnil message dated "Thu, 25 Jan 2001 19:23:41 +0100" Date: Sat, 27 Jan 2001 00:54:13 -0500 Message-ID: <20584.980574853@sss.pgh.pa.us> From: Tom Lane X-Archive-Number: 200101/168 X-Sequence-Number: 545 =?iso-8859-1?Q?C=E9dric?= Mesnil 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