From: Yann Collavoli <cyann@cict.fr>
To: Tommy Cheng <csckcac@gmail.com>
To: pgsql-admin@postgresql.org
Cc: Marielle BONNARD <bonnard@cict.fr>
Subject: Re: Problem database access
Date: Thu, 12 Mar 2009 10:51:53 +0100
Message-ID: <49B8DB39.1010601@cict.fr> (raw)
In-Reply-To: <2267dd9e0903120226t66d02558pabc83cec2232a253@mail.gmail.com>
References: <49B7B65D.4090505@cict.fr>
<2267dd9e0903120226t66d02558pabc83cec2232a253@mail.gmail.com>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html;charset=UTF-8" http-equiv="Content-Type">
<title></title>
</head>
<body bgcolor="#ffffff" text="#000000">
Hello,,<br>
<br>
Thank you for your help but it doesn't work with the line :<br>
host toto toto 0.0.0.0 0.0.0.0 md5<br>
<br>
I've got the same error message :<br>
FATAL: no pg_hba.conf entry for host "[local]", user "toto", database
"template1", SSL off<br>
<br>
Yann<br>
<br>
Tommy Cheng wrote:
<blockquote
cite="mid:2267dd9e0903120226t66d02558pabc83cec2232a253@mail.gmail.com"
type="cite">
<meta http-equiv="Context-Type" content="text/html; charset=UTF-8">
Try this:<br>
host toto toto 0.0.0.0 0.0.0.0 md5<br>
<br>
<div>On Wed, Mar 11, 2009 at 9:02 PM, Yann Collavoli <span><<a
moz-do-not-send="true" href="mailto:cyann@cict.fr">cyann@cict.fr</a>></span>
wrote:<br>
<blockquote>Hello,<br>
<br>
I am trying to install a postgresql 8.1 shared server. I want each user
to access only its own database through phpPgAdmin. For example, user
“toto” access a database named “toto”, etc.<br>
<br>
I used these lines to create the user and his database :<br>
bash-3.2$ createuser toto -P -D -A<br>
Enter password FOR new role:<br>
Enter it again:<br>
Shall the new role be allowed TO CREATE more new roles? (y/n) n<br>
CREATE ROLE<br>
-bash-3.2$ createdb -O toto -E LATIN1 toto<br>
CREATE DATABASE<br>
<br>
This is the contents of the file pg_hba.conf :<br>
# TYPE DATABASE USER CIDR-ADDRESS METHOD<br>
LOCAL sameuser ALL md5<br>
LOCAL ALL @admins md5<br>
<br>
The “postgres” user (so the administrator of the database) can log in
phpPgAdmin (without any problem). This user can see all databases. When
the user”toto” logs in phpPgAdmin, the connection failed and I get the
following error message in the postgres logs :<br>
<br>
FATAL: no pg_hba.conf entry FOR host "[local]", user "toto", DATABASE
"template1", SSL off<br>
<br>
Do you have any idea about why it doesn’t work and how to correct it?<br>
<br>
Thanks in advance for your help<br>
<br>
Regards<br>
<br>
Yann<br>
<br>
-- <br>
Yann Collavoli<br>
<br>
Tél : 05 61 36 60 20<br>
<br>
Université Paul Sabatier<br>
CICT<br>
118, route de Narbonne<br>
31062 Toulouse Cedex<br>
<br>
<br>
-- <br>
Sent via pgsql-admin mailing list (<a moz-do-not-send="true"
href="mailto:pgsql-admin@postgresql.org">pgsql-admin@postgresql.org</a>)<br>
To make changes to your subscription:<br>
<a moz-do-not-send="true"
href="http://www.postgresql.org/mailpref/pgsql-admin">http://www.postgresql.org/mailpref/pgsql-admi...;
</blockquote>
</div>
<br>
</blockquote>
<br>
<br>
<pre class="moz-signature" cols="72">--
Yann Collavoli
Tél : 05 61 36 60 20
Université Paul Sabatier
CICT
118, route de Narbonne
31062 Toulouse Cedex</pre>
</body>
</html>
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 using the --to and --cc options:
reply via email
To: pgsql-admin@postgresql.org
Cc: cyann@cict.fr, csckcac@gmail.com, bonnard@cict.fr
Subject: Re: Problem database access
In-Reply-To: <49B8DB39.1010601@cict.fr>
* 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