Re: htpasswd : Batch Conversion

From: Wayne Bastow <wbastow@dont-contact.us>
Date: Tue, 08 Feb 2000 10:57:04 +1100

You could write a script to pass the combination to htpasswd.
The usage for htpasswd allows you to put the password on the command
line (see -b):

Usage:
        htpasswd [-cmdps] passwordfile username
        htpasswd -b[cmdps] passwordfile username password

 -c Create a new file.
 -m Force MD5 encryption of the password.
 -d Force CRYPT encryption of the password (default).
 -p Do not encrypt the password (plaintext).
 -s Force SHA encryption of the password.
 -b Use the password from the command line rather than prompting for
it.
On Windows and TPF systems the '-m' flag is used by default.
On all other systems, the '-p' flag will probably not work.

Wayne

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.
>
> Thanks
> gcb
>
> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> Gary C. Bortel
> Educational Technology Coordinator
> Ocosta School District
> 2580 Montesano St. S.
> Westport, WA 98595
> (360)268-9123

-- 
Wayne Bastow - DBA - Central Coast Health Phone: 61 2 43203231
Email: wbastowATccahsDOThealthDOTnswDOTgovDOTau
Linux, the choice of a GNU generation Kernel 2.2.5-15  on a i686  
 This login session: $13.76, but for you $11.88.
Received on Mon Feb 07 2000 - 17:04:13 MST

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