Previous Thread
Next Thread
Print Thread
Rate Thread
Joined: Dec 1999
Posts: 37
Power User
Power User
Offline
Joined: Dec 1999
Posts: 37
dimopoulos,

First off I'd like to thank you for the attached script. It did its job Thank you.

However, at this point I have run into another snag.
All passwords in the sql database are now freshly new and md5 hashed.

I added 2 lines to my apache conf file:

LoadModule digest_auth_module lib/apache/mod_auth_digest.so
AddModule mod_auth_digest.c

I changed my .htaccess file to:

AuthType Digest
AuthName "myrealm"
AuthDigestFile /path/to/password/file

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

However, the old per script posted above that creates the userfile doesnt create it in the right format:

It makes:
tgnb:eca0249f7bf2fb3515bd7e319f5c2ab5

With AuthType Digest, apache needs:
tgnb:myrealm:eca0249f7bf2fb3515bd7e319f5c2ab5

This of course causes this in the apache error log:

[Fri Dec 20 08:09:49 2002] [error] [client xxx.xxx.xxx.xxx] Digest: user `tgnb' in realm `myrealm' not found: /some/path

/some/path being the .htaccess protected part of the site

Even if I change the password file manually for testing, I still get this in my apache error log:

[Fri Dec 20 08:24:24 2002] [error] [client xxx.xxx.xxx.xxx] Digest: user tgnb: password mismatch: /some/path

I edited the perl script so it creates the password file in the right format.

At this point I am a bit lost not understanding why there would be a password mismatch.

the board uses md5
apache uses md5
apache finds the userfile
apache finds the realm in the userfile
but apache can't match the passwords in it

=====

While reading docs etc on how to do the Digest authentication I also came across something even more interesting

http://www.widexl.com/scripts/documentation/htaccess.html

Auth MySQL

I'd imagine if I got AuthMySQL to work I could skip the entire procedure of having to run an old perl script in a cron job to update a password file because apache would use the database to authenticate.

To set Auth MySQL up I have to put this in the .htaccess file:

Auth_MYSQLdatabase: This is your database with the member's info.
Auth_MYSQLpwd_table: The members info table containing (username/password).
Auth_MYSQLuid_field: The username field.
Auth_MYSQLpwd_field: The password field.
Auth_MYSQL_EncryptedPasswords: Are the password MySQL encrypt. [on|off].

So I have the following questions
What is the table containing username and password
What is the username field
What is the password field
And finally I guess I'll have to test if apache will accept the encrypted passwords.. hehe

Thanks for your time and support.

Last edited by tgnb; 12/20/2002 11:43 AM.

tgnb
Sponsored Links
Entire Thread
Subject Posted By Posted
password encryption and .htaccess authentication tgnb 12/17/2002 4:38 PM
Re: password encryption and .htaccess authentication dimopoulos 12/17/2002 5:31 PM
Re: password encryption and .htaccess authenticati tgnb 12/17/2002 6:11 PM
Re: password encryption and .htaccess authenticati dimopoulos 12/17/2002 7:23 PM
Re: password encryption and .htaccess authenticati tgnb 12/20/2002 4:04 PM
Re: password encryption and .htaccess authenticati dimopoulos 12/20/2002 7:04 PM
Re: password encryption and .htaccess authenticati tgnb 12/20/2002 10:43 PM
Re: password encryption and .htaccess authenticati Dave_L_dup1 12/20/2002 11:19 PM
Re: password encryption and .htaccess authenticati tgnb 12/23/2002 6:13 PM
Re: password encryption and .htaccess authenticati Dave_L_dup1 12/23/2002 7:34 PM
Re: password encryption and .htaccess authenticati tgnb 12/23/2002 10:14 PM
Re: password encryption and .htaccess authenticati Dave_L_dup1 12/23/2002 11:37 PM
Re: password encryption and .htaccess authenticati tgnb 12/24/2002 12:21 AM
Re: password encryption and .htaccess authentication mgdale2 01/07/2004 10:01 PM

Link Copied to Clipboard
Donate Today!
Donate via PayPal

Donate to UBBDev today to help aid in Operational, Server and Script Maintenance, and Development costs.

Please also see our parent organization VNC Web Services if you're in the need of a new UBB.threads Install or Upgrade, Site/Server Migrations, or Security and Coding Services.
Recommended Hosts
We have personally worked with and recommend the following Web Hosts:
Stable Host
bluehost
InterServer
Visit us on Facebook
Member Spotlight
Zarzal
Zarzal
Berlin, Germany
Posts: 808
Joined: July 2001
Forum Statistics
Forums63
Topics37,575
Posts293,932
Members13,824
Most Online6,139
Sep 21st, 2024
Today's Statistics
Currently Online
Topics Created
Posts Made
Users Online
Birthdays
Top Posters
AllenAyres 21,079
JoshPet 10,369
LK 7,394
Lord Dexter 6,708
Gizmo 5,835
Greg Hard 4,625
Top Posters(30 Days)
Gizmo 1
Top Likes Received
isaac 82
Gizmo 20
Brett 7
Morgan 2
Top Likes Received (30 Days)
None yet
The UBB.Developers Network (UBB.Dev/Threads.Dev) is ©2000-2025 VNC Web Services

 
Powered by UBB.threads™ PHP Forum Software 8.0.1
(Snapshot build 20240918)