From owner-freebsd-questions Thu Aug 8 20:24:52 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 674C337B400 for ; Thu, 8 Aug 2002 20:24:48 -0700 (PDT) Received: from vms3.rit.edu (vms3.isc.rit.edu [129.21.3.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id D582143E6E for ; Thu, 8 Aug 2002 20:24:47 -0700 (PDT) (envelope-from bjm1287@ritvax.isc.rit.edu) Received: from dogbert ([129.21.131.177]) by ritvax.isc.rit.edu (PMDF V5.2-32 #40294) with ESMTPA id <01KL2MSNCSIUM8DJUE@ritvax.isc.rit.edu> for freebsd-questions@FreeBSD.ORG; Thu, 8 Aug 2002 23:24:38 EDT Date: Thu, 08 Aug 2002 23:24:45 -0400 From: Brian McCann Subject: RE: htpasswd / Apache In-reply-to: <20020809030236.GH49844@vectors.cx> To: 'Adam Weinberger' , freebsd-questions@FreeBSD.ORG Message-id: <000001c23f54$4f287750$2e00a8c0@dogbert> MIME-version: 1.0 X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-Mailer: Microsoft Outlook, Build 10.0.2616 Content-type: text/plain; charset=us-ascii Content-transfer-encoding: 7BIT Importance: Normal X-Priority: 3 (Normal) X-MSMail-priority: Normal 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 Right. That part I can do just using an option for the 'htpasswd' command. The problem comes when we try to change group memberships. And...even though this is fairly easy...changing a PW and/or deleting a user. But the biggest thing is the group membership file. I don't know how to code the following: (group file) Group1: user1 user2 user3 Group2: user2 user4 Group3: user1 user2 user4 Then how to delete user 2 out of everything, how to delete user4 out of group2, and how to add user1 to group2...just as examples. I know it's got to be fairly easy..and if I finish the pages/scripts, I'd gladly post them to the ports collection. The way I was doing it was using a web page as a front end, then having the web page (in php) call a bash/awk script to actually do the work, so it's a little more secure. Any ideas on how to code this? Thanks, --Brian -----Original Message----- From: owner-freebsd-questions@FreeBSD.ORG [mailto:owner-freebsd-questions@FreeBSD.ORG] On Behalf Of Adam Weinberger Sent: Thursday, August 08, 2002 11:03 PM To: Brian McCann Cc: freebsd-questions@FreeBSD.ORG Subject: Re: htpasswd / Apache you want the crypt function. remember, an htpasswd line is simply: $username:crypt($password, $salt) -Adam >> (08.08.2002 @ 1957 PST): Brian McCann said, in 1.9K: << > > 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 >> end of "htpasswd / Apache" from Brian McCann << -- "Oh good, my dog found the chainsaw." -Lilo, "Lilo & Stitch" Adam Weinberger adam@vectors.cx http://vectors.cx 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