Re: dissallowing access to databases

From: Tomas Berndtsson <tomas(at)nocrew(dot)org>
To: zaor(at)sky(dot)pl (Pawel Zaorski)
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: dissallowing access to databases
Date: 2000-10-15 11:09:55
Message-ID: 801yxi4ayk.fsf@junk.nocrew.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

zaor(at)sky(dot)pl (Pawel Zaorski) writes:

> Hello.
>
> How can I prevent user from connecting to certain databases?
>
> For example:
>
> user1 has database user1. But he can easily do '\c otherdb' to connect
> to a database own by other user.
> And what scares me most, he cat create his own tables in this
> database(!!)
>
> In my pg_hba.conf I have a line:
>
> local all crypt
>
> which (IMO) means that any user can connect to any database. How to
> change this to allow users connect *only* to their db?

That the user can connect to other databases, indicates that you have
created that user as a superuser, i.e. he have permission to create
new postgres users. If the user is not a superuser, he shouldn't be
able to connect to other databases, than the ones he own or have
explicit permission to.

Tomas

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message KuroiNeko 2000-10-15 11:24:15 Re: dissallowing access to databases
Previous Message Pawel Zaorski 2000-10-15 10:30:55 dissallowing access to databases