X-Original-To: pgsql-admin-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id A79F43A5C1E for ; Wed, 12 Jan 2005 05:35:45 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 47014-08 for ; Wed, 12 Jan 2005 05:35:37 +0000 (GMT) Received: from wolff.to (wolff.to [66.93.249.74]) by svr1.postgresql.org (Postfix) with SMTP id 71FC33A5C1F for ; Wed, 12 Jan 2005 05:35:36 +0000 (GMT) Received: (qmail 7998 invoked by uid 500); 12 Jan 2005 05:49:23 -0000 Date: Tue, 11 Jan 2005 23:49:23 -0600 From: Bruno Wolff III To: Tad Marko Cc: Bradley Kieser , pgsql-admin@postgresql.org Subject: Re: Limiting user privileges Message-ID: <20050112054923.GA7867@wolff.to> Mail-Followup-To: Tad Marko , Bradley Kieser , pgsql-admin@postgresql.org References: <1105377550.11245.0.camel@boojiboy.metrosplash.com> <20050110183111.GA2279@winnie.fuhr.org> <1105475175.8275.7.camel@boojiboy.metrosplash.com> <20050111211839.GC19876@wolff.to> <41E443C2.3090800@kieser.net> <1105480172.8275.27.camel@boojiboy.metrosplash.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1105480172.8275.27.camel@boojiboy.metrosplash.com> User-Agent: Mutt/1.5.6i X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.005 tagged_above=0 required=5 tests=AWL X-Spam-Level: X-Archive-Number: 200501/82 X-Sequence-Number: 15941 On Tue, Jan 11, 2005 at 15:49:32 -0600, Tad Marko wrote: > > In MySQL (the only DB I'm very familiar with), I can create a database, > import tables, create a user, and then > > GRANT ALL ON dbname.* TO whateveruser > > and then whateveruser is essentially the super user on that database. I > think that I understand that in PostgreSQL, I need to make whateveruser > the owner of the database, then I won't have to go through the GRANT > step for him. Making someone the owner of a database isn't going to give that person access to all other objects in the database. When other users create objects the database owner won't in general have access to them. > But, what do I need to do if I need to say easily create users that have > INSERT and SELECT privileges on all (of a large number of) tables in a > given database? You need to write a script or function that gives them appropiate access to all existing objects. Another possible solution is to have a policy of giving a specific group access to all objects that are created in the database. Then you can give new users access to these objects by just adding them to the group.