pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Yann Collavoli <cyann@cict.fr>
To: pgsql-admin@postgresql.org
Subject: Problem database access
Date: Wed, 11 Mar 2009 14:02:21 +0100
Message-ID: <49B7B65D.4090505@cict.fr> (raw)

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




view thread (8+ messages)  latest in thread

Message-ID: <49B7B65D.4090505@cict.fr>
Permalink:  ../49B7B65D.4090505@cict.fr/
Also on:    postgresql.org/message-id/49B7B65D.4090505@cict.fr

 · 

reply

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
  Subject: Re: Problem database access
  In-Reply-To: <49B7B65D.4090505@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