Re: can not connect to pg on linux FC4

From: Oliver Elphick <olly(at)lfix(dot)co(dot)uk>
To: Tai Huynh Phuoc <fucai1116(at)yahoo(dot)com>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: can not connect to pg on linux FC4
Date: 2005-11-08 21:26:04
Message-ID: 1131485164.11333.101.camel@linda.lfix.co.uk
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

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

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message george young 2005-11-09 02:14:44 Re: Design question: Scalability and tens of thousands of
Previous Message Jaime Casanova 2005-11-08 19:01:09 Re: Extract date from week