Re: Ident authentication failed for user - Mailing list pgsql-general

From Ruben Blanco
Subject Re: Ident authentication failed for user
Date
Msg-id CAP4Xq2Emu0bJrmM=8P6rzaXs+49RCpPTrk14jJL4QX2qmMTPVg@mail.gmail.com
Whole thread Raw
In response to Re: Ident authentication failed for user  (John R Pierce <pierce@hogranch.com>)
Responses Re: Ident authentication failed for user
List pgsql-general
Hi John. Thanks a lot for your reply:

El día 1 de marzo de 2012 17:25, John R Pierce <pierce@hogranch.com> escribió:
> On 03/01/12 9:02 AM, Ruben Blanco wrote:

> specify host=localhost, otherwise its using the first 'local' line, which
> specifies 'ident' authentication, as the error implies.

Where should I specify "host=localhost"? in the $connection_string for
pg_connect()? It doesn't work either.

I was understanding "host" TYPE was for TCP/IP connections only (my
scripts run through Apache web server). That's why I didn't expect the
"local" record to do anything with my connections. If I include this
record in the "pg_hba.conf" file I can connect to the database:

local   all         all                               trust


> you do realize, trust lets any process on the localhost authenticate as any
> user, including the postgres DBA account?

Yes, I just want to make it run, then will tighten security measures.

Thanks.

> --
> john r pierce                            N 37, W 122
> santa cruz ca                         mid-left coast
>
>
> --
> Sent via pgsql-general mailing list (pgsql-general@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-general

pgsql-general by date:

Previous
From: Chris McCormick
Date:
Subject: Re: Problem with initdb and two versions on one server?
Next
From: John R Pierce
Date:
Subject: Re: Ident authentication failed for user