首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >管理员登录问题

问管理员登录问题
EN

Drupal用户
提问于 2014-01-15 07:51:30
回答 2查看 386关注 0票数 1

我已经检查了'admin‘用户的状态当前是1,这意味着它的活动。我也尝试通过电子邮件检索密码,但我没有收到任何电子邮件,可能是因为我在本地托管。

我已经使用下面的查询从sql重置密码。

代码语言:javascript
复制
 update users set pass = md5('mynwepass') where uid = 1;

它似乎更新了密码,但Drupal没有识别我的新密码。我已经多次尝试,我的管理员身份被暂时封锁,然后我截断洪水表,让我重试。但它还是认不出我的证件。

除了重新安装Drupal之外,还有其他选项吗?

EN

回答 2

Drupal用户

回答已采纳

发布于 2014-01-15 08:35:36

Drupal不将密码存储为md5。现在是盐渍散列,以防止彩虹攻击。

如果您需要手动设置密码,而不需要工作的邮件系统,最好的选择是使用钻地 --一个用于Drupal的命令行shell和脚本接口。

代码语言:javascript
复制
drush user-password someuser --password="correct horse battery staple"
票数 2
EN

Drupal用户

发布于 2014-01-15 08:24:32

你最好改变你的密码:

代码语言:javascript
复制
<?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后,删除负责更改密码的行。您可以通过以下链接看到解决方案:重置管理密码

票数 1
EN
页面原文内容由Drupal提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://drupal.stackexchange.com/questions/99950

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档