pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
%psql help
2+ messages / 2 participants
[nested] [flat]

* %psql help
@ 2006-07-05 17:18 KyLiE <citlali.guerrero@inegi.gob.mx>
  2006-07-06 06:38 ` Re: %psql help Robin Iddon <robin@edesix.com>
  0 siblings, 1 reply; 2+ messages in thread

From: KyLiE @ 2006-07-05 17:18 UTC (permalink / raw)
  To: pgsql-admin

Hi all, I'm quiet new in this stuff, I have N psql users and N 
databases, each user has a database and can connect  to it using his 
psql account, however I don't want to allow that some user access to 
another database that does not belong to him. I've modify my pg_hba.conf 
file, and allow the access to the databases acording to his owner, but 
once the user has connected to the DB it can change the connection to 
another using this command : \c db1 user2, so my question is, can I 
revoke commands?? or can I configure it per user?? or something??

Regards.






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

* Re: %psql help
  2006-07-05 17:18 %psql help KyLiE <citlali.guerrero@inegi.gob.mx>
@ 2006-07-06 06:38 ` Robin Iddon <robin@edesix.com>
  0 siblings, 0 replies; 2+ messages in thread

From: Robin Iddon @ 2006-07-06 06:38 UTC (permalink / raw)
  To: ; +Cc: pgsql-admin

Check out the GRANT nd REVOKE commands:

http://www.postgresql.org/docs/8.1/static/sql-grant.html
http://www.postgresql.org/docs/8.1/static/sql-revoke.html

You may want to do some revoking of PUBLIC rights followed by some 
granting of rights to specific users on specific databases.

But, I don't think that the psql \c command allows you to bypass pg_hba 
configuration, so I wonder if your pg_hba.conf file is broken - have you 
tried psql <db1> <user2>?  I am pretty sure that there is little or no 
difference between:

psql <db1> <user2>

and

\c <db1> <user2>


Cheers,
Robin

KyLiE wrote:
> Hi all, I'm quiet new in this stuff, I have N psql users and N 
> databases, each user has a database and can connect  to it using his 
> psql account, however I don't want to allow that some user access to 
> another database that does not belong to him. I've modify my 
> pg_hba.conf file, and allow the access to the databases acording to 
> his owner, but once the user has connected to the DB it can change the 
> connection to another using this command : \c db1 user2, so my 
> question is, can I revoke commands?? or can I configure it per user?? 
> or something??




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


end of thread, other threads:[~2006-07-06 06:38 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2006-07-05 17:18 %psql help KyLiE <citlali.guerrero@inegi.gob.mx>
2006-07-06 06:38 ` Robin Iddon <robin@edesix.com>

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