Re: dissallowing access to databases - Mailing list pgsql-general

From KuroiNeko
Subject Re: dissallowing access to databases
Date
Msg-id 39E99782.nailSH18ZAPJ@ed.ed
Whole thread Raw
In response to dissallowing access to databases  (zaor@sky.pl (Pawel Zaorski))
Responses Re: dissallowing access to databases  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
> That the user can connect to other databases, indicates that you have
> created that user as a superuser

 Works perfectly for a simple mortal here. Moreof, a user can create his
tables:

copl=# select * from pg_shadow where usename = 'cdl_user';
usename     | cdl_user
usesysid    | 307
usecreatedb | f
usetrace    | f
usesuper    | f
usecatupd   | f
passwd      |
valuntil    |

copl=# \c copl cdl_user
You are now connected to database copl as user cdl_user.
copl=> \dt
Name  | copl_global
Type  | table
Owner | root
------+------------
Name  | ours_hints
Type  | table
Owner | root
------+------------
Name  | ours_refs
Type  | table
Owner | root
------+------------
Name  | ours_users
Type  | table
Owner | root

copl=> select * from copl_global;
ERROR:  copl_global: Permission denied.
copl=> create table test( id int4 );
CREATE
copl=> drop table test;
DROP
copl=> \c mailarch cdl_user
You are now connected to database mailarch as user cdl_user.
mailarch=> \dt
Name  | messages
Type  | table
Owner | root

mailarch=> select * from messages;
ERROR:  messages: Permission denied.
mailarch=> create table test( id int4 );
CREATE
mailarch=> drop table test;
DROP

 Am I missing something?

 TIA

 Ed


---
 Well I tried to be meek
  And I have tried to be mild
 But I spat like a woman
  And I sulked like a child
 I have lived behind the walls
  That have made me alone
 Striven for peace
  Which I never have known

 Dire Straits, Brothers In Arms, The Man's Too Strong (Knopfler)


pgsql-general by date:

Previous
From: KuroiNeko
Date:
Subject: Re: dissallowing access to databases
Next
From: Tom Lane
Date:
Subject: Re: dissallowing access to databases