Received: from localhost (maia-5.hub.org [200.46.204.182]) by postgresql.org (Postfix) with ESMTP id 905E89FA2CB for ; Fri, 8 Dec 2006 06:14:10 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.182]) (amavisd-new, port 10024) with ESMTP id 29429-01 for ; Fri, 8 Dec 2006 06:13:51 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.4 Received: from py-out-1112.google.com (py-out-1112.google.com [64.233.166.176]) by postgresql.org (Postfix) with ESMTP id EECAD9F9F46 for ; Fri, 8 Dec 2006 06:14:05 -0400 (AST) Received: by py-out-1112.google.com with SMTP id d32so411929pye for ; Fri, 08 Dec 2006 02:14:05 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=SuP0n1yfb8tpfoiGza4xAWs6fAOJGKIgw9rb768DbEunkvTrlL5LV2iqhtx23D5BIxJEnaM5LpYzvGugxbAKCCELkZJtLWm/YrvvBOyCGNIWfCKE889le13KkKjkOnBKPofx5rgLcn8LAJtrF/CRrwejdmS/iGWOa/JyLPGOyH4= Received: by 10.35.41.14 with SMTP id t14mr5448126pyj.1165572844935; Fri, 08 Dec 2006 02:14:04 -0800 (PST) Received: by 10.35.80.8 with HTTP; Fri, 8 Dec 2006 02:14:04 -0800 (PST) Message-ID: Date: Fri, 8 Dec 2006 15:44:04 +0530 From: "Rajesh Kumar Mallah" To: "ankit.mehrotra@tcs.com" Subject: Re: problem in logging into database Cc: pgsql-admin@postgresql.org In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-Virus-Scanned: Maia Mailguard 1.0.1 X-Archive-Number: 200612/64 X-Sequence-Number: 23856 On 12/8/06, 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.