Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id DDB6D634650 for ; Wed, 11 Mar 2009 10:22:24 -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 79192-08 for ; Wed, 11 Mar 2009 10:22:11 -0300 (ADT) X-Greylist: delayed 00:19:43.827733 by SQLgrey-1.7.6 Received: from smtp2.cict.fr (smtp2.cict.fr [195.220.59.17]) by mail.postgresql.org (Postfix) with ESMTP id BB21C63493A for ; Wed, 11 Mar 2009 10:22:05 -0300 (ADT) Received: from smtp2.cict.fr (localhost.localdomain [127.0.0.1]) by smtp2.cict.fr (8.14.2/8.14.2) with ESMTP id n2BD2M8g027088 for ; Wed, 11 Mar 2009 14:02:22 +0100 Received: from pc-yann.cict.fr (pc-yann.cict.fr [130.120.72.5]) (authenticated bits=0) by smtp2.cict.fr (8.14.2/8.14.2) with ESMTP id n2BD2LRG027080 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 11 Mar 2009 14:02:22 +0100 Message-ID: <49B7B65D.4090505@cict.fr> Date: Wed, 11 Mar 2009 14:02:21 +0100 From: Yann Collavoli User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: Problem database access Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=0 tagged_above=0 required=5 tests=none X-Spam-Level: X-Archive-Number: 200903/145 X-Sequence-Number: 31645 Hello, 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. 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 “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 : FATAL: no pg_hba.conf entry FOR host "[local]", user "toto", DATABASE "template1", SSL off Do you have any idea about why it doesn’t work and how to correct it? Thanks in advance for your help Regards Yann -- Yann Collavoli Tél : 05 61 36 60 20 Université Paul Sabatier CICT 118, route de Narbonne 31062 Toulouse Cedex