Re: restricting non superuser from accessing other databases

From: David Garamond <lists(at)zara(dot)6(dot)isreserved(dot)com>
To: olly(at)lfix(dot)co(dot)uk
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: restricting non superuser from accessing other databases
Date: 2004-09-07 13:35:08
Message-ID: 413DB90C.7010502@zara.6.isreserved.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Oliver Elphick wrote:
>>I am setting up a single PostgreSQL installation to be used by several
>>users. Can I restrict a database user from connecting and creating
>>objects in other databases but his/her own? So far I can only restrict a
>>user from creating more databases or users.
>>
>>(Yes, I have set up a proper pg_hba.conf, but once a user is connected,
>>he can switch to another database, e.g. with "\c otherdb" in psql).
>
> Not unless pg_hba.conf allows it. You could set up explicit
> database/user combinations there.

Thanks! So I must modify and kill -HUP postmaster everytime a new db is
added. Is there something like this in pg_hba.conf?

local owndb all md5

where "owndb" means only allow a user to connect only to db he/she owns.

--
dave

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message David Garamond 2004-09-07 13:37:01 Salt in encrypted password in pg_shadow
Previous Message Valerie Schneider DSI/DEV 2004-09-07 13:29:24 Pb with ecpg and include file on PG 8.0.0