Mysql – Resetting salted Drupal admin password

drupalMySQLpassword-recovery

Have an old VM with Drupal configured on it, and I can't recall the admin password. The password-recovery process sent me a link to reset the password, but the page generated said "Access Denied".

I then tried directly editing the Drupal users table in MySQL. This would have worked, except for the fact that the Salt module was installed and therefore the hash was invalid.

I'm not sure where to go from here; any ideas?

Best Answer

It seems you already solved the problem but here is an answer anyhow. Connect to the mysql database and do the following:

  • select value from variable where name='salt';
  • update users set pass=md5('newpassSALT') where uid=1; Where SALT is the value noted above.

The password should be reset to "newpass".

Related Topic