网络营销电子商务研究中心

网络营销电子商务研究中心 (https://www.0058.net/index.php)
-   DedeCMS (https://www.0058.net/forumdisplay.php?f=71)
-   -   Dedecms V5.6重设后台管理员密码 (https://www.0058.net/showthread.php?t=4205)

topvip 2010-09-03 09:14 PM

Dedecms V5.6重设后台管理员密码
 
不小心把刚装不久的DEDECMS密码忘记了,找了半天资料才找到重设的方法,如果大家遇到了和我一样的问题,不妨可以试一试下面这两个方法,我当前使用的版本是 DedeCMS V5.6。

还有一个方法是我按照上面的工具自己简写了一个重设密码的文件。
resetpwd.php
大家下载此文件以后放到你站点的根目录,只要运行一下,就会给admin重设密码为0058net

此方法的文件内容如下:


Code:

<?php
/*
 * *desc: DEDECMS 重设管理员admin的密码为0058net,适用于DedeCms V5.6
 * *auth: ityizhan.com
*/
$password = '518598a'; // 要重设的密码,可以自定义
require_once(dirname(__FILE__)."/include/common.inc.php");
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery("Update `#*__admin` set pwd='".substr(md5($password),5,20)."' where userid='admin'");
$dsql->Close();
echo '密码重置成功!新密码为'.$password;
?>


admin 2010-09-03 10:13 PM

进一步可以重置用户名

Code:

<?php
/*
 * *desc: DEDECMS 重设管理员admin的密码为000000,适用于DedeCms V5.6
 * *auth: ityizhan.com
*/
$password = '0058.net'; // 要重设的密码,可以自定义
require_once(dirname(__FILE__)."/include/common.inc.php");
$dsql = new DedeSql(false);
$dsql->ExecuteNoneQuery("Update `#*__admin` set pwd='".substr(md5($password),5,20)."' where id='1'");
$dsql->ExecuteNoneQuery("Update `#*__admin` set userid='henry' where id='1'");
$dsql->Close();
echo '密码重置成功!新用户名为:henry; 密码为'.$password;
?>



All times are GMT +8. The time now is 06:51 PM.

Powered by vBulletin Version 3.8.7
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.