-2

I hashed my password, but now I forgot the password. How do I enter into my login page in a php front-end? I created a user login page in php which includes username and password, after creating this, it then stores the username with visible strings in MySQL while it stores the password in hashed format. After a long while I then forgot my admin password which is simply hashed in my database which is in MySQL. Pls how do I retrieve my password in correct text format

  • 9
    You can't decrypt a hashed password, the whole point of a hash is that it is one-way..... create a hash for a password that you do know, and edit that into your database manually – Mark Baker Mar 08 '14 at 17:37
  • 2
    Reverse engineering hashed password is off-topic ! – Shankar Narayana Damodaran Mar 08 '14 at 17:38
  • 2
    Let's see... if you are the owner of the database, that's not problem... just hash a new password and insert it in the database thru PHPmyAdmin. –  Mar 08 '14 at 17:39
  • See [Is it possible to decrypt md5 hashes?](http://stackoverflow.com/questions/1240852/is-it-possible-to-decrypt-md5-hashes) - this answers "how do I 'decrypt' a hash?", but the practical question is "how can I circumnavigate my own security?" (I suspect you can just modify the relevant data via myPhpAdmin or whatever.) – user2864740 Mar 08 '14 at 17:45

2 Answers2

3

Can you make changes to the database? If so, just hash a new password and update the datebase with that new hash. Easy peasy.

JohnKochJR
  • 133
  • 1
  • 10
2

The whole point of password hashing is to ensure that someone who steals the database, and thus knows the hashes, still can't determine the passwords. If you've done the hashing properly, what you are trying to do is impossible. If the password is lost, you need to change the hash to one that corresponds to a new, known, password.

David Schwartz
  • 179,497
  • 17
  • 214
  • 278