Re: Database access right

From: "omid omoomi" <oomoomi(at)hotmail(dot)com>
To: launh(at)perridot(dot)com, pgsql-admin(at)postgresql(dot)org
Subject: Re: Database access right
Date: 2002-01-25 09:16:15
Message-ID: F704rbpNrRBa2S2FlFJ00028558@hotmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

AFAIK, you can add different lines at the end of pg_hba.conf where each line
refer to a single database name and also a single user/pw file . Each of
these files contain the user/pw of the valid users to be connected to each
database. here you can make each usr/pw file:

cd /usr/local/bin/
pg_passwd ../data/users1.pw //this file contains valid users for db1
pg_passwd ../data/users2.pw //this file contains valid users for db2
.
.
just make sure to have your DBA user/pw common in all these files.
Then you can add these lines to the end of pg_hba.conf file changing default
trusted mode to the name of the user/pw files as below :

local db1 user1.pw
local db2 user2.pw
.
.
.

hope that helps
Omid

>From: "Lau NH" <launh(at)perridot(dot)com>
>To: "omid omoomi" <oomoomi(at)hotmail(dot)com>, <pgsql-admin(at)postgresql(dot)org>,
><pgsql-hackers(at)postgresql(dot)org>
>Subject: Re: [ADMIN] Database access right
>Date: Fri, 25 Jan 2002 16:46:13 +0800
>
>My case is like this, my database server has a grant DBA "postgres" who can
>access all the database, and I have individual database's dba, e.g. "user1"
>as dba for database "db1", "user2" as dba for database "db2", and so on.
>How am I going to set this up in pg_hba.conf?
>
>Regards,
>Lau NH
>
>----- Original Message -----
>From: "omid omoomi" <oomoomi(at)hotmail(dot)com>
>To: <launh(at)perridot(dot)com>; <pgsql-admin(at)postgresql(dot)org>;
><pgsql-hackers(at)postgresql(dot)org>
>Sent: Friday, January 25, 2002 8:12 AM
>Subject: Re: [ADMIN] Database access right
>
>
> >
> > Hi ,
> > Look at pg_hba.conf file usually under /usr/local/pgsql/data .
> > regards
> > Omid Omoomi
> >
> > >From: "Lau NH" <launh(at)perridot(dot)com>
> > >To: <pgsql-admin(at)postgresql(dot)org>, <pgsql-hackers(at)postgresql(dot)org>
> > >Subject: [ADMIN] Database access right
> > >Date: Fri, 25 Jan 2002 13:39:14 +0800
> > >
> > >Hi all,
> > > Is there anyway to restrict the database owner to access only to
> > >his/her database? because if I assign the dba right to the database
>owner,
> > >he/she will be able to access other databases in the same server. Is
>there
> > >anyway to restrict that?
> > >
> > >
> > >Regards,
> > >Lau NH
> > >
> >
> >
> > _________________________________________________________________
> > Chat with friends online, try MSN Messenger: http://messenger.msn.com
>

_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp.

Browse pgsql-admin by date

  From Date Subject
Next Message Pablo Prieto 2002-01-25 10:38:51 Vacuum and Vacuum analyse
Previous Message ms 2002-01-25 09:07:54 dump file in more readable format