Thread: createuser problem in 7.3.4 on Linux

createuser problem in 7.3.4 on Linux

From
Paul Power
Date:
I have been following the basic install process for Linux.<br /><br /> As user postgres I have run initdb. I create a
usernamed Administrator via the createuser script. All goes well and I get the response CREATE USER.<br /> Then I try:
<br/><br /> psql -U Administrator template1<br /><br /> and get the response:<br /> psql: FATAL: IDENT authentication
failedfor user "Administrator".<br /><br /><br /> The user Administrator is however in table pg_shadow.<br /><br /> But
ifI try DROP USER Administrator  I get<br /><br /> ERROR: DROP USER: user "administrator" does not exist<br /><br />
Notethe last error has "administrator" rather than "Administrator".<br /><br /> 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
Administratorand use it to create the database via initdb?<br /><br /><br /><br /> Any help will be much
appreciated,<br/> Paul Power <br /> Planitas <br /> Swords <br /> Ireland <br /> ---- Msg sent via Dublin WebMail -
http://www.dublin.ie/<br /><hr />Msg sent via Dublin WebMail - http://www.dublin.ie/ <code><font size="3"><br /><br />
------------------------------------------------------------------------------------------<br/> This email was checked
byTrustMail. For more information on TrustMail, contact details can be found at www.energis.com .This email and any
attachmentsmay be confidential and the subject of legal professional privilege. Any disclosure, use, storage or copying
ofthis email without the consent of the sender is strictly prohibited. The views expressed within are those of the
individualand not necessarily those of the company.<br /> Please notify the Sender immediately if you are not the
intendedrecipient and then delete the email from your inbox and do not disclose the contents to another person, use,
copyor store the information in any medium.<br />
------------------------------------------------------------------------------------------<br/></font></code> 

Re: createuser problem in 7.3.4 on Linux

From
Peter Eisentraut
Date:
Am Mittwoch, 17. Dezember 2003 09:39 schrieb Paul Power:
> But if I try DROP USER Administrator  I get<BR>
> <BR>
> ERROR: DROP USER: user "administrator" does not exist<BR>
> <BR>
> Note the last error has "administrator" rather than "Administrator".<BR>

You need to double quote the name to preserve case.


Re: createuser problem in 7.3.4 on Linux

From
"A.Bhuvaneswaran"
Date:
> 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


Attachment

Re: createuser problem in 7.3.4 on Linux

From
"A.Bhuvaneswaran"
Date:
> 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


Attachment

Re: createuser problem in 7.3.4 on Linux

From
Peter Eisentraut
Date:
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.