Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id CB5426327AA for ; Thu, 12 Mar 2009 08:31:21 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by localhost (mx1.hub.org [200.46.208.211]) (amavisd-maia, port 10024) with ESMTP id 97505-03 for ; Thu, 12 Mar 2009 08:31:05 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from wf-out-1314.google.com (wf-out-1314.google.com [209.85.200.172]) by mail.postgresql.org (Postfix) with ESMTP id 50BEB6335E3 for ; Thu, 12 Mar 2009 08:31:11 -0300 (ADT) Received: by wf-out-1314.google.com with SMTP id 23so543689wfg.28 for ; Thu, 12 Mar 2009 04:31:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=q4TJeHGtVTPqlrYea7JUvqMnUiCbzIKTIivBPEn//6s=; b=MVrAeq8HCjX21ljxMFJujbcjXu/wpVczG09BdXuBmEMV6wgHt1FSQ1AzU5lqzwb+c5 wkuuikpmi7mT9DE0cR4OeR+yfeO3B8wzljo6d5MtSMUsleKjNXDJe23fui1rNnNR2H9T YHMKrRn6cbslHDsGYt3KYazo5quKmrUErzyAg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=xVZgaFpCwJZ7TMewsuC26Qvvn2fQZyLd6fpnjvmTiSRveDAYHFOiZnm+zlinYNA8x1 NvlXkBtDiKUcJ9O+VpFACmUushRRH89JtucBQI11F2NAtIlERscbuEbTNU0eK51UFz4s LpdPKQcZ+l99EPQx+05/4aLb8U8JlR0Wu3ZN4= MIME-Version: 1.0 Received: by 10.142.43.7 with SMTP id q7mr4255276wfq.229.1236857469296; Thu, 12 Mar 2009 04:31:09 -0700 (PDT) In-Reply-To: <49B8F083.4090204@cict.fr> References: <49B7B65D.4090505@cict.fr> <2267dd9e0903120226t66d02558pabc83cec2232a253@mail.gmail.com> <49B8DB39.1010601@cict.fr> <2acc2c820903120310w48f01252r1d00e4374293902c@mail.gmail.com> <49B8F083.4090204@cict.fr> Date: Thu, 12 Mar 2009 17:01:09 +0530 Message-ID: <2acc2c820903120431p746376fawd4c417f614265b23@mail.gmail.com> Subject: Re: Problem database access From: BRAHMA PRAKASH TIWARI To: Yann Collavoli Cc: Tommy Cheng , pgsql-admin@postgresql.org, Marielle BONNARD Content-Type: multipart/alternative; boundary=000e0cd3047018624a0464ea520b X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0.001 tagged_above=0 required=5 tests=HTML_MESSAGE=0.001 X-Spam-Level: X-Archive-Number: 200903/152 X-Sequence-Number: 31652 --000e0cd3047018624a0464ea520b Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Hi Yann For below given purpose you need to create roles and assign them separatel= y to each database user or revoke the global permission from database and givepermission to concern user only and also You need to change the password of global user.this is the best way by which You can achive your requirement.none can see others database On Thu, Mar 12, 2009 at 4:52 PM, Yann Collavoli wrote: > Hi, > > If i add this line "local all all > trust", the user "toto" can log in phpPgAdmin but he can see the others > databases. Or, I want each user to access only its own database through > phpPgAdmin (for example, user =93toto=94 access only at the database name= d > =93toto=94). I think it's possible to do that but i don't understand how.= .. > > Regards > > Yann > > > BRAHMA PRAKASH TIWARI wrote: > > Hi you need to add following enty 100% it will resolve the problem > > > # "local" is for Unix domain socket connections only > local all all trust > > > On Thu, Mar 12, 2009 at 3:21 PM, Yann Collavoli wrote: > > Hello,, > > Thank you for your help but it doesn't work with the line : > host toto toto 0.0.0.0 0.0.0.0 md5 > > I've got the same error message : > FATAL: no pg_hba.conf entry for host "[local]", user "toto", database > "template1", SSL off > > Yann > > Tommy Cheng wrote: > > Try this: > host toto toto 0.0.0.0 0.0.0.0 md5 > > On Wed, Mar 11, 2009 at 9:02 PM, Yann Collavoli wrote: > > Hello, > > I am trying to install a postgresql 8.1 shared server. I want each user t= o > access only its own database through phpPgAdmin. For example, user =93tot= o=94 > access a database named =93toto=94, etc. > > I used these lines to create the user and his database : > bash-3.2$ createuser toto -P -D -A > Enter password FOR new role: > Enter it again: > Shall the new role be allowed TO CREATE more new roles? (y/n) n > CREATE ROLE > -bash-3.2$ createdb -O toto -E LATIN1 toto > CREATE DATABASE > > This is the contents of the file pg_hba.conf : > # TYPE DATABASE USER CIDR-ADDRESS METHOD > LOCAL sameuser ALL md5 > LOCAL ALL @admins md5 > > The =93postgres=94 user (so the administrator of the database) can log in > phpPgAdmin (without any problem). This user can see all databases. When t= he > user=94toto=94 logs in phpPgAdmin, the connection failed and I get the fo= llowing > error message in the postgres logs : > > FATAL: no pg_hba.conf entry FOR host "[local]", user "toto", DATABASE > "template1", SSL off > > Do you have any idea about why it doesn=92t work and how to correct it? > > Thanks in advance for your help > > Regards > > Yann > > -- > Yann Collavoli > > T=E9l : 05 61 36 60 20 > > Universit=E9 Paul Sabatier > CICT > 118, route de Narbonne > 31062 Toulouse Cedex > > > -- > Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) > To make changes to your subscription: > http://www.postgresql.org/mailpref/pgsql-admin > > > > > -- > Yann Collavoli > > T=E9l : 05 61 36 60 20 > > Universit=E9 Paul Sabatier > CICT > 118, route de Narbonne > 31062 Toulouse Cedex > > > > > -- > Brahma Prakash Tiwari > Database Administrator > iBoss Tech Solution Noida > > > > -- > Yann Collavoli > > T=E9l : 05 61 36 60 20 > > Universit=E9 Paul Sabatier > CICT > 118, route de Narbonne > 31062 Toulouse Cedex > > --=20 Brahma Prakash Tiwari Database Administrator iBoss Tech Solution Noida --000e0cd3047018624a0464ea520b Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
Hi Yann
For=A0below given=A0purpose=A0you need to create roles=A0=A0and assign= them separately to each database user or revoke the global permission from= database and givepermission to=A0=A0 concern user only=A0and also=A0You ne= ed to change the password of global user.this is the best way by which You = can achive your requirement.none can see others database

