网络营销电子商务研究中心  
How to buy the best prescription safety glasses in Canada? Let's study!
Go Back   网络营销电子商务研究中心 > 网站建设 > DedeCMS
User Name
Password
 
FAQ Members List Calendar Cheap Glasses

Reply
 
Thread Tools Display Modes
  #1   IP: 117.95.50.96
Old 2010-09-03, 09:14 PM
topvip topvip is offline
超级版主
 
Join Date: 2006-01-04
Posts: 1206
topvip 正向着好的方向发展
Default 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;
?>
Reply With Quote
  #2   IP: 117.95.50.96
Old 2010-09-03, 10:13 PM
admin admin is offline
论坛管理员
 
Join Date: 2006-01-04
Posts: 42
admin has disabled reputation
Default

进一步可以重置用户名

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;
?>
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

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

Prescription-glasses.com offers prescription glasses online at discount prices.
All times are GMT +8. The time now is 08:22 PM.


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