From owner-freebsd-questions Sat Aug 10 22: 9:11 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 2E37A37B400 for ; Sat, 10 Aug 2002 22:09:07 -0700 (PDT) Received: from patriarch.dnsalias.org (adsl-65-71-34-229.dsl.hstntx.swbell.net [65.71.34.229]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9894B43E3B for ; Sat, 10 Aug 2002 22:09:06 -0700 (PDT) (envelope-from noackjr@compgeek.com) Received: from COMPGEEK ([127.0.0.1]) by patriarch.dnsalias.org with Microsoft SMTPSVC(6.0.2600.1); Sun, 11 Aug 2002 00:09:05 -0500 Reply-To: From: "Jon Noack" To: "'Brian McCann'" , Cc: "'Jeffrey Yeo'" Subject: Re: htpasswd / Apache Date: Sun, 11 Aug 2002 00:08:58 -0500 Message-ID: <000001c240f5$334dd820$0a01a8c0@COMPGEEK> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.3416 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 Importance: Normal X-OriginalArrivalTime: 11 Aug 2002 05:09:05.0155 (UTC) FILETIME=[36DF1530:01C240F5] 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 Why not just use the htpasswd program and have the web interface just do a native call with the appropriate options? PHP and Perl allow the ` (backtick) operator to run a native command and you can capture the STDOUT to a string (or get exit status or any other cool things). That would at least get you most of the way with adding and changing passwords. Deleting is easy (just remove the line) using PHP or Perl. Group membership should be pretty easy as well (from what I remember of the file format). If you need more maybe you should consider using a database and cookies for authentication (with SSL of course). That's what I'm looking at as the htpasswd/htgroup scheme is *way* too limiting in my ever-growing and changing authentication environment. Hope that helps, Jon Noack --- Brian McCann wrote: > Hi all. I have a question for everyone using Apache out > there. I've spent a few days trying to write a set of > PHP/Bash scripts that will edit the htpasswd file and > htgroup files for Apache, and it's getting old fast. > I'm hitting quite a few road blocks, and getting blown > away in awk and bash code. Does anyone know of any > ports or something that would allow me to add, delete, > change PWs, and edit group membership via a web > interface? > > Thanks, > --Brian To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message