Modify

Opened 18 years ago

Closed 17 years ago

#818 closed defect (worksforme)

Cannot find an implementation of the "IPasswordStore" interface named "HtPasswdStore".

Reported by: ccosenti@… Owned by: Matt Good
Priority: normal Component: AccountManagerPlugin
Severity: major Keywords:
Cc: Trac Release: 0.10

Description

Running Win 2k Server

  • Trac 0.10
  • Python 2.4
  • Apache 2.2

The stock authentication worked fine. Could not get the login to work. The WebAdmin portion worked fine when I was using Apache authentication.

I am not real familiar with python, so perhaps I am missing a Python module? If so, it was not clear from the instructions.

When I turned off Apache authentication and used acct_mgr.web_ui.LoginModule = enabled, Trac threw the following error.

Traceback (most recent call last):
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 356, in dispatch_request
    dispatcher.dispatch(req)
  File "C:\Python24\Lib\site-packages\trac\web\main.py", line 224, in dispatch
    resp = chosen_handler.process_request(req)
  File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 250, in process_request
  File "build\bdist.win32\egg\acct_mgr\web_ui.py", line 36, in _create_user
  File "build\bdist.win32\egg\acct_mgr\api.py", line 95, in has_user
  File "build\bdist.win32\egg\acct_mgr\api.py", line 112, in password_store
  File "C:\Python24\Lib\site-packages\trac\config.py", line 377, in __get__
    raise AttributeError('Cannot find an implementation of the "%s" '
AttributeError: Cannot find an implementation of the "IPasswordStore" interface named "HtPasswdStore".  Please update the option account-manager.password_store in trac.ini.

My Config:

[components]
trac.web.auth.LoginModule = disabled
acct_mgr.web_ui.LoginModule = enabled
acct_mgr.web_ui.RegistrationModule = enabled
acct_mgr.api.AccountManager = enabled


[account-manager]
; configure the plugin to store passwords in the htdigest format:
password_format = htpasswd
; with Trac 0.10 use this instead:
password_store = HtPasswdStore

; the file where user accounts are stored
; the webserver will need write permissions to this file
; and its parent folder
; NOTE: THIS IS A VALID FILE AND WORKS WITH APACHE AUTHENTICATION
password_file = f:\XMLBUGS\htpasswd

Attachments (0)

Change History (6)

comment:1 Changed 18 years ago by Matt Good

Resolution: worksforme
Status: newclosed

You also need to enable "acct_mgr.htfile.HtPasswdStore" component before you can use it (I've updated the Wiki to try to make this more clear).

Also, you should only use one of "password_format" or "password_store", which is why it says "with Trac 0.10 use this instead:".

comment:2 Changed 18 years ago by ccosenti@…

Thanks! That fix did it.

Sorry if I missed it in the original wiki.

comment:3 Changed 18 years ago by bertrand@…

Resolution: worksforme
Severity: normalmajor
Status: closedreopened

Trac 0.10.3 and 0.10.4 dev (20070228), apache 2.0.53, Python 2.4

I get a similar error, even after apache restarts:

Traceback (most recent call last):
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 398, in dispatch_request
    dispatcher.dispatch(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 182, in dispatch
    req.authname = self.authenticate(req)
  File "/usr/lib/python2.4/site-packages/trac/web/main.py", line 146, in authenticate
    authname = authenticator.authenticate(req)
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 334, in wrap
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 344, in authenticate
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 371, in _remote_user
  File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 104, in check_password
  File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 120, in password_store
  File "/usr/lib/python2.4/site-packages/trac/config.py", line 379, in __get__
    raise AttributeError('Cannot find an implementation of the "%s" '
AttributeError: Cannot find an implementation of the "IPasswordStore" interface named "".  Please update the option account-manager.password_store in trac.ini.

My conf:

[components]
acct_mgr.admin.accountmanageradminpage = enabled
acct_mgr.api.accountmanager = enabled
acct_mgr.htfile.abstractpasswordfilestore = enabled
acct_mgr.htfile.htdigeststore = enable
acct_mgr.http.httpauthstore = enable
acct_mgr.htfile.HtPasswdStore = enabled
acct_mgr.web_ui.accountmodule = enabled
acct_mgr.web_ui.loginmodule = enabled
acct_mgr.web_ui.registrationmodule = enabled
password_store = HtDigestStore
password_file = /data/trac-jajuk/trac.htdigest
htdigest_realm = TracRealm
trac.web.auth.loginmodule = disabled
tracrpc.* = enabled
webadmin.* = enabled
webadmin.basics.* = enabled
webadmin.logging.* = enabled
webadmin.perm.* = enabled
webadmin.plugin.* = enabled
webadmin.ticket.* = enabled
webadmin.web_ui.* = enabled

apache:

<Location /projects/jajuk>
   SetHandler mod_python
   PythonHandler trac.web.modpython_frontend
   PythonOption TracEnv /data/trac-jajuk
   PythonOption TracUriRoot /projects/jajuk
   SetEnv PYTHON_EGG_CACHE /data/trac-jajuk/plugins
</Location>

(no authentication stuff)

Thanks for you help

comment:4 Changed 18 years ago by Matt Good

Resolution: worksforme
Status: reopenedclosed

You have used "enable" in several places, which should instead be "enabled". Also, the password_store, password_file, and htdigest_realm settings should be in the [account-manager] section, not under [components].

comment:5 Changed 17 years ago by maidesihoon@…

Resolution: worksforme
Status: closedreopened

Trac 0.10.4 & Python 2.4


Things were working perfectly yesterday but today I get an error. I didn't change anything on the server.

I get a similar error:

Python Traceback

Traceback (most recent call last):
  File "/home/usr/packages/lib/python2.3/site-packages/trac/web/main.py", line 406, in dispatch_request
    dispatcher.dispatch(req)
  File "/home/usr/packages/lib/python2.3/site-packages/trac/web/main.py", line 182, in dispatch
    req.authname = self.authenticate(req)
  File "/home/usr/packages/lib/python2.3/site-packages/trac/web/main.py", line 146, in authenticate
    authname = authenticator.authenticate(req)
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 334, in wrap
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 344, in authenticate
  File "build/bdist.linux-i686/egg/acct_mgr/web_ui.py", line 371, in _remote_user
  File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 104, in check_password
  File "build/bdist.linux-i686/egg/acct_mgr/api.py", line 120, in password_store
  File "/home/usr/packages/lib/python2.3/site-packages/trac/config.py", line 379, in __get__
    raise AttributeError('Cannot find an implementation of the "%s" '
AttributeError: Cannot find an implementation of the "IPasswordStore" interface named "HtDigestStore".  Please update the option account-manager.password_store in trac.ini

Trac Config:

# -*- coding: utf-8 -*-

[account-manager]
password_file = /home/usr/trac_sites/trac.passwd
password_format = htpasswd

[attachment]
max_size = 262144
render_unsafe_content = false

[browser]
downloadable_paths = /trunk, /branches/*, /tags/*
hide_properties = svk:merge
render_unsafe_content = false

[changeset]
max_diff_bytes = 10000000
max_diff_files = 0
wiki_format_messages = true

[components]
webadmin.* = enabled
trac.web.auth.LoginModule = disabled
acct_mgr.web_ui.LoginModule = enabled

[header_logo]
alt =
height = -1
link = http://trac.domain.com
src = common/trac_banner.png
width = -1

[logging]
log_file = trac.log
log_level = DEBUG



Appreciate your help!

comment:6 Changed 17 years ago by maidesihoon@…

Resolution: worksforme
Status: reopenedclosed

Just reinstalled trac as I couldn't find a way to fix it & couldn't wait longer to get a response.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Matt Good.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.