Re: Proxy Password Files

From: Simon Bryan <sbryan@dont-contact.us>
Date: Mon, 15 May 2000 08:37:45 +1000

Thanks Henrik,
That one I got working!

It seems that my main problem is that the user names using ncsa
authentication are also case-sensitive, is this the case?

> Simon Bryan wrote:
>
> > The error I getin the Cache log says 'Read Failure', I know it is not
> > permissions as I have the same permissions etc as a file that is
> > working. I think it is to do with the 'end of line'. What should be
> > there in this file, CR+LF, CR, or LF?
>
>
> The message is probably a indirect error causes by something else. Is
> there any other interesting errors prior to this?
>
> The format of the ncsa_auth password file is : separated with bare NL as
> lineending.
>
> userid:encrypted_password[:other:fields:if:wanted]NL
>
> the [] denotes optional data
>
> Quick and dirty perl script to encrypt a list of userids and passwords
> separated with mostly any separator (. , : ; " <space> <tab> or any
> combination thereof) and line format using bare LF or CRLF.
>
> #!/usr/bin/perl
> # Generate a initial salt with two uppercase letters
> $salt=pack("cc",65+int rand(25),65+int rand(25));
> while(<>) {
> # Split the line on mostly any separator
> @F=split(/[:,;"\s\r]+/);
> shift @F if $F[0] eq "";
> # Encrypt the password (second field) using unix crypt()
> $crypt=crypt($F[1],$salt);
> # Borrow two characters for the next salt
> $salt=substr($crypt,2,2);
> # Print out the result
> print $F[0].":".$crypt.join(":",splice(@F,2))."\n";
> }
>

--
Simon Bryan                    sbryan@olmc.nsw.edu.au
Information Technology Manager sbryan@mpx.com.au
OLMC Parramatta
Received on Sun May 14 2000 - 16:41:17 MDT

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