pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Roman Gavrilov <romio@aduva.com>
To: pgsql-admin@postgresql.org
Subject: database privileges and access control
Date: Sun, 09 Mar 2003 11:01:19 +0200
Message-ID: <3E6B02DF.8010604@aduva.com> (raw)

Hello,

I have 2 questions.
The first one (I know it been discussed already, but I did not find the
solution).
If I have user A and user B and database DB1 and database DB2 and only
local connections.


How can I configure the pg_hba.conf to let user A connect only to the
DB1 database and let user B connect only to the DB2 database.
The sameuser param is not good here.


local   sameuser        password
local   all                   password        admins

The file $PGDATA/admins contains the usernames of all users that allowed
to connect to all databases.
I tried to add next line
local    DB1               password        DB1_users
local    DB2               password        DB2_users

and added the users that allowed to connect to each database to those
files accordingly.
The user can connect to sameuser database but not to the DB1 or DB2
database with error incorrect password.

What is the problem ?


Second problem is :
How can I make users to see only the database that they own with the \l
command ?
I don't want users to see all the databases on this host but only those
that they own.

Thanks
Roman

-- 
-----------------------------------------------------------------------------
  Roman Gavrilov
  Aduva Inc., Web Development Services.
  work +972-3-7534373 mobile +972-54-834668
  romio@aduva.com, romio@netvision.net.il







view thread (6+ messages)  latest in thread

Message-ID: <3E6B02DF.8010604@aduva.com>
Permalink:  ../3E6B02DF.8010604@aduva.com/
Also on:    postgresql.org/message-id/3E6B02DF.8010604@aduva.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: romio@aduva.com
  Subject: Re: database privileges and access control
  In-Reply-To: <3E6B02DF.8010604@aduva.com>
  References: <3E6B02DF.8010604@aduva.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