deluge忘记WebUI密码后的重置方法

时间:4年前   阅读:8722

首先需要停止WebUI

killall deluged
killall deluge-web

然后可以通过删除deluge配置目录下的web.conf文件来重置密码,该文件的默认位置:

~/.config/deluge/

注意:删除该文件后,WebUI上的设置也将初始化。

当然,你也可以通过下面的脚本来重设密码:

#!/usr/bin/env python
# Changes the password for Deluge's WebUI

from deluge.config import Config
import hashlib
import os.path
import sys

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

    if os.path.isdir(deluge_dir):
        try:
            config = Config("web.conf", config_dir=deluge_dir)
        except IOError, e:
            print "Can't open web ui config file: ", e
        else:
            password = raw_input("Enter new password: ")
            s = hashlib.sha1()
            s.update(config['pwd_salt'])
            s.update(password)
            config['pwd_sha1'] = s.hexdigest()
            try:
                config.save()
            except IOError, e:
                print "Couldn't save new password: ", e
            else:
                print "New password successfully set!"
    else:
        print "%s is not a directory!" % deluge_dir
else:
    print "Usage: %s <deluge config dir>" % (os.path.basename(sys.argv[0]))

现在启动deluge和webui

deluged
deluge-web --fork

重置后的密码为 deluge

本站声明:网站内容来源于网络,如有侵权,请联系我们https://www.qiquanji.com,我们将及时处理。

微信扫码关注

更新实时通知

上一篇:修改rutorrent密码的方法

下一篇:英文版windows 2003汉化后打开任务管理器卡死系统无响应的解决方法

网友评论

请先 登录 再评论,若不是会员请先 注册