Opened 5 years ago

Closed 5 years ago

#9927 closed task (invalid)

changing users from file to session store

Reported by: nmeyer@… Owned by: Steffen Hoffmann
Priority: normal Component: AccountManagerPlugin
Severity: major Keywords: configuration support
Cc: Trac Release: 0.11

Description (last modified by Ryan J Ollos)

Can you provide instructions for migrating users from HtPasswd storage to database, session store?

I'm experiencing problems with cookies(on mod_python) and would like the database only method. Is it possible to copy accounts to the sqlite database? Switching to the other did not bring in existing accounts.

My current trac.ini looks like --

force_passwd_change = true
hash_method = HtPasswdHashMethod
htpasswd_file = /var/www/web_users.passwd
htpasswd_hash_type = crypt
password_file = /var/www/web_users.passwd
password_store = HtPasswdStore
persistent_sessions = true
refresh_passwd = False
user_lock_max_time = 0
verify_email = true

Thanks for any advice.

Attachments (0)

Change History (3)

comment:1 Changed 5 years ago by Ryan J Ollos

Description: modified (diff)

comment:2 Changed 5 years ago by Steffen Hoffmann

Keywords: support added

Hm, you should have asked such a support question regarding local installation and configuration via the mailing-list or IRC channel #trac @

Anyway, you need to allow for an account migration period, because nobody else than the user (at login time) can give the valid password for writing the new entries, you see?

You'll want to activate the second user store as the 1st one to make it preferred, and set refresh_passwd to actually make the desired re-write happen. This is painless, because it's totally transparent to users. But please see and follow my other suggestion in comment below as well:

# general, enable the migration, prefered (target) is 1st
password_store = SessionStore,HtPasswdStore
refresh_passwd = true

# SessionStore options
hash_method = HtPasswdHashMethod
# new option, SHA is a good start, still stronger ones are available too
db_htpasswd_hash_type = sha

# HtPasswdStore options
# new option, old one is depreciated in recent (trunk) versions of AcctMgr
#password_file = /var/www/web_users.passwd
htpasswd_file = /var/www/web_users.passwd
# better use as stronger hash, crypt is know to be weak and limited in passwd length
# but just for new passwords, so disregard, if you move away from that store anyway
#htpasswd_hash_type = crypt
htpasswd_hash_type = md5

# on password reset ...
force_passwd_change = true
# optional cookie lifetime setting, needs to be enabled by checking a checkbox on login time
persistent_sessions = true
# be sure to check this, because it's effective account brute-force login protection
user_lock_max_time = 0
verify_email = true

comment:3 Changed 5 years ago by Steffen Hoffmann

Keywords: configuration added
Resolution: invalid
Status: newclosed

As mentioned before, this is a Trac instance for hackers involved into Trac plugin development, not for your personal tasks.

Still you should have got enough hints to proceed with your work. Without response from your side you can hardly expect more help, right?

Please ask at the Trac-users mailing-list, if you need more assistance.

Modify Ticket

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.