pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: tomislavb <tomica101@hotmail.com>
To: pgsql-admin@postgresql.org
Subject: managing access to database
Date: Tue, 23 Nov 2010 04:24:25 -0800 (PST)
Message-ID: <1290515065600-3276689.post@n5.nabble.com> (raw)


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.



view thread (2+ messages)  latest in thread

Message-ID: <1290515065600-3276689.post@n5.nabble.com>
Permalink:  ../1290515065600-3276689.post@n5.nabble.com/
Also on:    postgresql.org/message-id/1290515065600-3276689.post@n5.nabble.com

 · 

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: tomica101@hotmail.com
  Subject: Re: managing access to database
  In-Reply-To: <1290515065600-3276689.post@n5.nabble.com>

* 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