Unable to log in to web interface
Posted: Tue Mar 08, 2011 7:04 pm
I've just installed Deluge on a Zentyal server (Ubuntu 10.04, I think). When I connect with a client PC I get asked for a password, but nothing works. I read in the FAQ that the password is supposed to be "deluge". I've tried it also with an upper case "D" and in all upper case as well as blank. Nothing works.
I followed one of the threads here, which said to delete the web.conf file, and did that, but nothing changed.
I followed another thread which said to run the following script file:
#!/usr/bin/env python
# Changes the password for Deluge's Web UI
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]))
But when I run it, it says:
Usage: resetpassword.py <deluge config dir>
I have the script saved in the config directory so I tried typing resetpassword.py .
This produces:
No handlers could be found for logger "deluge"
Enter new password:
Looks like I'm making headway, but I tried "deluge", "test" and others but I always get:
Traceback (most recent call last):
File "./resetpassword.py", line 20, in <module>
s.update(config['pwd_salt'])
File "/usr/lib/pymodules/python2.6/deluge/config.py", line 235, in __getitem__
return self.get_item(key)
File "/usr/lib/pymodules/python2.6/deluge/config.py", line 253, in get_item
return self.__config[key]
KeyError: 'pwd_salt'
I have no idea how to fix this, and I still can't log in.
I followed one of the threads here, which said to delete the web.conf file, and did that, but nothing changed.
I followed another thread which said to run the following script file:
#!/usr/bin/env python
# Changes the password for Deluge's Web UI
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]))
But when I run it, it says:
Usage: resetpassword.py <deluge config dir>
I have the script saved in the config directory so I tried typing resetpassword.py .
This produces:
No handlers could be found for logger "deluge"
Enter new password:
Looks like I'm making headway, but I tried "deluge", "test" and others but I always get:
Traceback (most recent call last):
File "./resetpassword.py", line 20, in <module>
s.update(config['pwd_salt'])
File "/usr/lib/pymodules/python2.6/deluge/config.py", line 235, in __getitem__
return self.get_item(key)
File "/usr/lib/pymodules/python2.6/deluge/config.py", line 253, in get_item
return self.__config[key]
KeyError: 'pwd_salt'
I have no idea how to fix this, and I still can't log in.