Menu

more on encryption not processed right...

Help
deb248211
2005-08-04
2013-04-23
  • deb248211

    deb248211 - 2005-08-04

    I read anocelot's posting about the md5 problem in OSX, and am having the same problem. I am running 10.3.9 with security update (which solved anocelot's problem).

    I installed mod_auth_mysql 2.8.1 using the OSX installer, having first installed 2.6.1 and had the same problem on both: I know my passwords are stored in MySQL with md5 hash and have all this working perfectly away from mod_auth_mysql. However I keep getting a password mismatch in the error log.

    If I set PwEncryption to none and change the MySQL value accordingly it works. Any ideas??

    System: OSX 10.3.9
    Apache: 1.3.33
    MySQL: 3.23.49

    Thanks

     
    • Jerry Stuckle

      Jerry Stuckle - 2005-08-04

      Hi, Deb,

      I'm not sure why this should be failing. 

      We use the Apache ap_md5() function to hash the password before comparing to the one stored in the MySQL database. 

      I'm assuming you store the passwords with the MySQL MD5 function.  It should match the output of Apache's - there should be no changes in the hashing algorithm.

      First - can you encrypt a sample password (i.e. "password") on your system then post the hashed output in the MySQL database?  I can compare it with what I have here to see if it matches.  If it doesn't, the problem is in the MySQL MD5 call.  If it does match, it has to be in the Apache ap_md5 call.

      Next - what is the structure of your user table?  I can try to duplicate it here.

      Also, do you have the ability to recompile mod_auth_mysql there?  If so, I can put together a patch depending what we find above.

      One other thing - I just got the OS X installer version of mod_auth_mysql-3.0.0 uploaded (thanks to Drew Bell).  I doubt it will fix your problem; we made some changes in the password handling routines, but nothing which should will affect the md5 hash.

      Jerry

       
    • deb248211

      deb248211 - 2005-08-05

      via terminal window, INSERT (md5('password')) was value of 5f4dcc3b5aa765d61d8327deb882cf99
      stored in user_info table.

      via my usual php add member page, password of 'password' md5 hashed was also
      5f4dcc3b5aa765d61d8327deb882cf99

      The user_info table structure is as per the mod_auth_mysql instructions, other than following the initial password mismatch problem, I changed the user_passwd field to text type, as this is what I have in my other database tables.

      +-------------+-------------+------+-----+---------+-------+
      | Field       | Type        | Null | Key | Default | Extra |
      +-------------+-------------+------+-----+---------+-------+
      | user_name   | varchar(30) |      | PRI |         |       |
      | user_passwd | text        |      |     |         |       |
      | user_group  | varchar(10) |      |     |         |       |
      +-------------+-------------+------+-----+---------+-------+

      I am not brilliant at compiling modules, and in fact couldn't manage to problem solve the mod_auth_mysql OSX installation issues prior to using the OSX installer that Drew created.

      I am able to do it with some basic instructions though.

      I will try mod_auth_mysql 3.00 and see if it makes any difference.

      Thanks for your help on this!

      Deb

       
    • deb248211

      deb248211 - 2005-08-05

      Hi Jerry

      It is now working!

      I removed mod_auth_mysql 2.6.1 and 2.8.1, restarted apache, then installed 3.00 using the OSX installer.

      I hadn't realised that 2.6.1 was still there, as locate mod_auth_mysql-2.6.1 had failed to bring up any results, so I am unsure which version Apache was using.

      Once again, thanks for your help! This one had me stumped for a couple of days...

      Deb

       
    • Jerry Stuckle

      Jerry Stuckle - 2005-08-05

      hi, Deb,

      Glad to hear you got it working!

      Jerry

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.