pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
hba_conf: only first line is checked
2+ messages / 2 participants
[nested] [flat]

* hba_conf: only first line is checked
@ 2001-01-25 18:23 Cédric Mesnil <cedric.mesnil@trusted-logic.fr>
  2001-01-27 05:54 ` Re: hba_conf: only first line is checked Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Cédric Mesnil @ 2001-01-25 18:23 UTC (permalink / raw)
  To: pgsql-admin

Hi all,

My probleme is the following:
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

the Problem is if the user is present in the second password file, he is always rejected.
(If i comment the first line in the hba.conf, it works)

Is anyone have a solution?

Tanks a lot

Cedric

Attachments:

cedric.mesnil.vcf (text/x-vcard, 308B) download begin:vcard n:Mesnil;Cedric tel;cell:+33 6 84 30 17 04 tel;fax:+33 1 30 97 25 19 tel;work:+33 1 30 97 25 05 x-mozilla-html:TRUE org:Trusted Logic S.A. adr:;;5, rue du Bailliage;Versailles;;78000;FRANCE version:2.1 email;internet:Cedric.Mesnil@trusted-logic.fr x-mozilla-cpt:;-9504 fn:Cedric Mesnil end:vcard
^ permalink raw reply [nested|flat] 2+ messages in thread

* Re: hba_conf: only first line is checked
  2001-01-25 18:23 hba_conf: only first line is checked Cédric Mesnil <cedric.mesnil@trusted-logic.fr>
@ 2001-01-27 05:54 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2001-01-27 05:54 UTC (permalink / raw)
  To: cedric.mesnil@trusted-logic.fr; pgsql-admin

=?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



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2001-01-27 05:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-01-25 18:23 hba_conf: only first line is checked Cédric Mesnil <cedric.mesnil@trusted-logic.fr>
2001-01-27 05:54 ` Tom Lane <tgl@sss.pgh.pa.us>

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