pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Stephan Szabo <sszabo@megazone23.bigpanda.com>
To: Jon August <jon@internection.com>
Cc: Chris Ruprecht <chrup999@yahoo.com>
Cc: PostGreSQL Admin Group <pgsql-admin@postgresql.org>
Subject: Re: user to database restriction?
Date: Sun, 10 Feb 2002 17:03:27 -0800 (PST)
Message-ID: <20020210170136.C73516-100000@megazone23.bigpanda.com> (raw)
In-Reply-To: <Pine.LNX.4.21.0202101913530.6312-100000@www.internection.com>

On Sun, 10 Feb 2002, Jon August wrote:

>
> That seems like a lot of work. . . and could become easily outdated.  No?
>
> How about in pg_hba.conf?  There's no way to say only user xyz can connect
> to database abc?
>
> I tried something like this in my pg_hba.conf, but now nobody can connect
> to it.
>
> local     all                                       password    postgres
> host      all     xxx.xxx.xxx.xxx  255.255.255.255  password    postgres
> local     shopdb                                    password        mark
> host      shopdb  xxx.xxx.xxx.xxx  255.255.255.255  password        mark
>
> I was hoping this config would permit user "postgres" to connect to any
> database, but limit user "mark" to shopdb.

The final argument goes to an external file in $PGDATA that lists users
(and optionally passwords) for the users that are allowed into the db.





view thread (7+ messages)  latest in thread

Message-ID: <20020210170136.C73516-100000@megazone23.bigpanda.com>
Permalink:  ../20020210170136.C73516-100000@megazone23.bigpanda.com/
Also on:    postgresql.org/message-id/20020210170136.C73516-100000@megazone23.bigpanda.com

 · 

reply

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: sszabo@megazone23.bigpanda.com, jon@internection.com, chrup999@yahoo.com
  Subject: Re: user to database restriction?
  In-Reply-To: <20020210170136.C73516-100000@megazone23.bigpanda.com>
  References: <Pine.LNX.4.21.0202101913530.6312-100000@www.internection.com> <20020210170136.C73516-100000@megazone23.bigpanda.com>

* 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