On Thu, Mar 12, 2009 at 4:52 PM, Yann Collavoli = <cyann@cict.fr>= ; wrote:
Hi,

If i add this line=A0= "local=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 trust&qu= ot;, the user "toto" can log in phpPgAdmin but he can see the oth= ers databases. Or, I want each user to access only its own database through= phpPgAdmin (for example, user =93toto=94 access only at the database named= =93toto=94). I think it's possible to do that but i don't understa= nd how...

Regards

Yann
=20


BRAHMA PRAKASH TIWARI wrote:=20
Hi you need to add following enty 100% it will resolve the problem
=A0
=A0
# "local" is for Unix domain socket connections only
=A0l= ocal=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0 all=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 trust


=
On Thu, Mar 12, 2009 at 3:21 PM, Yann Collavoli <cyann@cict.fr> wrote:<= br>
Hello,,

Thank you for your help but it doesn't work with th= e line :
host=A0=A0=A0 toto =A0=A0=A0 toto 0.0.0.0 0.0.0.0 md5

I&= #39;ve got the same error message :
FATAL:=A0 no pg_hba.conf entry for h= ost "[local]", user "toto", database "template1&qu= ot;, SSL off

Yann

Tommy Cheng wrote:=20
Try this:
host=A0=A0=A0 toto =A0=A0=A0 toto 0.= 0.0.0 0.0.0.0 md5

On Wed, Mar 11, 2009 at 9:02 PM, Yann Collavoli <cyann@cict.fr> wrote:<= br>
Hello,

I am trying to install a postgresql 8.1 shared se= rver. I want each user to access only its own database through phpPgAdmin. = For example, user =93toto=94 access a database named =93toto=94, etc.
I used these lines to create the user and his database :
bash-3.2$ createuser toto -P -D -A
Enter password FOR new role:
Enter= it again:
Shall the new role be allowed TO CREATE more new roles? (y/n)= n
CREATE ROLE
-bash-3.2$ createdb -O toto -E LATIN1 toto
CREATE D= ATABASE

This is the contents of the file pg_hba.conf :
# TYPE DATABASE USER = CIDR-ADDRESS METHOD
LOCAL sameuser ALL md5
LOCAL ALL @admins md5
<= br>The =93postgres=94 user (so the administrator of the database) can log i= n phpPgAdmin (without any problem). This user can see all databases. When t= he user=94toto=94 logs in phpPgAdmin, the connection failed and I get the f= ollowing error message in the postgres logs :

FATAL: no pg_hba.conf entry FOR host "[local]", user "to= to", DATABASE "template1", SSL off

Do you have any id= ea about why it doesn=92t work and how to correct it?

Thanks in adva= nce for your help

Regards

Yann

--
Yann Collavoli

T=E9l : 05 61 3= 6 60 20

Universit=E9 Paul Sabatier
CICT
118, route de Narbonne=
31062 Toulouse Cedex


--
Sent via pgsql-admin mailing lis= t (pgsql-ad= min@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpr= ef/pgsql-admin



--=
=20
Yann Collavoli

T=E9l : 05 61 36 60 20

Universit=E9 Paul Sabatier
CICT
118, route de Narbonne
31062 Toulouse Cedex



--
Brahm= a Prakash Tiwari
Database Administrator
iBoss Tech Solution Noida
=


--=20
Yann Collavoli

T=E9l : 05 61 36 60 20

Universit=E9 Paul Sabatier
CICT
118, route de Narbonne
31062 Toulouse Cedex



--
Brahma Prakash Tiwari
Database Administrator
iBo= ss Tech Solution Noida
--000e0cd3047018624a0464ea520b--