Thread: can not connect to pg on linux FC4

can not connect to pg on linux FC4

From
Tai Huynh Phuoc
Date:
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.

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?.

Thanks.

Fucai




    
__________________________________ 
Yahoo! FareChase: Search multiple travel sites in one click.
http://farechase.yahoo.com


Re: can not connect to pg on linux FC4

From
Oliver Elphick
Date:
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