Thread: Ident authentication

Ident authentication

From
Jarkko Elfving
Date:
Hi.

I'm trying to connect to my test DB in localhost with pgAdmin3 but I got
an error message

Error connecting to the server: FATAL:  Ident authentication failed for
user "jarkko"

What should I do?

I'm reading documents about this and there was something about
pg_hba.conf and pg_ident.conf. I did a modifications both of those
files, restart the server and still I got the same error message.
--
Jarkko Elfving <jarelf@ebaana.net>


Re: Ident authentication

From
Michael Fuhr
Date:
On Mon, Jan 24, 2005 at 05:55:29PM +0200, Jarkko Elfving wrote:

> I'm trying to connect to my test DB in localhost with pgAdmin3 but I got
> an error message
>
> Error connecting to the server: FATAL:  Ident authentication failed for
> user "jarkko"

Are you using a TCP connection or a Unix-domain socket connection?
If the former, do you have an IDENT server running?  If the latter,
what platform are you using?  Not all operating systems can pass
credentials over Unix-domain sockets.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: Ident authentication

From
Tom Lane
Date:
Jarkko Elfving <jarelf@ebaana.net> writes:
> I'm trying to connect to my test DB in localhost with pgAdmin3 but I got
> an error message
> Error connecting to the server: FATAL:  Ident authentication failed for
> user "jarkko"
> What should I do?

Either run an identd daemon, or use a different auth method for TCP
connections.

            regards, tom lane

Re: Ident authentication

From
Jarkko Elfving
Date:
On Mon, 2005-01-24 at 09:21 -0700, Michael Fuhr wrote:
> Are you using a TCP connection or a Unix-domain socket connection?
> If the former, do you have an IDENT server running?  If the latter,
> what platform are you using?  Not all operating systems can pass
> credentials over Unix-domain sockets.
>

I use FC3 with PostgreSQL 8.0. Like Tom Lane answers to change the
method to something else I did try to set it to trust, but that's
doesn't helps me. Now I did removed all my entrys from pg_ident.conf
file. Here is my pg_hba.conf:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
local   all         all                               ident sameuser
local   all         jarelf                            trust
# IPv4 local connections:
host    all         all         127.0.0.1/32          ident sameuser
# IPv6 local connections:
host    all         all         ::1/128               ident sameuser
--
Jarkko Elfving <jarelf@ebaana.net>


Re: Ident authentication SOLVED

From
Jarkko Elfving
Date:
Hi...

I did get it work, thanks for help.

--
Jarkko Elfving <jarelf@ebaana.net>


Re: Ident authentication SOLVED

From
Michael Fuhr
Date:
On Mon, Jan 24, 2005 at 06:35:36PM +0200, Jarkko Elfving wrote:

> I did get it work, thanks for help.

What was the solution?  It might be informative to people searching
the list archives because they're having the same problem.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: Ident authentication SOLVED

From
Jarkko Elfving
Date:
On Mon, 2005-01-24 at 09:39 -0700, Michael Fuhr wrote:
> On Mon, Jan 24, 2005 at 06:35:36PM +0200, Jarkko Elfving wrote:
>
> > I did get it work, thanks for help.
>
> What was the solution?  It might be informative to people searching
> the list archives because they're having the same problem.
>

I just modify the pg_hba.conf file and set the method to trust and set
those lines into comments what I do not need or use. Like this:

# TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD

# "local" is for Unix domain socket connections only
#local   all         all                               ident sameuser
local    all         all                               trust
# IPv4 local connections:
#host    all         all         127.0.0.1/32          ident sameuser
host     all         all         127.0.0.1/32          trust
# IPv6 local connections:
#host    all         all         ::1/128               ident sameuser

I do not now where this thought came, but that what Tom Lane says was
quite informatic. Thanks Tom Lane.
--
Jarkko Elfving <jarelf@ebaana.net>


Re: Ident authentication SOLVED

From
Michael Fuhr
Date:
On Mon, Jan 24, 2005 at 06:46:25PM +0200, Jarkko Elfving wrote:
> On Mon, 2005-01-24 at 09:39 -0700, Michael Fuhr wrote:
> >
> > What was the solution?  It might be informative to people searching
> > the list archives because they're having the same problem.
>
> I just modify the pg_hba.conf file and set the method to trust and set
> those lines into comments what I do not need or use.

That doesn't solve the ident problem -- it just works around it.
That's fine if "trust" is acceptable in your environment, but others
might need something more secure.

--
Michael Fuhr
http://www.fuhr.org/~mfuhr/

Re: Ident authentication

From
Paul Thomas
Date:
On 24/01/2005 16:28 Jarkko Elfving wrote:
> On Mon, 2005-01-24 at 09:21 -0700, Michael Fuhr wrote:
> > Are you using a TCP connection or a Unix-domain socket connection?
> > If the former, do you have an IDENT server running?  If the latter,
> > what platform are you using?  Not all operating systems can pass
> > credentials over Unix-domain sockets.
> >
>
> I use FC3 with PostgreSQL 8.0. Like Tom Lane answers to change the
> method to something else I did try to set it to trust, but that's
> doesn't helps me. Now I did removed all my entrys from pg_ident.conf
> file. Here is my pg_hba.conf:
>
> # TYPE  DATABASE    USER        CIDR-ADDRESS          METHOD
>
> # "local" is for Unix domain socket connections only
> local   all         all                               ident sameuser
> local   all         jarelf                            trust
> # IPv4 local connections:
> host    all         all         127.0.0.1/32          ident sameuser
> # IPv6 local connections:
> host    all         all         ::1/128               ident sameuser

Swap the first 2 entries round!

--
Paul Thomas
+------------------------------+-------------------------------------------+
| Thomas Micro Systems Limited | Software Solutions for Business           |
| Computer Consultants         | http://www.thomas-micro-systems-ltd.co.uk |
+------------------------------+-------------------------------------------+