X-Original-To: pgsql-jdbc-postgresql.org@localhost.postgresql.org Received: from localhost (unknown [200.46.204.144]) by svr1.postgresql.org (Postfix) with ESMTP id AA338558AF for ; Mon, 7 Mar 2005 06:28:55 +0000 (GMT) Received: from svr1.postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 24561-10 for ; Mon, 7 Mar 2005 06:28:46 +0000 (GMT) Received: from web30307.mail.mud.yahoo.com (web30307.mail.mud.yahoo.com [68.142.200.100]) by svr1.postgresql.org (Postfix) with SMTP id 5F00552A62 for ; Mon, 7 Mar 2005 06:28:45 +0000 (GMT) Received: (qmail 11058 invoked by uid 60001); 7 Mar 2005 06:28:38 -0000 Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; b=tK/gvUc1jHwTJDCiXp6WLryLLrn2C795lRo7iyEzBfN80qC5/xSTbS8slRC7u/i1y6qDDWscPF4ZNcsWlgSeG53prmK1lN8intrF8Uu41E3l5aq7ez9WVoseLbMB3UQJdxQqdgiVitQJKWDUR9OMV+/nxLhiKrKl6SKQ6NMGSjw= ; Message-ID: <20050307062838.11055.qmail@web30307.mail.mud.yahoo.com> Received: from [69.209.226.2] by web30307.mail.mud.yahoo.com via HTTP; Sun, 06 Mar 2005 22:28:38 PST Date: Sun, 6 Mar 2005 22:28:38 -0800 (PST) From: Todd Gee Subject: ident auth postgres 7.4 fedora core 3 To: pgsql-jdbc@postgresql.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=2.548 tagged_above=0 required=5 tests=DNS_FROM_RFC_ABUSE, FORGED_YAHOO_RCVD X-Spam-Level: ** X-Archive-Number: 200503/36 X-Sequence-Number: 12429 Hey Folks -> So I just upgraded my RH 9 box to Fedora Core 3 and ident auth stopped working. I've been thru the ident authorization process before and have become pretty conversant w/ it, but this issue is really strange. It seems that ident auth is only failing w/ JDBC connections. postgres version: postgresql-7.4.7-3.FC3.1 (includes JDBC driver jar pg74.215.jdbc3.jar) I have the relevant line in my pg_hba.conf file: host all all 127.0.0.1 0.0.0.0 ident sameuser I have a user 'tod' created in postgres and I can connect using the following command issued as (unix) user tod: [tod@pedro ~]$ psql -h localhost -U tod cbfsrtsDev which connects using tcp sockets and should thus exercise the above line in the pg_hba.conf file. (I have verified this by changing host auth to 'password' and verifying that psql asks me for a password before letting me in.) Yes, I realize the "-U tod" is redundant. The command works the same with or without it. Anyway, I am using this java program for a test (which I found in a previous thread on this list): ----------- Begin include import java.sql.*; import java.io.*; public class JdbcTest { public static void main(String[] args) throws Exception { System.out.println(System.getProperty("user.name")); Class.forName("org.postgresql.Driver"); String url = "jdbc:postgresql:cbfsrtsDev"; Connection db = DriverManager.getConnection(url, args[0], args[0]); db.close(); } } ----------- End include As you can see, I'm trying to connect to the same table 'cbfsrtsDev' with the username and password set to the same thing. When I run this, I receive: [tod@pedro ~]$ java JdbcTest tod ----------- Begin include tod Exception in thread "main" org.postgresql.util.PSQLException: A connection error has occurred: org.postgresql.util.PSQLE xception: FATAL: IDENT authentication failed for user "tod" at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnectionV3(AbstractJdbc1Connection.java:337) at org.postgresql.jdbc1.AbstractJdbc1Connection.openConnection(AbstractJdbc1Connection.java:214) at org.postgresql.Driver.connect(Driver.java:139) at java.sql.DriverManager.getConnection(DriverManager.java:512) at java.sql.DriverManager.getConnection(DriverManager.java:171) at JdbcTest.main(JdbcTest.java:12) ----------- End include So, my question is this: how can I use ident auth to authenticate for the psql terminal session but have my java program fail? I even checked to ensure that the java process wasn't set-UIDed (it's not). I tried the other JDBC drivers, but the results are all the same. If anyone has any suggestions, I'd love to hear 'em. thanks, tod