Use this document if you are unable to login as administrator, to manually replace administrator passwords or give users administration rights.

Follow the instructions for either the Embedded Database or External Database. If you have not configured a database, use the Embedded instructions.

Embedded Database Instructions

Stage One - Identify Administrator

This guide assumes that the first user added was an administrator. If this is not the case, search for the admin username and find their user id number, then modify their password has instead.

  1. Confluence をシャットダウンします。
  2. In your Confluence home directory, open \database\confluencedb.script file in a text editor
  3. Search for the text:
    INSERT INTO OS_USER VALUES(1
    
    To find the administrator login entry:
    INSERT INTO OS_USER VALUES(1,'USERNAME','PASSWORD_HASH')
    
    Where the 1 is the user id number, and USERNAME and PASSWORD_HASH are actual values.
  4. This step makes admin the administrator's password. Confluence does not store passwords in plain text in the database, but uses hashes computed from the original password. The hash for the characters admin is below:
    x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==
    
    Paste the admin password hash between the '' characters of their existing PASSWORD_HASH. The new administrator login entry should look like:
    INSERT INTO OS_USER VALUES(1,'USERNAME','x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==')
    
    Where USERNAME is the administrator username.
  5. Save the file
  6. Start up Confluence
  7. Login with the administrator username and password admin

External Database Instructions

Stage One - Identify Administrator

To 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 with:

select username from os_user u, os_group g, os_user_group ug where u.id = ug.user_id and g.id = ug.group_id and g.groupname = 'confluence-administrators'

Stage Two - Replace Administrator Password

Confluence does not store passwords in plain text in the database, but uses hashes computed from the original password. You instead cut and a paste a hash, rather than the plain password, over the existing password. Below is the hash for the password admin

x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==

To change the password to admin for a given username:

  1. Confluence をシャットダウンします。
  2. Connect to your database. If you are using internal user management, run this SQL:
    update os_user set passwd =
    'x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A=='
    where username='<USERNAME>';
    
    If you are using LDAP integration for user managment (not only authentication) then your admin user will be in a different table. The SQL to run is:
    update users set password =
    'x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A=='
    where name='<USERNAME>';
    
  3. Confluence を起動します。
  4. Login with your modified username and use password admin
  • ラベルなし