0

I have a user who updated his sql connector to 6.6.5 and not he cannot run his code due to the passwords being hashed in the older format (pre 4.1?). I would like to update all of the mysql accounts to the newer format unfortunately I do not know all of the passwords. I recently migrated to a new server (5.1.67), but I simply did a show grants for each user and copied the info into the new server.

Is there any way to simply tell it to update all the hashes to the new format without supplying the original password? There are several systems running code that relies on these passwords (hardcoded), so I can't simply ask users to reset their passwords very easily.

On CentOS 6.3 mysql 5.1.67

1 Answers1

0

Quick Answer: NO, you cannot rehash an existing hash value and still retain its original meaning.

A hash by definition is a many --> one encoding. As the hash value cannot be returned to its original value, it is impossible to rehash a hash value so that the original coding remains intact.

mdpc
  • 11,856
  • 28
  • 53
  • 67
  • Thanks for your answer. I ended up simply getting that one user's password and setting old_passwords to off then rehashing using the 41 byte hash and issuing a flush-hosts. This worked. –  Apr 08 '13 at 15:28