0

I forgot my drupal admin password and tried resetting it using forgot password option, but it fails to work( does not send the mail).

Drupal 8 is installed on my localhost. I tried manually editing the users table in the database, so I deleted the user with uid 1(admin) and also deleted corresponding data for uid 1 from users_field_data table.

I am unable to figure out the value to be inserted for uuid in users table. I tried giving 1 for uid, my_name for uuid and md5(password), but the login fails. uuid seems to be encrypted somehow and i can't figure how.

Also, I am using wamp, so I haven't tried using drush or drupal console for version 8.

I found two relevant answers on topics " Insert “uuid” in “users” and Is there a good and recent documentation on the UUID API in Drupal 8 core? ", but not of much help.

  • I highly doubt that you forgot your password, maybe the login form is not working properly. Take a look at my answer here this may possibly be your actual problem. – No Sssweat Jul 23 '16 at 7:14
1

You can't easily manually insert a user record. The password is not an MD5 hash, it a salted SHA-256 hash.

You hopefully made a backup, you should restore that. From there, you should consider to use drush, which is the by-far easiest way to log in, with drush uli to generate a one-time login link or drush upwd, to set the password of a user.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.