pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
7.3 : how add user when last user have lost 'createuser' option
3+ messages / 3 participants
[nested] [flat]

* 7.3 : how add user when last user have lost 'createuser' option
@ 2003-11-02 18:21 alban <alban_dot_minassian_@wanadoo.fr>
  2003-11-08 21:03 ` Re: 7.3 : how add user when last user have lost 'createuser' option Bruce Momjian <pgman@candle.pha.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: alban @ 2003-11-02 18:21 UTC (permalink / raw)
  To: pgsql-sql

i have execute
ALTER USER postgres WITH NOCREATEUSER;
it's work very well but now, i cant add, drop, alter user, alter group...

ALTER USER postgres WITH CREATEUSER;
--> ERROR : ALTER USER : permission denied

there is a solution ?

Thank
ALban




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

* Re: 7.3 : how add user when last user have lost 'createuser' option
  2003-11-02 18:21 7.3 : how add user when last user have lost 'createuser' option alban <alban_dot_minassian_@wanadoo.fr>
@ 2003-11-08 21:03 ` Bruce Momjian <pgman@candle.pha.pa.us>
  2003-11-08 21:15   ` Re: 7.3 : how add user when last user have lost 'createuser' option Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: Bruce Momjian @ 2003-11-08 21:03 UTC (permalink / raw)
  To: alban <alban_dot_minassian_@wanadoo.fr>; +Cc: pgsql-sql

alban wrote:
> i have execute
> ALTER USER postgres WITH NOCREATEUSER;
> it's work very well but now, i cant add, drop, alter user, alter group...
> 
> ALTER USER postgres WITH CREATEUSER;
> --> ERROR : ALTER USER : permission denied
> 
> there is a solution ?

Uh, you removed createuser permission from the postgres super-user.  I
think that's why you are getting the failure.  I think you have to
manually update pg_shadow to fix this, if it will allow that.

-- 
  Bruce Momjian                        |  http://candle.pha.pa.us
  pgman@candle.pha.pa.us               |  (610) 359-1001
  +  If your life is a hard drive,     |  13 Roberts Road
  +  Christ can be your backup.        |  Newtown Square, Pennsylvania 19073



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

* Re: 7.3 : how add user when last user have lost 'createuser' option
  2003-11-02 18:21 7.3 : how add user when last user have lost 'createuser' option alban <alban_dot_minassian_@wanadoo.fr>
  2003-11-08 21:03 ` Re: 7.3 : how add user when last user have lost 'createuser' option Bruce Momjian <pgman@candle.pha.pa.us>
@ 2003-11-08 21:15   ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 3+ messages in thread

From: Tom Lane @ 2003-11-08 21:15 UTC (permalink / raw)
  To: Bruce Momjian <pgman@candle.pha.pa.us>; +Cc: alban <alban_dot_minassian_@wanadoo.fr>; pgsql-sql

Bruce Momjian <pgman@candle.pha.pa.us> writes:
> alban wrote:
>> i have execute
>> ALTER USER postgres WITH NOCREATEUSER;

> Uh, you removed createuser permission from the postgres super-user.

That was a really bad move :-(

If you have no superusers left, I think your only option is to shut down
the postmaster, start a standalone backend, and ALTER USER postgres back
to superuser status in the standalone backend.  Then you can restart the
postmaster.

IIRC this will work in 7.3 and probably 7.2.  If you're running
something older, you are well and truly hosed, because you can't
reclaim superuser status even with a standalone backend.

			regards, tom lane



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


end of thread, other threads:[~2003-11-08 21:15 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2003-11-02 18:21 7.3 : how add user when last user have lost 'createuser' option alban <alban_dot_minassian_@wanadoo.fr>
2003-11-08 21:03 ` Bruce Momjian <pgman@candle.pha.pa.us>
2003-11-08 21:15   ` 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