On Wednesday, 8 December 2010 14:41:50 UTC+1, Matthew Caron wrote: > > > I'm probably missing some tables which need to be updated. >
I was able to successfully rename users (even admin users) with the following steps: 1. I created new entries in the htpasswd file so that the new username could actually log on. 2. Inside the database (opened with sudo sqlite3 trac.db ) I looked for all fields containing usernames. Then I was able to run replace commands: UPDATE attachment SET author = replace( author, 'old_username', 'new_username' ) WHERE author LIKE 'old_username'; UPDATE component SET owner = replace( owner, 'old_username', 'new_username' ) WHERE owner LIKE 'old_username'; UPDATE permission SET username = replace( username, 'old_username', 'new_username' ) WHERE username LIKE 'old_username'; UPDATE session SET sid = replace( sid, 'old_username', 'new_username' ) WHERE sid LIKE 'old_username'; UPDATE session_attribute SET sid = replace( sid, 'old_username', 'new_username' ) WHERE sid LIKE 'old_username'; UPDATE ticket SET owner = replace( owner, 'old_username', 'new_username' ) WHERE owner LIKE 'old_username'; UPDATE ticket SET reporter = replace( reporter, 'old_username', 'new_username' ) WHERE reporter LIKE 'old_username'; UPDATE ticket SET cc = replace( cc, 'old_username', 'new_username' ) WHERE cc LIKE 'old_username'; UPDATE ticket_change SET author = replace( author, 'old_username', 'new_username' ) WHERE author LIKE 'old_username'; UPDATE wiki SET author = replace( author, 'old_username', 'new_username' ) WHERE author LIKE 'old_username'; 3. After checking that the new username logins worked, I deleted the old username entries from the htpasswd file so that nobody could accidentally log in with the obsolete name. This worked without problems. -- You received this message because you are subscribed to the Google Groups "Trac Users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/trac-users. For more options, visit https://groups.google.com/d/optout.
