扫描二维码关注官方公众号
返回列表 发布新帖

[盒子/seedbox] 忘记deluge的Web UI密码后的重置方法(转自deluge官网)

5545 3
发表于 2013-4-1 20:56:42 | 显示全部楼层 阅读模式

来吧兄弟,一起玩一起讨论!

您需要 登录 才可以下载或查看,没有账号?注册

×
原文网址:http://dev.deluge-torrent.org/wiki/Faq#HowcanIresetthepassword

盒子被人改密码,去找root下重置deluge的webui密码的方法,中文貌似没有找到,换了英文关键词,立马就找到了。

How can I reset the password?【如何重设密码】
Note: you need to stop the Web UI before you do any of the following.
【注意:在以下操作之前你需要先停止Web UI
  1. killall deluged
  2. killall deluge-web
复制代码
If you have forgotten the password, you can reset it by deleting web.conf from deluge's config directory (see http://dev.deluge-torrent.org/wiki/Faq#WheredoesDelugestoreitssettingsconfig if you do not know where this is).
Important: This will delete all of your Web UI settings.
You can also reset it by using the following script (which does not delete your existing settings):
【如果你忘了密码,你可以通过删除deluge配置目录下的web.conf文件来重置密码(如果你不知道这文件在哪,参照http://dev.deluge-torrent.org/wiki/Faq#WheredoesDelugestoreitssettingsconfig(重置后的密码是deluge)重要:如果删除这个文件的话,你Web UI上的所有设置也将随之消失。
当然,你也可以通过下面的脚本来重设密码(这个方法就不会丢失原先的设置了)(这个方法我不会用,我用的是上面那个方法)
  1. #!/usr/bin/env python                                                                                                                                                                        
  2. # Changes the password for Deluge's Web UI

  3. from deluge.config import Config
  4. import hashlib
  5. import os.path
  6. import sys

  7. if len(sys.argv) == 2:
  8.     deluge_dir = os.path.expanduser(sys.argv[1])

  9.     if os.path.isdir(deluge_dir):
  10.         try:
  11.             config = Config("web.conf", config_dir=deluge_dir)
  12.         except IOError, e:
  13.             print "Can't open web ui config file: ", e
  14.         else:
  15.             password = raw_input("Enter new password: ")
  16.             s = hashlib.sha1()
  17.             s.update(config['pwd_salt'])
  18.             s.update(password)
  19.             config['pwd_sha1'] = s.hexdigest()
  20.             try:
  21.                 config.save()
  22.             except IOError, e:
  23.                 print "Couldn't save new password: ", e
  24.             else:
  25.                 print "New password successfully set!"
  26.     else:
  27.         print "%s is not a directory!" % deluge_dir
  28. else:
  29.     print "Usage: %s <deluge config dir>" % (os.path.basename(sys.argv[0]))
复制代码


Where does Deluge store its settings/config?(deluge配置文件存储位置)Linux
  1. ~/.config/deluge/
复制代码
Windows
  1. %APPDATA%\deluge\
复制代码

启动deluge和web ui

  1. deluged
  2. deluge-web --fork
复制代码


论坛最快速获得金币办法:
1、去盒子区发评测贴,范例:
http://hd2pt.com/thread-133245-1-2.html
2、翻译国外友人的盒子评测贴,范例:
http://hd2pt.com/thread-134285-1-3.html

评论3

albertxLv.2 发表于 2013-4-1 20:59:40 | 显示全部楼层
LZ果然发过来了,辛苦!
回复 点赞

使用道具 举报

欢腾的小螃蟹Lv.10 发表于 2013-4-1 21:32:00 | 显示全部楼层
支持{:7_742:}
回复 点赞

使用道具 举报

幽谷奇峰Lv.5 发表于 2013-4-1 22:38:11 | 显示全部楼层
学习了,收藏一下
回复 点赞

使用道具 举报

回复

懒得打字嘛,点击右侧快捷回复 【本站酷狼4T,750元】
您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

support@gebi1.cn

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2024 隔壁网 版权所有 All Rights Reserved. 粤ICP备14056481号-1
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表