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 6E77A32A7F1 for ; Tue, 19 Oct 2004 19:01:05 +0100 (BST) 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 86176-08 for ; Tue, 19 Oct 2004 18:00:55 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.199]) by svr1.postgresql.org (Postfix) with ESMTP id F315332A4FC for ; Tue, 19 Oct 2004 19:00:55 +0100 (BST) Received: by mproxy.gmail.com with SMTP id 77so342876rnk for ; Tue, 19 Oct 2004 11:00:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding; b=kQeThMks8J5qA+uNS28eMcX7hvWFvma8fNqZUDG4sU+bztRxvSNMNRhnhP9hLm2+/3USVZ2opMQZOBYSEYKWh8dF8QXUIul04XCwzKtAwf5JUGPkAHlu4bJdsiTW0yRYW2h98DFmnq9vr3gVplRdkWJaEmX4Jd6wdAArIqDZyc8 Received: by 10.38.96.30 with SMTP id t30mr2362340rnb; Tue, 19 Oct 2004 11:00:54 -0700 (PDT) Received: by 10.38.66.29 with HTTP; Tue, 19 Oct 2004 11:00:54 -0700 (PDT) Message-ID: Date: Tue, 19 Oct 2004 12:00:54 -0600 From: owenn panng Reply-To: owenn panng To: pgsql-jdbc@postgresql.org Subject: converting to MD5 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, hits=0.0 tagged_above=0.0 required=5.0 tests=HOT_NASTY X-Spam-Level: X-Archive-Number: 200410/206 X-Sequence-Number: 11311 Hi there, I was wondering what is needed to done on both the postgres & client side to connect via MD5. Right now, we are connecting fine by just specifying password in pg_hba.conf: host database user xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx password But I would like to change this to use: host database user xxx.xxx.xxx.xxx xxx.xxx.xxx.xxx md5 I have the user stored in pg_shadow (note: the passwd listed is not the real one): usename | usesysid | usecreatedb | usesuper | usecatupd | passwd | valuntil | useconfig user | 100 | t | f | f | md59033f409a99f207fa816b990467a9999 | | On the client side, we are using pg74.215.jdbc2.jar with code based on the example given on http://jdbc.postgresql.org/documentation/pgjdbc.html String url = "jdbc:postgresql://" + host + "/" + database; try { Class.forName("org.postgresql.Driver"); con = DriverManager.getConnection(url, userID, password); } I can generate the same password that matches the one stored in pg_shadow. So how do I specify that the password I am sending is in MD5? Any help would be appreciated. Thanks, O.