From: Alex Gutman <agutman@emc.com>
To: pgsql-admin@postgresql.org
Subject: Preventing changes to default settings of a collective account?
Date: Thu, 24 Feb 2005 08:33:08 -0500 (EST)
Message-ID: <20050224133308.9C99FC248@usenagutmanx2l.lss.emc.com> (raw)
Greetings,
I've established a read-only collective account (sort of guest) with
no privileges. Nevertheless, the collective user in question can still
issue commands
ALTER USER guest SET parameter TO value
and so change the default setting of any user-alterable run-time
configuration variable.
Naturally, I'd like to prevent it - but there seems to be no privilege
that I could revoke from that collective user in order to disable his
changing default values of run-time configuration variables.
(The NOCREATEUSER option used when creating the collective user does
prevent it from changing its own password via
ALTER USER guest WITH ... PASSWORD ...
- which is good but not enough.)
I've tried to prevent changes to the field pg_shadow.useconfig of the
row pertaining to the collective user through
CREATE OR REPLACE RULE pg_shadow_update_rule AS ON UPDATE TO pg_shadow
WHERE NEW.usename = 'guest'
DO INSTEAD NOTHING
This trick didn't work. (I had little hope for its success from the
beginning, as the table pg_shadow doesn't belong to any database, so
I didn't expect the rule mechanism to work for it. I was connected to
database template1 as user postgres when issuing the above CREATE OR
REPLACE RULE command, if it's of any relevance.)
Is there any way I could achieve my goal?
With thanks in advance,
Alex Gutman, grateful PostgreSQL user since 1998
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-admin@postgresql.org
Cc: agutman@emc.com
Subject: Re: Preventing changes to default settings of a collective account?
In-Reply-To: <20050224133308.9C99FC248@usenagutmanx2l.lss.emc.com>
References: <20050224133308.9C99FC248@usenagutmanx2l.lss.emc.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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