Date: Fri, 10 Apr 1998 13:41:34 +1000 (EST) From: "Daniel O'Callaghan" <danny@panda.hilink.com.au> To: Susie Ward <sward@voltage.net> Cc: freebsd-isp@FreeBSD.ORG Subject: Re: passwd to .htpasswd script Message-ID: <Pine.BSF.3.91.980410133853.9007E-100000@panda.hilink.com.au> In-Reply-To: <3.0.32.19980409194530.006be410@mail.voltage.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.91.980410133853.9007E-100000>
