how can I get back superuser back?

Started by Jovabout 15 years ago3 messagesgeneral
Jump to latest
#1Jov
zhao6014@gmail.com

hi pgers

I use pg9.0.3 and do some mistake which cause my superuser
non-super,is there any way I can get back the superuser privilege? the
superuser is the only super in my pg server ,without it ,I will not
able to create new user or new database.

thank you!

#2Bruce Momjian
bruce@momjian.us
In reply to: Jov (#1)
Re: how can I get back superuser back?

Jov wrote:

hi pgers

I use pg9.0.3 and do some mistake which cause my superuser
non-super,is there any way I can get back the superuser privilege? the
superuser is the only super in my pg server ,without it ,I will not
able to create new user or new database.

You can modify pg_hba.conf to 'trust' if you lost the password. If you
removed the row, I think you need to start the server in single-user
mode.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +

#3Jov
zhao6014@gmail.com
In reply to: Bruce Momjian (#2)
Re: how can I get back superuser back?

single-user mode solve my problem.thank you ,Bruce!
在 2011-3-11 下午6:35,"Bruce Momjian" <bruce@momjian.us>写道:

Show quoted text

Jov wrote:

hi pgers

I use pg9.0.3 and do some mistake which cause my superuser
non-super,is there any way I can get back the superuser privilege? the
superuser is the only super in my pg server ,without it ,I will not
able to create new user or new database.

You can modify pg_hba.conf to 'trust' if you lost the password. If you
removed the row, I think you need to start the server in single-user
mode.

--
Bruce Momjian <bruce@momjian.us> http://momjian.us
EnterpriseDB http://enterprisedb.com

+ It's impossible for everything to be true. +