Re: problem in logging into database - Mailing list pgsql-admin

From Rajesh Kumar Mallah
Subject Re: problem in logging into database
Date
Msg-id a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com
Whole thread Raw
In response to Re: problem in logging into database  (ankit.mehrotra@tcs.com)
Responses Re: problem in logging into database
List pgsql-admin
On 12/8/06, ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com> wrote:
>
> my postmaster is on the same machine .. i am pasting the command and its
> output here for u :-
>
> %  psql -d template1 -U postgres
> psql: FATAL:  Ident authentication failed for user "postgres"

You will need to modify pg_hba.conf file in the directory which you
initdb'ed and restart the database.

this file is well documented and reading it is a good investment.
There are several options to allow connecting . mentioned
below are roughly in order or security. you need to add/modity
/uncomment the lines near the end of this file.


local   all         all                               trust   # very trivial

will allow any user to connect from same machine to any database without
any password.

local   all         all                               md5

(same a above but will ask password)

host    all         all         192.168.0.100/32      md5

(same a above but allows connection from said address range)

you can choose any config based on your requirement but make
sure it secure enough eventually.


Regds
mallah.

pgsql-admin by date:

Previous
From: imad
Date:
Subject: Re: problem in logging into database
Next
From: "Rajesh Kumar Mallah"
Date:
Subject: tsearch2 problem rank_cd() (possibly) crashing postgres