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

* securing template1
@ 2004-09-27 14:50 Gonzales,S <gonzales_speedy@fastmail.fm>
  2004-10-01 14:54 ` Re: securing template1 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: Gonzales,S @ 2004-09-27 14:50 UTC (permalink / raw)
  To: pgsql-admin

How do i prevent ordinary users from altering the template1 database,
eg they can create tables in template1;

revoke doenst do the trick,
template1 remains visible and a user can create table in template1 using 
  for example pgadmin

select * from pg_database where datname like '%temp%';


datname    | datdba | encoding | datistemplate | datallowconn | 
datlastsysoid | datvacuumxid | datfrozenxid | datpath | datconfig | 
      datacl
---------------+--------+----------+---------------+--------------+---------------+--------------+--------------+---------+-----------+--------------------------
  template1     |      1 |        6 | t             | t            | 
      17140 |      4628963 |   3225854436 |         |           | 
{postgres=C*T*/postgres}
  template0     |      1 |        0 | t             | f            | 
      17140 |          464 |          464 |         |           | 
{postgres=C*T*/postgres}
  ouwetemplate1 |      1 |        0 | t             | t            | 
      17140 |      4623413 |   3225848886 |         |           | 
{postgres=C*T*/postgres}
(3 rows)


tnx,



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

* Re: securing template1
  2004-09-27 14:50 securing template1 Gonzales,S <gonzales_speedy@fastmail.fm>
@ 2004-10-01 14:54 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2004-10-01 14:54 UTC (permalink / raw)
  To: Gonzales,S <gonzales_speedy@fastmail.fm>; +Cc: pgsql-admin

"Gonzales,S" <gonzales_speedy@fastmail.fm> writes:
> How do i prevent ordinary users from altering the template1 database,
> eg they can create tables in template1;

Revoke public's CREATE rights on the public schema in template1.  See
the GRANT and REVOKE manual pages.

			regards, tom lane



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


end of thread, other threads:[~2004-10-01 14:54 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2004-09-27 14:50 securing template1 Gonzales,S <gonzales_speedy@fastmail.fm>
2004-10-01 14:54 ` Tom Lane <tgl@sss.pgh.pa.us>

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