X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id 3B0A6D6815 for ; Tue, 8 Nov 2005 17:25:41 -0400 (AST) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 26490-09 for ; Tue, 8 Nov 2005 21:25:38 +0000 (GMT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from svr2.postgresql.org (svr2.postgresql.org [65.19.161.25]) by svr1.postgresql.org (Postfix) with ESMTP id ADF00D6805 for ; Tue, 8 Nov 2005 17:25:39 -0400 (AST) Received: from anchor-post-34.mail.demon.net (anchor-post-34.mail.demon.net [194.217.242.92]) by svr2.postgresql.org (Postfix) with ESMTP id 91441F0B27 for ; Tue, 8 Nov 2005 21:25:40 +0000 (GMT) Received: from lfix.demon.co.uk ([80.177.205.209] helo=cerberus.lfix.co.uk) by anchor-post-34.mail.demon.net with esmtp (Exim 4.42) id 1EZayH-000Mgz-FO; Tue, 08 Nov 2005 21:25:37 +0000 Received: from linda.lfix.co.uk ([192.168.1.1]) by cerberus.lfix.co.uk with esmtp (Exim 4.50) id 1EZayA-0000PU-Oh; Tue, 08 Nov 2005 21:25:30 +0000 Subject: Re: can not connect to pg on linux FC4 From: Oliver Elphick Reply-To: olly@lfix.co.uk To: Tai Huynh Phuoc Cc: pgsql-sql@postgresql.org In-Reply-To: <20051105051255.21499.qmail@web53309.mail.yahoo.com> References: <20051105051255.21499.qmail@web53309.mail.yahoo.com> Content-Type: text/plain Date: Tue, 08 Nov 2005 21:26:04 +0000 Message-Id: <1131485164.11333.101.camel@linda.lfix.co.uk> Mime-Version: 1.0 X-Mailer: Evolution 2.2.3 Content-Transfer-Encoding: 7bit X-LFIX-MailScanner: Found to be clean X-LFIX-MailScanner-SpamCheck: not spam, SpamAssassin (score=-5.899, required 5, autolearn=not spam, ALL_TRUSTED -3.30, BAYES_00 -2.60) X-LFIX-MailScanner-From: olly@lfix.co.uk X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.029 required=5 tests=[AWL=0.029] X-Spam-Score: 0.029 X-Spam-Level: X-Archive-Number: 200511/70 X-Sequence-Number: 23321 On Fri, 2005-11-04 at 21:12 -0800, Tai Huynh Phuoc wrote: > Hi, > I use pg 8.03 (come with FC4). I can not connect to pg > because of Ident authentication failed for user "root" > error. pg_hba.conf > host all all 127.0.0.1/32 ident sameuser > > Then I try another way by add adding a row to pg_indet > so that I can use root account to connection to db. > mymap root root > and chage "sameuser" to "mymap" in the pg_hba.conf. > But I can not connect too as the above error. > > Thank in advande someone help me. If you are going to use ident authentication on a TCP/IP connection (even localhost) you need an ident server running on the client machine. That is what supplies the authentication. You need to trust the administrator of the client machine, otherwise this can be very insecure. Since you are connecting to the local machine, you could just as easily use a Unix socket connection (do not supply any hostname) in which case ident authentication will use the ownership credentials associated with the socket. In pg_hba.conf, this is a "local" connection and is secure on Linux. > Onother question. Is there a way that I can create a > user using password authetication at the situation I > have no pg account like this sitation?. Assign a password for the user with ALTER USER. Then add a suitable line to pg_hba.conf. Oliver Elphick