Modify

Opened 8 years ago

Closed 8 years ago

#12907 closed enhancement (worksforme)

Multiple independent projects with separate htpasswd files not working for me

Reported by: BillChappell Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: major Keywords: multiple independent projects
Cc: Trac Release: 1.0

Description (last modified by Jun Omae)

I just installed trac for the first time, so I may well have missed something in my configuration, but here is where I am:

Ubuntu 16.04 LTS, apache2 installed using apt-get, trac installed

  1. sudo –H pip install - -upgrade pip
  2. sudo –H pip install - -upgrade Genshi
  3. sudo –H pip install - -upgrade setuptools
  4. sudo –H pip install trac

used mod_python

Installed AccountManager using HtPasswd as per here https://pypi.python.org/pypi/TracAccountManager

I have 3 independent projects each with own htpasswd file

My experience is that I can only enable Account Manager for one project at a time, including that other projects cannot even have AccountManager egg in /var/trac/<project>/plugins and the egg-cache as well as removing Account Manager entries from trac.ini. Otherwise, the enabled/disabled state of trac.web.auth.loginmodule carries from one project to the other and I lose the ability to login to either the project with Account Manager or the other 2.

trac.ini for project with Account Manager:

[account-manager]
account_changes_notify_addresses = chappewr@critical.com
allow_delete_account = false
htpasswd_file = /var/trac/TEST/test.htpasswd
htpasswd_hash_type = md5
notify_actions = new,change,delete
password_store = HtPasswdStore
[components]
acct_mgr.htfile.htdigeststore = enabled
acct_mgr.web_ui.accountmodule = enabled
trac.web.auth.loginmodule = disabled

I copied and pasted htfile as htpasswdstore from trac install instructions, but it appears as htdigeststore (and works).

trac.ini for other projects only has:

[components]
trac.web.auth.loginmodule = enabled

Please tell me what I am doing wrong or if what I am trying to do is a new feature request. Thanks.

Attachments (1)

testchgpw.cgi (3.8 KB) - added by BillChappell 8 years ago.
Script I found on perlmonks and modified as work-around

Download all attachments as: .zip

Change History (4)

comment:1 Changed 8 years ago by Jun Omae

Description: modified (diff)

Changed 8 years ago by BillChappell

Attachment: testchgpw.cgi added

Script I found on perlmonks and modified as work-around

comment:2 Changed 8 years ago by BillChappell

Because authentication method I am using actually belongs to Apache, not Trac, I found the following http://www.perlmonks.org/?node_id=178482, modified it to use the password file specific to the project, to get the user/user_id from the form instead of an existing login, and to work around the "sticky" CGI textfield I created by the change to user_id. Many thanks to greenFox for the original script. The user/user_id change was made necessary by my inability to make my script work from within the Trac project/Virtual Host. Hope this work-around helps someone else.

comment:3 Changed 8 years ago by Ryan J Ollos

Resolution: worksforme
Status: newclosed

I think you have an InstallationIssue. I'll reply to your post trac-users:fePy1WvsfXA/l-uYetSKAwAJ.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Steffen Hoffmann.
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.