Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files. - Mailing list pgsql-general

From Tim Uckun
Subject Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.
Date
Msg-id 855e4dcf0911082248p502787e5ie38f312905c77c84@mail.gmail.com
Whole thread Raw
In response to Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.  (Scott Marlowe <scott.marlowe@gmail.com>)
Responses Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.  (John R Pierce <pierce@hogranch.com>)
Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.  (Adrian Klaver <aklaver@comcast.net>)
List pgsql-general
> then say you're postgres in the script with the -U (if you're using psql)
>
> AS ROOT:
> psql -U postgres -h remote_db dbname
>
> Note that ident doesn't work so well between machines, so you might
> want to look at .pgpass
>

That's what I am trying to get working. In actuality I am using ruby
and using a db library but the concept is the same. I need to log in
as postgres when the script is running as root.  I could trust all
local connections or something but I don't want to do that either.

 When I do a psql -U postgres I get this

psql -U postgres
psql: FATAL:  Ident authentication failed for user "postgres"


Obviously  I need to tell postgres to trust the user root when
connected locally as postgres.

How do I do that?

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.
Next
From: John R Pierce
Date:
Subject: Re: I can't seem to put the right combination of magic into the pg_hba and pg_ident files.