pg.ddx.io  pgsql-admin@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
To: ankit.mehrotra@tcs.com <ankit.mehrotra@tcs.com>
Cc: pgsql-admin@postgresql.org
Subject: Re: problem in logging into database
Date: Fri, 8 Dec 2006 15:44:04 +0530
Message-ID: <a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com> (raw)
In-Reply-To: <OF2AE393A4.0E032B03-ON6525723E.00351408-6525723E.0035D7CA@tcs.com>
References: <a97c77030612070638w2ad2cb4ke9e2acf45329a3ee@mail.gmail.com>
	<OF2AE393A4.0E032B03-ON6525723E.00351408-6525723E.0035D7CA@tcs.com>

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.



view thread (7+ messages)  latest in thread

Message-ID: <a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com>
Permalink:  ../a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com/
Also on:    postgresql.org/message-id/a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-admin@postgresql.org
  Cc: mallah.rajesh@gmail.com, ankit.mehrotra@tcs.com
  Subject: Re: problem in logging into database
  In-Reply-To: <a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com>
  References: <a97c77030612070638w2ad2cb4ke9e2acf45329a3ee@mail.gmail.com> <OF2AE393A4.0E032B03-ON6525723E.00351408-6525723E.0035D7CA@tcs.com> <a97c77030612080214m3876a066k22395d71cbd13ef5@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox