[Mailman-Users] Password Authentication Problem (2)
Dan.Mick at west.sun.com
Thu Nov 30 21:18:56 CET 2000
If you, at the top of the module you'd like to debug, put
from Mailman.Logging.Syslog import syslog
and then, where you'd like to see what's going on, put
syslog('filename', 'string with printf formats like this: %s', stringvar)
or something similar, you'll get a file in ~mailman/logs named 'filename' that
has your printfs in it. Perhaps you can figure out which part of the process
seems to be going wrong.
> Torjus Jensen wrote:
> In an earlier e-mail we had asked for help with a problem where the site admin password would not authenticate. SInce
> we did not get any response, we began looking into the code.
> We have determined that the problem is either that writing to the adm.pw file fails, or reading from it fails:
> From Utils.py:
> def SetSiteAdminPassword(pw):
> fp = open_ex(mm_cfg.SITE_PW_FILE, 'w', perms=0640)
> fp.write(Crypt.crypt(pw, GetRandomSeed()))
> def CheckSiteAdminPassword(pw1):
> f = open(mm_cfg.SITE_PW_FILE)
> pw2 = f.read()
> return Crypt.crypt(pw1, pw2[:2]) == pw2
> # There probably is no site admin password if there was an exception
> except IOError:
> return 0
> If we substitute def CheckSiteAdminPassword with:
> #def CheckSiteAdminPassword(pw1):
> #return 1
> we are able to log in (obviously).
> We have checked permissions on the adm.pw, and noted that it is indeed written to when calling mmsitepass. Our guess
> is therefore that the problem is either in reading from the file, or in the Crypt.crypt function.
> Since we are not at all familiar with Python, we would appreciate some help.
> Torjus Jensen
More information about the Mailman-Users