Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Apache-Password length! (only 8 or less chars are recognized) 1

Status
Not open for further replies.

rishath

Programmer
Jan 20, 2004
59
0
0
US
Hi! I have installed and configured Apache2 on Solaris 8. For the password protection, I created passwords using crypt() as,
Code:
perl -e 'print "06155:";print crypt("zhuiwra6155", SA);print "\n";'

I have done password authentication within the httpd.conf as below,
Code:
<Directory "/export/home/secret">
    Options FollowSymLinks
    AllowOverride None
    AuthType Basic
    AuthName "Restricted"
    AuthUserFile /export/home/passwd/.htpasswd
    Require valid-user
</Directory>
The password authentication works fine, but passwords with characters only, less than or equal to eight are taken into consideration by Apache i.e., If I have my password as 123456789, I get authenticated even if I give 12345678 . Only 8 chars are recognized.
How can I rectify this or is this a default property of apache?
 
It's not Apache. Rather, it's crypt().

Perl's crypt() function uses the system's crypt function, which on a lot of systems produces only 8-byte-significant hashes.

Apache can also use MD5 hashes for passwords, and MD5 can handle longer passwords.





Want the best answers? Ask the best questions!

TANSTAAFL!!
 
So, that was the problem? Okay, so how do I create MD5 hashes for my passwords?
 
Yeah! I do have htpasswd app in my apache bin directory. does this create MD5 hashes?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top