Confluence 3.5 : Restoring Passwords To Recover Admin User Rights
This page last changed on Mar 14, 2011 by akdominguez.
Use this document if you are unable to login as administrator, to manually replace administrator passwords or give users administration rights. New Confluence User ManagementFrom Confluence 3.5 onwards the user management is handled by Embedded Crowd. Hence in the database, Confluence will refer to the 'CWD_USERS' table to store and refer to its users. When you imported your backup on upgrade, the users in the 'OS_USER' table (for upgrades from versions older than 2.7) or 'USERS' table (for versions 2.7 to 3.4) will have been copied into the 'CWD_USERS' table. Embedded Crowd also introduced the idea of User Directories. Making modifications to users in the database will only fully work for users in Confluence's Internal Directory. The following instructions include extra steps for instances in which the user management has been delegated to external sources (via LDAP, Crowd or Jira). Please refer to the older documentation if you are still using OSUser or AtlassianUser. Learn more about the algorithm Confluence is using. The following instructions have been tested on MySQL and PostgreSQL. Please be cautious when using other databases. Stage One - Identify AdministratorTo find out which usernames have admin privileges, connect to your database using a database admin tool such as DBVisualiser. Please download a database admin tool now if you do not have one installed already. Once installed, connect to your database and retrieve the list of administrator usernames and ids with: select u.id, u.user_name from cwd_user u join cwd_membership m on u.id=m.child_user_id join cwd_group g on m.parent_id=g.id join cwd_directory d on d.id=g.directory_id where g.group_name = 'confluence-administrators' and d.directory_name='Confluence Internal Directory'; If there are multiple results, choose one id/username combination to use for the following stages. Stage Two - Replace Administrator PasswordConfluence does not store passwords in plain text in the database, but uses hashes computed from the original password. You will need to insert a hash, rather than the plain password, over the existing password in the database. Below is the hash for the password admin x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A== To change the password to admin for a given username:
For the evaluation embedded database
If No Local Users ExistThere may be no administrators in your Internal Directory. If this is the case, you need to add one:
With Oracle, use sysdate instead of a string to the created column. Stage Three - Put the Internal Directory in first positionStart Confluence, and try logging in with the username of the user you updated/created and the password 'admin'. If this works, skip to Stage Four. Otherwise, your Internal Directory does not have high enough priority. You can fix this like so:
Stage Four - Cleanup
|
![]() |
Document generated by Confluence on Mar 16, 2011 18:34 |