PDA

View Full Version : .htacces and .htpassword help!!



Archbob
March 21st, 2002, 21:52
Okay my .htaccess file is like this:

http://subdomain.albinotreefrog.net/admin/.htpasswd


AuthName "Topsites Admin"
AuthType Basic

<Limit GET POST>
require valid-user
</Limit>



And my .htpasswd is like this:

archbob: jedibob.


But when I go to the directory and type archbob as the user and jedibob as the password, it says my username or password is wrong, what the heck is going on?

Toefur
March 21st, 2002, 22:00
The password in your htpasswd file needs to be encrypted (or some fancy word like that).

I asked the same thing once, and some one gave me a URL of a script where I could type the password in (ie: jedibob) and it would convert it to what you need to put in your htpasswd file instead of the actual password.

But I can't remember the site, and I can't seem to find any right now.

Toefur
March 21st, 2002, 22:02
I just found a site, and I think it does what you're after.

Go here: http://www.awtrey.com/support/scripts/htpass.php

And in the form down the bottom of the page, if you put your username and password in, it will tell you what you need to place in your htpasswd file, which I also pasted below:

archbob:J4co9yECCVHhk

Dusty
March 21st, 2002, 22:03
For anyone else, if you've access to Perl, just do this to encrypt a password:
#!perl

print "Content-type: text/html\n\n";
print crypt("password_here");

Archbob
March 21st, 2002, 22:39
I only have .php not perl.