Re: Apache: adding massive amount of users for .htaccess from text file
Hi again,
> untested, quick and dirty
>
> #!/usr/bin/perl
>
> while (<>) {
> ($username, $password)=split /:/, $_, 2;
> system("/usr/bin/htpasswd", "-b", "/path/to/htaccess",
> $username, $password);
> }
Mmmh, I'm not sure why, it looks right, but now I noticed, it doesn't
work. The output looks okay, if I change the password of one user
manually in the same htaccess (user:crytpass) it works again for that
user. Maybe something wrong gets parsed after the split part (which I
don't understand myself) into the password?
Help appreciated, please safe me from typing hundreds of users'
credentials! ;)
With best regards,
Erik
Reply to: