pg.ddx.io pgsql-admin@postgresql.org mailing list archive
help / color / mirror / Atom feedmanaging access to database
2+ messages / 2 participants
[nested] [flat]
* managing access to database
@ 2010-11-23 12:24 tomislavb <tomica101@hotmail.com>
0 siblings, 1 reply; 2+ messages in thread
From: tomislavb @ 2010-11-23 12:24 UTC (permalink / raw)
To: pgsql-admin
Hi to all,
i've seen this is a popular topic but haven't found any concrete answers so
far.
So my scenario is this :
- created a new user with :
sudo -u postgres createuser -D -A -P john
- created a new database with :
sudo -u postgres createdb -E 'UTF8' -O john test
- added plpgsql
sudo -u postgres createlang plpgsql test
After that i wanted to allow "external" access to the "test" database.
So i tried configuring the pg_hba.conf file.
In my first attempt i added this line to pg_hba.conf:
host all john 0.0.0.0/0 md5
And john had connect access to access to all databases and admin access to
his "test" database.
After that i wanted give john admin access to his "test" db, and absolutely
no access to other databases.
host test john 0.0.0.0/0 md5
It doesnt work. Can't login through pg_admin.
I've played with revoking access to other databases, but to no avail.
I'm quite positive i'm not the first one with this issue.
There is a similar
http://postgresql.1045698.n5.nabble.com/Extended-security-restriction-to-any-role-with-login-access-...
thread on the matter..
Any help would be very appreciated.
--
View this message in context: http://postgresql.1045698.n5.nabble.com/managing-access-to-database-tp3276689p3276689.html
Sent from the PostgreSQL - admin mailing list archive at Nabble.com.
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: managing access to database
@ 2010-11-25 07:37 Guillaume Lelarge <guillaume@lelarge.info>
parent: tomislavb <tomica101@hotmail.com>
0 siblings, 0 replies; 2+ messages in thread
From: Guillaume Lelarge @ 2010-11-25 07:37 UTC (permalink / raw)
To: tomislavb <tomica101@hotmail.com>; +Cc: pgsql-admin
Le 23/11/2010 13:24, tomislavb a écrit :
> [...]
> i've seen this is a popular topic but haven't found any concrete answers so
> far.
> So my scenario is this :
>
> - created a new user with :
> sudo -u postgres createuser -D -A -P john
>
> - created a new database with :
> sudo -u postgres createdb -E 'UTF8' -O john test
>
> - added plpgsql
> sudo -u postgres createlang plpgsql test
>
> After that i wanted to allow "external" access to the "test" database.
> So i tried configuring the pg_hba.conf file.
> In my first attempt i added this line to pg_hba.conf:
> host all john 0.0.0.0/0 md5
> And john had connect access to access to all databases and admin access to
> his "test" database.
>
> After that i wanted give john admin access to his "test" db, and absolutely
> no access to other databases.
> host test john 0.0.0.0/0 md5
>
> It doesnt work. Can't login through pg_admin.
> I've played with revoking access to other databases, but to no avail.
>
> I'm quite positive i'm not the first one with this issue.
> There is a similar
> http://postgresql.1045698.n5.nabble.com/Extended-security-restriction-to-any-role-with-login-access-...
> thread on the matter..
>
> Any help would be very appreciated.
>
Your help to resolve your issue would be very appreciated, for example
by giving us the error message you have when you try to connect :)
Anyway, we can try and guess that you forgot to change listen_addresses.
If this postgresql.conf parameter is 'localhost', then you should change
it to be '*'. After that, you restart PostgreSQL, and you should be able
to connect from pgAdmin.
If it doesn't work, give us the error message and your full pg_hba.conf
file (mind you, the lines order are important).
--
Guillaume
http://www.postgresql.fr
http://dalibo.com
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2010-11-25 07:37 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2010-11-23 12:24 managing access to database tomislavb <tomica101@hotmail.com>
2010-11-25 07:37 ` Guillaume Lelarge <guillaume@lelarge.info>
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