pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedAccessing DB of non-user name
2+ messages / 2 participants
[nested] [flat]
* Accessing DB of non-user name
@ 2002-08-21 23:08 Toni Hermoso <toniher@arrakis.es>
0 siblings, 1 reply; 2+ messages in thread
From: Toni Hermoso @ 2002-08-21 23:08 UTC (permalink / raw)
To: 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 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 ***
------------------------------------------------------
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: Accessing DB of non-user name
@ 2002-08-22 12:42 Bruno Wolff III <bruno@wolff.to>
parent: Toni Hermoso <toniher@arrakis.es>
0 siblings, 0 replies; 2+ messages in thread
From: Bruno Wolff III @ 2002-08-22 12:42 UTC (permalink / raw)
To: Toni Hermoso <toniher@arrakis.es>; +Cc: pgsql-admin
This will work in 7.3. I believe in 7.2 that the sameuser entry will match
for any db, so this rule will always be used and the following rule
specifying all for the db will never be used.
A 7.2 work around might be to use different local IP addresses to connect
to postgres depending on which db you are trying to use.
On Thu, Aug 22, 2002 at 01:08:46 +0200,
Toni Hermoso <toniher@arrakis.es> wrote:
> 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 ***
> ------------------------------------------------------
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-08-22 12:42 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-08-21 23:08 Accessing DB of non-user name Toni Hermoso <toniher@arrakis.es>
2002-08-22 12:42 ` Bruno Wolff III <bruno@wolff.to>
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