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@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.pilcher@comcast.net
========================================================================