Re: htpasswd : Batch Conversion

From: Blue Lang <blue@dont-contact.us>
Date: Mon, 7 Feb 2000 20:40:01 -0500 (EST)

On Mon, 7 Feb 2000, Bortel Gary wrote:

> Is there a simple way to convert a plaintext file of multiple
> username:password combinations to an encrypted .htpasswd file for
> authenticating squid users with NCSA_auth? I have searched, without
> success, for the past two days trying to find a script or utility that
> would do this.

cut here
<----------------------------------------------------------------
#!/bin/sh
#
# batchpwconv.sh
# take : delimited list of username:pw combos and turn em into NCSA auth
# file named .htpasswd
# call as ./batchpwconv.sh <LISTFILENAME>
#
# Free Software. No Warranty.
#########################################################################

    while read LINE
    do
        htpasswd -b .htpasswd `echo $LINE | awk -F: '{print $1" "$2}'`
    done < $1

<------------------------------------------------------------------------

And mom said I'd never amount to nuthin!

-- 
        Blue Lang                              Unix Systems Admin
        QSP, Inc., 3200 Atlantic Ave, Ste 100, Raleigh, NC, 27604
        Home: 919 835 1540  Work: 919 875 6994  Fax: 919 872 4015
Received on Mon Feb 07 2000 - 18:49:15 MST

This archive was generated by hypermail pre-2.1.9 : Tue Dec 09 2003 - 16:51:01 MST