返回列表 发布新帖

已解决,请锁(deluge如何在后台改密码?)

 
1759 2
发表于 2012-7-12 12:36:32 | 查看全部 阅读模式

更多精彩内容需要登录后查看

立即登录

评论2

隐身用户Lv.10 发表于 2012-7-12 12:50:34 | 查看全部
本帖最后由 panlin87 于 2012-7-12 12:52 编辑

Deluge FAQ里有~
How can I reset the password?
Note: you need to stop the Web UI before you do any of the following.
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):
  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]))
复制代码

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

潜水...
回复 点赞

使用道具 举报

hd3pt楼主Lv.4 发表于 2012-7-12 12:51:42 | 查看全部
多谢。
回复 点赞

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

support@gebi1.cn

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