Accessing DB of non-user name - Mailing list pgsql-admin

From Toni Hermoso
Subject Accessing DB of non-user name
Date
Msg-id 20020822010846.7e7249b2.toniher@arrakis.es
Whole thread Raw
Responses Re: Accessing DB of non-user name
List pgsql-admin
Hello list,

I'm trying PostgreSQL having previous experience with MySQL.

I have got the following problem:
I want to allow database access to a user (username1)  to a database with a name different to the same user (which may
ornot be created by such user). 
But I do not manage.
I have the following entries in pg_hba.conf:

host    sameuser    127.0.0.1    255.255.255.255 md5
host  all    127.0.0.1    255.255.255.255        md5    admins

Allowing TCP/IP access restricted to localhost to users with same database name and
allowing TC/IP access to all databases by superusers (admin group).

Anyway I cannot manage one user: user1 may access database user2, f.instance

I tried

host user2 127.0.0.1 255.255.255.255 user1group -> whre user1group refers to pg_ident map.

On the other hand when I add this line (wherever upper or lower to 2 previous ones) I cannot access user2 database
thru'superusers. 

When 'host all' line is substituted by an equivalent local all    md5 admins -> I haven't got the last problem, but I
cannotconnect to user2 thu' user1 yet. 

I tried grant tables and other objects if present with no result.

What am I missing?

Thanks!

--
Toni Hermoso Pulido
------------------------------------------------------
web: http://www.arrakis.es/~toniher
email: toniher@arrakis.es
       toni.hermoso@hispalinux.es

pgp_public_key:
http://www.arrakis.es/~toniher/toniher.pgp
       
        *** Cífratelo, cífraselo ***
------------------------------------------------------

Attachment

pgsql-admin by date:

Previous
From: Elielson Fontanezi
Date:
Subject: EJB sample to Apache WebServer + Apache Tomcat Server + JBoss Ser ver + PostgreSQL Server
Next
From: Tim Ellis
Date:
Subject: Re: mysqldiff-like utility for PG?