I recently had a request to grant a new user access to a legacy Confluence install at work. This particular server was in active use from 2013-2018ish and runs Confluence 3.1 standalone (Apache & mySQL).
The big problem was that nobody knew any credentials.
I started out by browsing to the configuration in C:\confluence\confluence-3.1-std\conf\server.xml
. Luckily, I found some credentials to connect to the mySQL instance:
<property name="hibernate.connection.driver_class">com.mysql.jdbc.Driver</property>
<property name="hibernate.connection.password">conf*w0rk</property>
<property name="hibernate.connection.url">jdbc:mysql://localhost/confluence?autoReconnect=true</property>
<property name="hibernate.connection.username">confluenceuser</property>
<property name="hibernate.database.lower_non_ascii_supported">true</property>
<property name="hibernate.dialect">com.atlassian.hibernate.dialect.MySQLDialect</property>
I was then able to follow Atlassian’s documentation on Restoring Passwords To Recover Admin User Rights.
First, I ran a query against the database using MySQL Query Browser to identify existing administrators. This returns the users who belong to the Confluence-Administrators group:
select name from users u, local_members l, groups g where g.groupname = 'confluence-administrators' and g.id=l.groupid and u.id=l.userid;
administrator
confadmin
wikiadmin
Let’s reset the password for ‘administrator’. I began by stopping Confluence via. the shutdown.bat
script.
Then, I used mySQL Query Browser again to reset the administrator account’s password to admin
:
update users set password = 'x61Ey612Kl2gpFL56FT9weDnpSo4AV8j8+qx2AuTHdRyY036xxzTTrw10Wq3+4qQyB+XURPWx1ONxp3Y3pB37A==' where name='administrator';
After the password was reset, I started Confluence again via. the ‘startup.bat’ script. I then logged in as administrator:admin and used Confluence’s interface to add a new user account.