![]() |
|
|||||||
![]() |
|
|
Thread Tools | Display Modes |
|
|
|
#1
IP: 117.95.50.96
|
|||
|
|||
|
不小心把刚装不久的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;
?>
|
|
#2
IP: 117.95.50.96
|
|||
|
|||
|
进一步可以重置用户名
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;
?>
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 想在dedecms内容页加入GG广告..应该修改哪个文件呢 | topvip | Blog(博客)/Wiki(维客)/RSS/Cms | 0 | 2007-06-06 07:53 AM |
| 在dedecms文章页里,文章内容包含栏目名称的话,自动加上链接地址 | topvip | Blog(博客)/Wiki(维客)/RSS/Cms | 0 | 2007-06-06 07:37 AM |
| 怎么去掉dedecms栏目文章标题后面的日期啊! | topvip | Blog(博客)/Wiki(维客)/RSS/Cms | 0 | 2007-06-06 07:35 AM |