Preventing changes to default settings of a collective account?

From: Alex Gutman <agutman(at)emc(dot)com>
To: pgsql-admin(at)postgresql(dot)org
Subject: Preventing changes to default settings of a collective account?
Date: 2005-02-24 13:33:08
Message-ID: 20050224133308.9C99FC248@usenagutmanx2l.lss.emc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

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

Responses

Browse pgsql-admin by date

  From Date Subject
Next Message Marcin Giedz 2005-02-24 13:54:46 Configuration for my server
Previous Message Bjoern Metzdorf 2005-02-24 07:41:53 Re: invalid multibyte character for locale