Opened 11 years ago

Closed 9 years ago

#1390 closed defect (fixed)

HTPASSWD custom auth fails under Win2K3

Reported by: anonymous Owned by: Matt Good
Priority: high Component: AccountManagerPlugin
Severity: critical Keywords: htpasswd login
Cc: Trac Release: 0.10



Win2K3 R2 Ent
Python 2.4
SQLite 3.3X
TracWebAdmin-0.1.2dev_r4240-py2.4.egg (working)

trac.ini relevant sections:

trac.web.auth.loginmodule = disabled
acct_mgr.admin.accountmanageradminpage = enabled
acct_mgr.api.accountmanager = enabled
acct_mgr.db.sessionstore = enabled
acct_mgr.htfile.abstractpasswordfilestore = enabled
acct_mgr.htfile.htdigeststore = disabled
acct_mgr.htfile.htpasswdstore = enabled
acct_mgr.http.httpauthstore = disabled
acct_mgr.pwhash.htdigesthashmethod = disabled
acct_mgr.pwhash.htpasswdhashmethod = enabled
acct_mgr.web_ui.accountmodule = enabled
acct_mgr.web_ui.loginmodule = enabled
acct_mgr.web_ui.registrationmodule = enabled
webadmin.* = enabled

password_store = HtPasswdStore
password_file = D:\TracRoot\logins.txt

Upon launch of trac STANDALONE server
(python C:\Python24\Scripts\tracd --port 8000 D:\TracRoot\Project)

and entering CORRECT login the crash occurs:

Traceback (most recent call last):

File "C:\Python24\Lib\site-packages\trac\web\", line 387, in dispatch_request


File "C:\Python24\Lib\site-packages\trac\web\", line 182, in dispatch

req.authname = self.authenticate(req)

File "C:\Python24\Lib\site-packages\trac\web\", line 146, in authenticate

authname = authenticator.authenticate(req)

File "build\bdist.win32\egg\acct_mgr\", line 334, in wrap File "build\bdist.win32\egg\acct_mgr\", line 344, in authenticate File "build\bdist.win32\egg\acct_mgr\", line 371, in _remote_user File "build\bdist.win32\egg\acct_mgr\", line 104, in check_password File "build\bdist.win32\egg\acct_mgr\", line 72, in check_password File "build\bdist.win32\egg\acct_mgr\", line 138, in _check_userline File "build\bdist.win32\egg\acct_mgr\", line 94, in htpasswd

NotImplementedError: The "crypt" module is unavailable on this platform.

However, if the login is INCORRECT, no crash occurs and appropriate message is shown.

Attachments (0)

Change History (3)

comment:1 Changed 11 years ago by anonymous

Resolution: worksforme
Status: newclosed

As it seems, one must use Apache's htpasswd to generate passwords; numerous web-based generators skip the header of the hash causing hash-test to revert to crypt() on Win32

comment:2 Changed 9 years ago by anonymous

Resolution: worksforme
Status: closedreopened

comment:3 Changed 9 years ago by baybora.oren@…

Resolution: fixed
Status: reopenedclosed

Also check run.bat for start trac standalone

For example;

This is our run.bat

C:\Development\Python24\Python.exe C:\Development\Python24\Scripts\tracd --port 9000 --auth=javaloper,C:\Development\Trac\Javaloper\trac.htdigest,trac C:\Development\Trac\Javaloper

be carefull --auth=.... because if you didnt give same name which is project name 'for us javaloper', you can get same error like '..NotImplementedError?: The "crypt" module is unavailable on this platform. '


Modify Ticket

Change Properties
Set your email in Preferences
as closed The owner will remain Matt Good.
The resolution will be deleted.

Add Comment

E-mail address and name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.