pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Confused about user permissions and pg_hba.conf
2+ messages / 2 participants
[nested] [flat]

* Confused about user permissions and pg_hba.conf
@ 2002-11-19 01:41  Graham Wilson <grahamwilsonca@yahoo.ca>
  0 siblings, 1 reply; 2+ messages in thread

From: Graham Wilson @ 2002-11-19 01:41 UTC (permalink / raw)
  To: pgsql-admin

Hi all, 

I have searched through the archives but after 2 days
of trying, I still cannot figure out how to get
postgres permissions to work the way I need them to. 

What I am trying to do is setup Postgresql on a Linux
server so that users can connect from anywhere on the
subnet and edit tables that they themselves have
created.  I then want other users to be able to access
these tables as a 'guest' using the password
'readonly'.  

At the moment, I have,

  host all  xxx.x.242.0 255.255.255.0 ident sameuser

in the pg_hda.conf file so that anyone on the subnet
can access any table.  Given that all users creating
databases and making tables in the database have unix
accounts, the 'ident sameuser' authentication is fine.
 Alas, how do I go about creating a user that only has
'readonly' access to the databases/tables?  Many users
will need to read the tables in a given database but I
don't want them to be able to modify the database in
any way (i.e. nothing other than select statements).




______________________________________________________________________ 
Post your free ad now! http://personals.yahoo.ca



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: Confused about user permissions and pg_hba.conf
@ 2002-11-19 14:07  Bruno Wolff III <bruno@wolff.to>
  parent: Graham Wilson <grahamwilsonca@yahoo.ca>
  0 siblings, 0 replies; 2+ messages in thread

From: Bruno Wolff III @ 2002-11-19 14:07 UTC (permalink / raw)
  To: Graham Wilson <grahamwilsonca@yahoo.ca>; +Cc: pgsql-admin

On Mon, Nov 18, 2002 at 20:41:34 -0500,
  Graham Wilson <grahamwilsonca@yahoo.ca> wrote:
> Hi all, 
> 
> I have searched through the archives but after 2 days
> of trying, I still cannot figure out how to get
> postgres permissions to work the way I need them to. 
> 
> What I am trying to do is setup Postgresql on a Linux
> server so that users can connect from anywhere on the
> subnet and edit tables that they themselves have
> created.  I then want other users to be able to access
> these tables as a 'guest' using the password
> 'readonly'.  
> 
> At the moment, I have,
> 
>   host all  xxx.x.242.0 255.255.255.0 ident sameuser

I believe you need to upgrade to at least 7.2 so that you can have
separate lines for each user. Then what you do is first check for
any database user guest and use crpyt authentication (or if you trust
everyone on those hosts just use trust authentication). Then use
another record specifying any database, sameuser and ident authentication.



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2002-11-19 14:07 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-11-19 01:41 Confused about user permissions and pg_hba.conf Graham Wilson <grahamwilsonca@yahoo.ca>
2002-11-19 14:07 ` 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