pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Oliver Elphick <olly@lfix.co.uk>
To: Tai Huynh Phuoc <fucai1116@yahoo.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: can not connect to pg on linux FC4
Date: Tue, 08 Nov 2005 21:26:04 +0000
Message-ID: <1131485164.11333.101.camel@linda.lfix.co.uk> (raw)
In-Reply-To: <20051105051255.21499.qmail@web53309.mail.yahoo.com>
References: <20051105051255.21499.qmail@web53309.mail.yahoo.com>

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




view thread (2+ messages)

Message-ID: <1131485164.11333.101.camel@linda.lfix.co.uk>
Permalink:  ../1131485164.11333.101.camel@linda.lfix.co.uk/
Also on:    postgresql.org/message-id/1131485164.11333.101.camel@linda.lfix.co.uk

 · 

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 using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: olly@lfix.co.uk, fucai1116@yahoo.com
  Subject: Re: can not connect to pg on linux FC4
  In-Reply-To: <1131485164.11333.101.camel@linda.lfix.co.uk>

* 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