Re: user to database restriction? - Mailing list pgsql-admin

From Stephan Szabo
Subject Re: user to database restriction?
Date
Msg-id 20020210170136.C73516-100000@megazone23.bigpanda.com
Whole thread Raw
In response to Re: user to database restriction?  (Jon August <jon@internection.com>)
List pgsql-admin
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.



pgsql-admin by date:

Previous
From: Jon August
Date:
Subject: Re: user to database restriction?
Next
From: Tom Lane
Date:
Subject: Re: restore whoes