Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id 68460475B64 for ; Wed, 21 Aug 2002 19:08:58 -0400 (EDT) Received: from mx1.melange.net (mx.melange.net [212.59.199.94]) by postgresql.org (Postfix) with ESMTP id 6C2EE475B49 for ; Wed, 21 Aug 2002 19:08:57 -0400 (EDT) Received: from smta02.arrakis.isp ([192.168.197.186]) by mx1.melange.net (8.11.2/8.11.0) with ESMTP id g7LN9oq22100 for ; Thu, 22 Aug 2002 01:09:50 +0200 Received: from goku.son ([212.59.223.41]) by smta02.arrakis.isp (Netscape Messaging Server 4.15 ssmtp03 Jun 21 2001 23:53:48) with SMTP id H17V0902.70W for ; Thu, 22 Aug 2002 01:09:45 +0200 Date: Thu, 22 Aug 2002 01:08:46 +0200 From: Toni Hermoso To: pgsql-admin@postgresql.org Subject: Accessing DB of non-user name Message-Id: <20020822010846.7e7249b2.toniher@arrakis.es> X-Mailer: Sylpheed version 0.8.1claws (GTK+ 1.2.10; i586-mandrake-linux-gnu) Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg=pgp-sha1; boundary="=.E4tt7q7+trEiL(" X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200208/240 X-Sequence-Number: 5354 --=.E4tt7q7+trEiL( Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit 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 or not 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 cannot connect 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 *** ------------------------------------------------------ --=.E4tt7q7+trEiL( Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (GNU/Linux) iD8DBQE9ZB2E3O471rZ7Q9wRAlgmAJ9NL/hBj9G6l3XSox2qY3QWrdfjnACgkmmC 9h42MjR3QrekMoGra9ZhstQ= =wO02 -----END PGP SIGNATURE----- --=.E4tt7q7+trEiL(--