From owner-freebsd-questions Tue Jul 2 14:25:31 2002 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 92AF237C1E1 for ; Tue, 2 Jul 2002 14:21:24 -0700 (PDT) Received: from labs.unixhideout.com (dsl-65-187-193-189.telocity.com [65.187.193.189]) by mx1.FreeBSD.org (Postfix) with ESMTP id 41BB443E09 for ; Tue, 2 Jul 2002 14:21:20 -0700 (PDT) (envelope-from root@unixhideout.com) Received: from MIKESBOX ([192.168.1.10]) by labs.unixhideout.com (8.12.5/8.12.3) with SMTP id g62LLG0Z031236 for ; Tue, 2 Jul 2002 17:21:18 -0400 (EDT) (envelope-from root@unixhideout.com) From: "ro0t" To: Subject: RE: Apache 1.3.22 Date: Tue, 2 Jul 2002 17:21:20 -0400 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0) X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal In-Reply-To: Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Does your web server have php enabled? I can give you a very secure script to do this for you. all you do is make an auth directory, and place the script in it, then in the pages you want protected you simply do and they will be prompted with a user pass similar to apaches htaccess. Using this will save you heaps of time. If i am wrong and its not secure do let me know list. http://www.unixhideout.com/admin/ -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG]On Behalf Of Barry Byrne Sent: Tuesday, July 02, 2002 12:43 PM To: local.freebsd.questions; 'freebsd-questions@freebsd.org' Subject: RE: Apache 1.3.22 > -----Original Message----- > From: owner-freebsd-questions@FreeBSD.ORG > I recently added mod_auth_pam from ports to an existing > Apache installation because I wanted simple password > file authentication and there's no port of mod_auth_system. > The docs in /usr/local/share/doc/mod_auth_pam say that > a file will have been added to /etc/pam.d by the install; > however that directory does not exist. FreeBSD doesn't use /etc/pam.d as some systems do, instead, there is a single file called /etc/pam.conf You need to add lines in the format: httpd account required pam_unix.so > Attempting to access a protected file gets this: > > Jul 2 15:20:39 speyburn httpd: unable to dlopen(/usr/lib/pam_unix.so) > Jul 2 15:20:39 speyburn httpd: unable to dlopen(/usr/lib/pam_unix.so) > Jul 2 15:20:39 speyburn httpd: [dlerror: /usr/lib/pam_unix.so: > Undefined symbol "pam_get_item"] > Jul 2 15:20:39 speyburn httpd: [dlerror: /usr/lib/pam_unix.so: > Undefined symbol "pam_get_item"] > Jul 2 15:20:39 speyburn httpd: adding faulty module: > /usr/lib/pam_unix.so > Jul 2 15:20:39 speyburn httpd: adding faulty module: > /usr/lib/pam_unix.so You probably will have two futher issues here. Firstly, unless apache is compiled with the PAM libraries, it will fail to load them. The simplest solution is to use LD_PRELOAD when starting apache. In your apache startup file, try something like: LD_PRELOAD="/usr/lib/libpam.so.1" export LD_PRELOAD /usr/local/apache/bin/apachectl start You may also have another problem: pam_unix.so requires root privileges - apache typically runs as 'nobody', so you won't be able to use this particular PAM module unless you run apache as root (don't do this). You should be able to use most other PAM modules just fine though. - Barry > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message