Drupal密码设置
我必须直接通过数据库重置密码,因为我使用了查询
UPDATE users SET pass = md5('NEWPASSWORD') WHERE name = 'admin'
但我仍然无法登录。
你能告诉我哪里出错了吗?
I have to reset my password direct through database for that I used query
UPDATE users SET pass = md5('NEWPASSWORD') WHERE name = 'admin'
but still I am not able to login.
Can you please tell me where I am going wrong?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 drupal 7 中,密码不再通过 md5 加密。
drupal7中有多种重置密码的方法。
使用 drush :
不使用 drush,如果您对服务器有 cli 访问权限:
现在复制结果哈希并将其粘贴到查询中:
如果您正在处理如果您无法连接到远程环境,您可以将此指定的代码放入诸如password.php之类的文件中,如下所示:
然后使用以下命令访问您的站点: http://domain.tld/password.php?p=MyPassword。哈希值将显示在您的浏览器选项卡上。
完成后不要忘记将其删除。
With drupal 7, password are no more encrypted through md5.
There are several way to reset a password in drupal7.
Using drush :
Without drush, if you have a cli access to the server :
Now copy the resultant hash and paste it into the query:
If you are working on a remote environment on which you cannot connect, you can put this specified code in a file such as password.php such as this one:
And then hit your site using: http://domain.tld/password.php?p=MyPassword. The hash will appear on your browser's tab.
Don't forget to remove it once you done it.
您的帐户被锁定了吗?如果您有数据库访问权限,请尝试清除“洪水”表。
Are you locked out of your account? If you've got DB access then try clearing out the "flood" table.