<html><head>
<meta http-equiv="Content-Type" content="text/html; CHARSET=UTF-8">
<meta name="GENERATOR" content="GtkHTML/3.32.2">
</head>
<body><div>Be aware that perl crypt only uses the first 8 characters of the user supplied password.</div><div><br></div><div>CPAN Apache-htpasswd may be a better solution</div><div><br></div><div>On Fri, 2017-02-03 at 11:11 -0500, Neal Rhodes wrote:</div><blockquote type="cite">
hmm. Sometimes just asking a question provokes an answer. Apparently this little bit of PERL will create a similar file. <br>
<br>
cat myhtpasswd.pl<br>
#!/usr/bin/perl<br>
use strict;<br>
chomp(my $filename=$ARGV[0]);<br>
chomp(my $username=$ARGV[1]);<br>
chomp(my $password=$ARGV[2]);<br>
if (!$filename || !$username || !$password) {<br>
print "USAGE: ./crypt.pl filename username password\n\n";<br>
} else {<br>
open FILE, ">>", $filename or die $!;<br>
print FILE $username . ":" . crypt($password, $username) . "\n";<br>
close FILE or die $!;<br>
}<br>
<br>
The actual encrypted string is completely different from what my Centos box generates, but when I plopped it in place, Apache accepted the very same password. <br>
<br>
<br>
On Fri, 2017-02-03 at 10:53 -0500, Neal Rhodes wrote:<br>
<blockquote type="CITE">
So, we have a hosting account on a Godaddy Linux server: <br>
<br>
Linux XXXXXXXX.secureserver.net 2.6.18-411.el5PAE #1 SMP Mon Jul 11 18:26:16 CDT 2016 i686 i686 i386 GNU/Linux<br>
<br>
Which, amongst other things, hosts the Lloyd Shaw Foundations historic music downloads. So people all over the world are paying a tiny amount for tunes from the archives via Paypal, and then I setup download for them. <br>
<br>
Which now has me building an .htpasswd file on my local Centos 6 64 bit system, and shoving that over via scp. <br>
<br>
Because the Godaddy server lacks an htpasswd command. And Godaddy support has in the past and continues to decline to provide a compatible one. <br>
<br>
BUT, they don't have any problem with me stuffing one there in my local ./bin folder and running it. So, if I could find a compatible binary to the above, I could put the entire fulfillment process in one place and put a PHP front end on it and allow volunteers other than me to do it in places other than my office. <br>
<br>
So, the htpasswd from my 64 bit Centos 6 server didn't fly - I assume the binary is incompatible. How would I go about finding a compatible one? I did some random digging with rpmseek.com, and found one in <b><font size="4"> </font></b>HTPASSWD-APACHE-2.2.22-7.I486.RPM, but after unpacking and shoveling it over there, it wants some libraries: <br>
<br>
<blockquote>
./htpasswd: error while loading shared libraries: libaprutil-1.so.0: cannot open shared object file: No such file or directory<br>
<br>
</blockquote>
Obviously, getting shared libraries starts to get more involved. I just want to create a one-line ..htpasswd file Apache is happy with for each music download directory. <br>
<br>
If this takes a lot of drama, I might just accelerate the migration of my hosting off this server onto a more current one, which Godaddy says they have to force to happen anyway by the end of 2017. <br>
<br>
Regards, <br>
<br>
Neal
<pre>_______________________________________________
Ale mailing list
<a href="mailto:Ale@ale.org">Ale@ale.org</a>
<a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a>
See JOBS, ANNOUNCE and SCHOOLS lists at
<a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a>
</pre>
</blockquote>
<br>
<pre>_______________________________________________
Ale mailing list
<a href="mailto:Ale@ale.org">Ale@ale.org</a>
<a href="http://mail.ale.org/mailman/listinfo/ale">http://mail.ale.org/mailman/listinfo/ale</a>
See JOBS, ANNOUNCE and SCHOOLS lists at
<a href="http://mail.ale.org/mailman/listinfo">http://mail.ale.org/mailman/listinfo</a>
</pre></blockquote><div><span><pre><pre>-- <br></pre>James P. Kinney III
Every time you stop a school, you will have to build a jail. What you
gain at one end you lose at the other. It's like feeding a dog on his
own tail. It won't fatten the dog.
- Speech 11/23/1900 Mark Twain
http://heretothereideas.blogspot.com/
</pre></span></div></body></html>