Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id BA9A1B5DC9D for ; Tue, 18 Oct 2011 13:27:22 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 33015-01 for ; Tue, 18 Oct 2011 16:27:16 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0-rc2 Received: from gw.wicourts.gov (gwmta.wicourts.gov [165.219.244.99]) by mail.postgresql.org (Postfix) with ESMTP id CE1C2B5DBCA for ; Tue, 18 Oct 2011 13:27:14 -0300 (ADT) Received: from Courts-MTA by gw.wicourts.gov with Novell_GroupWise; Tue, 18 Oct 2011 11:27:14 -0500 Message-Id: <4E9D628A0200002500042183@gw.wicourts.gov> X-Mailer: Novell GroupWise Internet Agent 8.0.1 Date: Tue, 18 Oct 2011 11:27:06 -0500 From: "Kevin Grittner" To: "Alexander James Spence [axs]" , "'pgsql-admin@postgresql.org'" Subject: Re: Privileges question References: <8EDB6E83019BEC4B9153122CFB928AF001F6463C4B5D@MAILBOX.staff.aber.ac.uk> In-Reply-To: <8EDB6E83019BEC4B9153122CFB928AF001F6463C4B5D@MAILBOX.staff.aber.ac.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Content-Disposition: inline X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.404 tagged_above=-10 required=5 tests=BAYES_00=-1.9, RP_MATCHES_RCVD=-0.504 X-Spam-Level: X-Archive-Number: 201110/89 X-Sequence-Number: 38541 "Alexander James Spence [axs]" wrote: > will have to create around 200+ users and user databases for > student project use. I have tried all sorts of GRANT and REVOKE > combinations but for the life of me cannot stop other users from > creating tables in a database that is not their own. test=# create user xxx; CREATE ROLE test=# create database xxx owner xxx; CREATE DATABASE test=# \c xxx You are now connected to database "xxx" as user "kgrittn". xxx=# revoke create on database xxx from public; REVOKE xxx=# revoke create on schema public from public; REVOKE xxx=# grant create on schema public to xxx; GRANT You might also want to limit connection rights in pg_hba.conf -Kevin