1

I'm aware that Drupal 7 saves the user's password in a more compact way and it's really hard (impossible?) to convert such password back to a human readable text format (even not into database).

Actually I do not want to implement any hack to Drupal, but it's a requirement that a super admin can somehow view the username along with its password for any user. Super admin is a trust worthy role and actually will help through secured communication media to other users after forgetting their password.

So there is a need to create a block to show all the usernames with their corresponding password, which can only be used by a super admin.

Any suggestions about how I could implement all this?

Note: Users are not allowed to reset passwords, I just want only super admin can access their usernames and passwords and then re-assign to other user if any of them forgot his password.

  • MD5 is used by Drupal 6 and earlier. Drupal 8 and Drupal 7 use SHA512 with a salt. – ya.teck May 20 '15 at 7:43
4

You can't. Drupal passwords are hashed, not encrypted, the key difference being hashes are one-way.

With Drupal 6's non-salted MD5 hashes, a rainbow table might get you there, but with D7's salted SHA512 hashes would be much tougher. The time spent trying to do this would be better spent trying to find an alternative to your need of listing all user/pass.

2

You can't.

Passwords are saved encrypted so that they can't be easily recovered in their clear format.

Beyond that you could use the password reset mechanism and reset the passwords. That's the closest that you will get to what you want.

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.