Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id E4A8B9FA131 for ; Wed, 10 Jan 2007 09:59:53 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-new, port 10024) with ESMTP id 92029-09 for ; Wed, 10 Jan 2007 09:59:14 -0400 (AST) X-Greylist: delayed 00:22:19.391663 by SQLgrey-1.7.4 Received: from svr4.postgresql.org (svr4.postgresql.org [66.98.251.159]) by postgresql.org (Postfix) with ESMTP id 1A9A99FA31E for ; Wed, 10 Jan 2007 09:59:11 -0400 (AST) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.3 Received: from mail.arcplasma.com (ares.arcplasma.com [69.149.97.13]) by svr4.postgresql.org (Postfix) with ESMTP id 236225AF9A3 for ; Wed, 10 Jan 2007 13:36:51 +0000 (GMT) Received: from [67.52.230.124] (rrcs-67-52-230-124.west.biz.rr.com [67.52.230.124]) by mail.arcplasma.com (Postfix) with ESMTP id 8D24217C17E for ; Wed, 10 Jan 2007 07:36:49 -0600 (CST) Message-ID: <45A4EBF1.1090303@dchweb.com> Date: Wed, 10 Jan 2007 07:36:49 -0600 From: "Dustin C. Hatch" User-Agent: Thunderbird 1.5.0.9 (X11/20061220) MIME-Version: 1.0 To: pgsql-admin@postgresql.org Subject: IDENT authentication with md5 fallback Content-Type: multipart/alternative; boundary="------------050008030804060007000802" X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=3.143 tagged_above=0 required=5 tests=AWL, BAYES_60, HTML_MESSAGE, SPF_FAIL X-Spam-Level: *** X-Archive-Number: 200701/83 X-Sequence-Number: 24239 This is a multi-part message in MIME format. --------------050008030804060007000802 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hello, I was wondering if there is a way I can set up my pg_hba.conf to allow "ident sameuser" authentication, but fall back to "md5" if it fails. I would like users to be able to login to their databases (which correspond to their usernames and ident responses), however when they need to use PHP to login, they must enter a password because the ident response will be different (always "apache" I would assume). I have tried the following pg_hba.conf configurations, but I cannot seem to get this right. This results in only allowing users to login after entering the correct password: local sameuser all md5 local sameuser all ident sameuser This results in ident checking and returning FATAL without asking for a password if it fails: local sameuser all ident sameuser local sameuser all md5 So, how would I configure pg_hba.conf to work like this? Is it possible, or should I only allow md5 and not worry about ident? Please let me know. -- Dustin C. Hatch http://www.dchweb.com --------------050008030804060007000802 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Hello,

I was wondering if there is a way I can set up my pg_hba.conf to allow "ident sameuser" authentication, but fall back to "md5" if it fails.  I would like users to be able to login to their databases (which correspond to their usernames and ident responses), however when they need to use PHP to login, they must enter a password because the ident response will be different (
always "apache" I would assume).

I have tried the following pg_hba.conf configurations, but I cannot seem to get this right.

This results in only allowing users to login after entering the correct password:
local           sameuser        all                                     md5
local           sameuser        all                                     ident sameuser

This results in ident checking and returning FATAL without asking for a password if it fails:
local           sameuser        all                                     ident sameuser
local           sameuser        all                                     md5

So, how would I configure pg_hba.conf to work like this?  Is it possible, or should I only allow md5 and not worry about ident?  Please let me know.
-- 
Dustin C. Hatch
http://www.dchweb.com
--------------050008030804060007000802--