createuser problem in 7.3.4 on Linux
createuser problem in 7.3.4 on Linux
От:
Paul Power <paulp127@dublin.ie>
Дата:
I have been following the basic install process for Linux.
As user postgres I have run initdb. I create a user named Administrator via the createuser script. All goes well and I get the response CREATE USER.
Then I try:
psql -U Administrator template1
and get the response:
psql: FATAL: IDENT authentication failed for user "Administrator".
The user Administrator is however in table pg_shadow.
But if I try DROP USER Administrator I get
ERROR: DROP USER: user "administrator" does not exist
Note the last error has "administrator" rather than "Administrator".
Does anybody have any idea what is happening? If not, does anybody know if it is possible to undo the initdb, so that I can create a new Linux user Administrator and use it to create the database via initdb?
Any help will be much appreciated,
Paul Power
Planitas
Swords
Ireland
---- Msg sent via Dublin WebMail - http://www.dublin.ie/
Msg sent via Dublin WebMail - http://www.dublin.ie/
------------------------------------------------------------------------------------------
This email was checked by TrustMail. For more information on TrustMail, contact details can be found at www.energis.com .This email and any attachments may be confidential and the subject of legal professional privilege. Any disclosure, use, storage or copying of this email without the consent of the sender is strictly prohibited. The views expressed within are those of the individual and not necessarily those of the company.
Please notify the Sender immediately if you are not the intended recipient and then delete the email from your inbox and do not disclose the contents to another person, use, copy or store the information in any medium.
------------------------------------------------------------------------------------------
Re: createuser problem in 7.3.4 on Linux
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Am Mittwoch, 17. Dezember 2003 09:39 schrieb Paul Power: > But if I try DROP USER Administrator I get
>
> ERROR: DROP USER: user "administrator" does not exist
>
> Note the last error has "administrator" rather than "Administrator".
You need to double quote the name to preserve case.
Re: createuser problem in 7.3.4 on Linux
> As user postgres I have run initdb. I create a user named > Administrator via the createuser script. All goes well and I get the > response CREATE USER. > Then I try: > > psql -U Administrator template1 > > and get the response: > psql: FATAL: IDENT authentication failed for user "Administrator". > Default installation uses ident authentication method. It requires os user with the same name & mapping in pg_ident.conf. If i am correct, you are looking for either trust/password authentication method. If so, edit pg_hba.conf and comment the ident entry and uncomment trust entry. > ERROR: DROP USER: user "administrator" does not exist It looks strange. Ensure, you are not deleting the user twice -:). Since, IMO, both createuser and dropuser scripts handle the case properly. regards, bhuvaneswaran
Re: createuser problem in 7.3.4 on Linux
> You need to double quote the name to preserve case. IMO, in 7.3.4, these two scripts (createuser & dropuser) preserve the case by default even without double quote. For example, 'createuser Admin' makes an entry Admin(not admin) in pg_shadow. Similarly, dropuser deletes the same entry even without double quote. Else, am i missing some thing? regards, bhuvaneswaran
Re: createuser problem in 7.3.4 on Linux
От:
Peter Eisentraut <peter_e@gmx.net>
Дата:
Am Mittwoch, 17. Dezember 2003 12:18 schrieb A.Bhuvaneswaran: > > You need to double quote the name to preserve case. > > IMO, in 7.3.4, these two scripts (createuser & dropuser) preserve the > case by default even without double quote. For example, 'createuser > Admin' makes an entry Admin(not admin) in pg_shadow. Similarly, dropuser > deletes the same entry even without double quote. Sure, but we were not talking about createuser or dropuser.