Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id 0D9C8633AF7 for ; Thu, 12 Mar 2009 07:10: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 71882-04 for ; Thu, 12 Mar 2009 07:10:11 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from rv-out-0506.google.com (rv-out-0506.google.com [209.85.198.237]) by mail.postgresql.org (Postfix) with ESMTP id 1D2466339E6 for ; Thu, 12 Mar 2009 07:10:13 -0300 (ADT) Received: by rv-out-0506.google.com with SMTP id f6so513268rvb.43 for ; Thu, 12 Mar 2009 03:10: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=uxwga+8cnqLfqW5lNNLR/HSNhRzlULEgmjZa2eZrKcU=; b=DBefemvBjAHUQCT4ARGd8tDQHRkRz72VFT0mIPLHfOAwdv58u8DgDDwcVJ35r4IeYJ arem6rOW4g2uwY78lLBM+o+TB2rQJUJvbJxgP53JstKAoVNc57eJd90ltuuTsdctXIb8 IDXOGisHX9wAc3FQIDXKgoZQCSC6IgAmxzGsI= 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=IcnSktFHieiDkcJ/4BIQdNH0pxRuYx9gmM8e8Jr7kXRpnaUWyzpycHxojEwn44IyXP eHs/1Kgos54y1OI/A8yzJB1wNYR483wJRZe4f1hY+LEJndjpBzNOIDCVIndpqbQbx/rk t3ad1KITb1H7AS9r96PNVZzhlgMU24JFWu4dc= MIME-Version: 1.0 Received: by 10.142.239.11 with SMTP id m11mr4216921wfh.329.1236852609918; Thu, 12 Mar 2009 03:10:09 -0700 (PDT) In-Reply-To: <49B8DB39.1010601@cict.fr> References: <49B7B65D.4090505@cict.fr> <2267dd9e0903120226t66d02558pabc83cec2232a253@mail.gmail.com> <49B8DB39.1010601@cict.fr> Date: Thu, 12 Mar 2009 15:40:09 +0530 Message-ID: <2acc2c820903120310w48f01252r1d00e4374293902c@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=000e0cd144947426380464e93017 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/147 X-Sequence-Number: 31647 --000e0cd144947426380464e93017 Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable 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 > > --=20 Brahma Prakash Tiwari Database Administrator iBoss Tech Solution Noida --000e0cd144947426380464e93017 Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: quoted-printable
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:
Hello,,

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

I've got the same error message :FATAL:=A0 no pg_hba.conf entry for host "[local]", user "t= oto", database "template1", 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


--
Brahma Prakash Tiwari
Database Administrator
iBoss Tech Solu= tion Noida
--000e0cd144947426380464e93017--