我已经检查了'admin‘用户的状态当前是1,这意味着它的活动。我也尝试通过电子邮件检索密码,但我没有收到任何电子邮件,可能是因为我在本地托管。
我已经使用下面的查询从sql重置密码。
update users set pass = md5('mynwepass') where uid = 1;它似乎更新了密码,但Drupal没有识别我的新密码。我已经多次尝试,我的管理员身份被暂时封锁,然后我截断洪水表,让我重试。但它还是认不出我的证件。
除了重新安装Drupal之外,还有其他选项吗?
发布于 2014-01-15 08:35:36
Drupal不将密码存储为md5。现在是盐渍散列,以防止彩虹攻击。
如果您需要手动设置密码,而不需要工作的邮件系统,最好的选择是使用钻地 --一个用于Drupal的命令行shell和脚本接口。
drush user-password someuser --password="correct horse battery staple"发布于 2014-01-15 08:24:32
你最好改变你的密码:
<?php
/**
* @file
* The PHP page that serves all page requests on a Drupal installation.
*
* The routines here dispatch control to the appropriate handler, which then
* prints the appropriate page.
*
* All Drupal code is released under the GNU General Public License.
* See COPYRIGHT.txt and LICENSE.txt.
*/
/**
* Root directory of Drupal installation.
*/
define('DRUPAL_ROOT', getcwd());
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
require_once 'includes/password.inc';
echo user_hash_password('givenpassword');
die();
menu_execute_active_handler();
?>更改pass后,删除负责更改密码的行。您可以通过以下链接看到解决方案:重置管理密码
https://drupal.stackexchange.com/questions/99950
复制相似问题