Skip site navigation (1) Skip section navigation (2)

Peripheral Links

Header And Logo

PostgreSQL
| The world's most advanced open source database.

Site Navigation

Search archives
  Advanced Search

Problem w/ IDENT authentication


  • From: Ian Pilcher <i(dot)pilcher(at)comcast(dot)net>
  • To: pgsql-jdbc(at)postgresql(dot)org
  • Subject: Problem w/ IDENT authentication
  • Date: Mon, 26 Jul 2004 03:53:38 -0500
  • Message-id: <ce2gqj$8df$1@sea.gmane.org> <text/plain>

I am trying to set up IDENT authentication for Tomcat 5 on my Fedora
Core 2 system.  I've added the appropriate line to pg_hba.conf:

host    tomcat4 tomcat4 127.0.0.1       255.255.255.255 ident   sameuser

This works as expected from a console:

    [root(at)home webapps]# su tomcat4
    sh-2.05b$ psql -h localhost tomcat4
    Welcome to psql 7.4.2, the PostgreSQL interactive terminal.

    Type:  \copyright for distribution terms
           \h for help with SQL commands
           \? for help on internal slash commands
           \g or terminate with semicolon to execute query
           \q to quit

    tomcat4=>

In my servlet I try to get a connection:

    db = DriverManager.getConnection("jdbc:postgresql:tomcat4",
            "tomcat4", "");

And I get the following:

    org.postgresql.util.PSQLException: A connection error has occurred:
    org.postgresql.util.PSQLException: FATAL: IDENT authentication
    failed for user "tomcat4"

I've verified that the servlet does run as tomcat4 by writing a
temporary file.

TIA for any ideas!

--
========================================================================
Ian Pilcher                                        i(dot)pilcher(at)comcast(dot)net
========================================================================




Home | Main Index | Thread Index

Privacy Policy | About PostgreSQL
Copyright © 1996 – 2012 PostgreSQL Global Development Group