Обсуждение: Database access right
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
Lau NH
Hi , Look at pg_hba.conf file usually under /usr/local/pgsql/data . regards Omid Omoomi >From: "Lau NH" <launh@perridot.com> >To: <pgsql-admin@postgresql.org>, <pgsql-hackers@postgresql.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
Hi , Look at pg_hba.conf file usually under /usr/local/pgsql/data . regards Omid Omoomi >From: "Lau NH" <launh@perridot.com> >To: <pgsql-admin@postgresql.org>, <pgsql-hackers@postgresql.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
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@hotmail.com> To: <launh@perridot.com>; <pgsql-admin@postgresql.org>; <pgsql-hackers@postgresql.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@perridot.com> > >To: <pgsql-admin@postgresql.org>, <pgsql-hackers@postgresql.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
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@perridot.com> >To: "omid omoomi" <oomoomi@hotmail.com>, <pgsql-admin@postgresql.org>, ><pgsql-hackers@postgresql.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@hotmail.com> >To: <launh@perridot.com>; <pgsql-admin@postgresql.org>; ><pgsql-hackers@postgresql.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@perridot.com> > > >To: <pgsql-admin@postgresql.org>, <pgsql-hackers@postgresql.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.