Received: from localhost (unknown [200.46.208.211]) by mail.postgresql.org (Postfix) with ESMTP id B24FB6346ED for ; Fri, 13 Mar 2009 05:11:11 -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 94324-07 for ; Fri, 13 Mar 2009 05:10:56 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from smtp1.cict.fr (smtp1.cict.fr [195.220.59.41]) by mail.postgresql.org (Postfix) with ESMTP id C3D696346D1 for ; Fri, 13 Mar 2009 05:10:53 -0300 (ADT) Received: from smtp1.cict.fr (localhost.localdomain [127.0.0.1]) by smtp1.cict.fr (8.14.2/8.14.2) with ESMTP id n2D8AoSt015008 for ; Fri, 13 Mar 2009 09:10:51 +0100 Received: from pc-yann.cict.fr (pc-yann.cict.fr [130.120.72.5]) (authenticated bits=0) by smtp1.cict.fr (8.14.2/8.14.2) with ESMTP id n2D8An0e014995 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 13 Mar 2009 09:10:50 +0100 Message-ID: <49BA1509.4070801@cict.fr> Date: Fri, 13 Mar 2009 09:10:49 +0100 From: Yann Collavoli User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: Carol Walter CC: pgsql-admin@postgresql.org Subject: Re: Problem database access References: <49B7B65D.4090505@cict.fr> <2267dd9e0903120226t66d02558pabc83cec2232a253@mail.gmail.com> <49B8DB39.1010601@cict.fr> <2acc2c820903120310w48f01252r1d00e4374293902c@mail.gmail.com> <49B8F083.4090204@cict.fr> <2acc2c820903120431p746376fawd4c417f614265b23@mail.gmail.com> In-Reply-To: Content-Type: text/html; charset=windows-1252 Content-Transfer-Encoding: 8bit X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=1.394 tagged_above=0 required=5 tests=AWL=-0.279, HTML_MESSAGE=0.001, MIME_HTML_ONLY=1.672 X-Spam-Level: * X-Archive-Number: 200903/161 X-Sequence-Number: 31661 Hi,

Thank you very much, with this parameter it works like i want !!

Yann


Carol Walter wrote:
If your users are the database owners, you can set the "Only show owned databases?" option in the config.inc.php file for your PhpPgAdmin.

Carol

On Mar 12, 2009, at 7:31 AM, BRAHMA PRAKASH TIWARI wrote:

Hi Yann
For below given purpose you need to create roles  and assign them separately 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 <cyann@cict.fr> 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 “toto” access only at the database named “toto”). 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 <cyann@cict.fr> 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 <cyann@cict.fr> wrote:
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


--
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él : 05 61 36 60 20

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



--
Brahma Prakash Tiwari
Database Administrator
iBoss Tech Solution Noida


-- 
Yann Collavoli

Tél : 05 61 36 60 20

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



--
Brahma Prakash Tiwari
Database Administrator
iBoss Tech Solution Noida



-- 
Yann Collavoli

Tél : 05 61 36 60 20

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