From owner-freebsd-questions@FreeBSD.ORG Wed May 25 18:22:12 2005 Return-Path: X-Original-To: questions@freebsd.org Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CE4FC16A41C for ; Wed, 25 May 2005 18:22:12 +0000 (GMT) (envelope-from ihsan@synthexp.net) Received: from anggerik.meltechsystems.net (anggerik.meltechsystems.net [202.71.100.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6F53B43D48 for ; Wed, 25 May 2005 18:22:12 +0000 (GMT) (envelope-from ihsan@synthexp.net) Received: by anggerik.meltechsystems.net (Postfix, from userid 1079) id 4EAE850819; Thu, 26 May 2005 02:20:36 +0800 (MYT) Received: from [192.168.1.182] (unknown [60.48.81.41]) by anggerik.meltechsystems.net (Postfix) with ESMTP id AA0BE50816 for ; Thu, 26 May 2005 02:20:32 +0800 (MYT) Message-ID: <4294C2B8.6010801@synthexp.net> Date: Thu, 26 May 2005 02:23:52 +0800 From: Ihsan Junaidi Ibrahim User-Agent: Mozilla Thunderbird 1.0 (Windows/20041206) X-Accept-Language: en-us, en MIME-Version: 1.0 To: questions@freebsd.org References: <1657183228.20050525175024@hexren.net> In-Reply-To: <1657183228.20050525175024@hexren.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on anggerik.meltechsystems.net X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.0.3 X-Spam-Level: Cc: Subject: Re: mod_auth_pam apache pam X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2005 18:22:12 -0000 Hexren wrote: > Hi, > I am trying to authentificate user against the system user database > using mod_auth_pam-1.1.1 on apache-1.3.33_1. > > I get the following error in the apache error.log > "(2)No such file or directory: access to /www.xxx.net/ failed for 217.228.101.117, reason: authentication error" > > /etc/pam.d/httpd > #cat /etc/pam.d/httpd > auth required pam_unix.so debug > account required pam_unix.so debug > > the relevant Directory directive from httpd.conf > > AuthPAM_Enabled on > AllowOverride None > AuthName "Web Statistics xxx" > AuthType "basic" > require group test > > > imho the error has some connection to pam_unix.so, that is because > pam_permit.so works as it should (it permits everything). > Strangely no error shows up in my system message log. (where I log *.debug level > messages) despite the debug flag in /etc/pam.d/httpd. > I've encountered the problem as well and have lived without it since; if I recalled correctly from a previous reply on this list, pam_unix.so uses getpwnam () to fetch the password information. It will only return the password if the calling process has an UID of 0 (root). Since your apache is running as user www, that should explain why the authentication failed. The only workaround is to have your apache runs as root or use a different authentication back-end. -- Thank you for your time, Ihsan Junaidi Ibrahim, http://ihsan.synthexp.net