Opened 7 years ago

Closed 5 years ago

#1390 closed defect (fixed)

HTPASSWD custom auth fails under Win2K3

Reported by: anonymous Owned by: mgood
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 7 years ago by anonymous

  • Resolution set to worksforme
  • Status changed from new to closed

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 5 years ago by anonymous

  • Resolution worksforme deleted
  • Status changed from closed to reopened

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

  • Resolution set to fixed
  • Status changed from reopened to closed

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. '


Add Comment

Modify Ticket

as closed .
as The resolution will be set. Next status will be 'closed'.
to The owner will be changed from mgood. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.

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

Note: See TracTickets for help on using tickets.