From owner-freebsd-isp Thu Apr 9 20:42:11 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id UAA18081 for freebsd-isp-outgoing; Thu, 9 Apr 1998 20:42:11 -0700 (PDT) (envelope-from owner-freebsd-isp@FreeBSD.ORG) Received: from panda.hilink.com.au (panda.hilink.com.au [203.8.15.25]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id UAA18072 for ; Thu, 9 Apr 1998 20:42:04 -0700 (PDT) (envelope-from danny@panda.hilink.com.au) Received: (from danny@localhost) by panda.hilink.com.au (8.8.5/8.8.5) id NAA12872; Fri, 10 Apr 1998 13:41:34 +1000 (EST) Date: Fri, 10 Apr 1998 13:41:34 +1000 (EST) From: "Daniel O'Callaghan" To: Susie Ward cc: freebsd-isp@FreeBSD.ORG Subject: Re: passwd to .htpasswd script In-Reply-To: <3.0.32.19980409194530.006be410@mail.voltage.net> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-isp@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.org On Thu, 9 Apr 1998, Susie Ward wrote: > Does anyone know of a script to convert the passwd file into an .htpasswd > file for securing a web directory? #!/usr/bin/perl # # I don't like to include users with uid < 100 in .htpasswd file. # In reality, httpd and apache should be taught to terminate the # encrypted passwd at its ':'. # while(<>) { ($uname, $passwd, $uid)=split(':'); print "$uname:$passwd\n" if ( $uid > 100 ); } To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-isp" in the body of the message