Manually re-enable user accounts
Asked by Jefferson Dong:

Hello,

I have a Confluence self-hosted installation that I am currently locked out of. We use the SAML SSO plugin to allow AD domain users to login to the server. As the license we are using is for a limited number of users I had disabled the non-SSO admin user. To make matters worse we temporarily switched the licensing to an unlimited user trial license. Now that the trial license is over, nobody is able to login, including the admin account.

How do I regain control of the server to apply a new license? Is there a manual way to install a license? Can I re-enable the user somehow? Perhaps modify the database directly?


Answers:
author: AnnWorley
body: Hi Jefferson,

You may re-enable the internal administrator account by following these instructions: [Restore Passwords To Recover Admin User Rights](https://confluence.atlassian.com/doc/restore-passwords-to-recover-admin-user-rights-158390.html)

Then you can log in and apply a new license.

If you are using Confluence 6.5.0 or previous, the instructions are different, so make sure and use the older instructions in that case:

[Restore Passwords To Recover Admin User Rights](https://confluence.atlassian.com/conf64/restore-passwords-to-recover-admin-user-rights-936511358.html)

I wish you a smooth login and license update experience. Please let us know any follow up questions.

Thanks,

Ann

comments: author: admin
body: Hi Ann,

Thank you for your response. I have tried the enabling the recovery mode just as the instructions describe but I am still unable to log in.

![image.png](https://community.atlassian.com/t5/image/serverpage/image-id/12972iC480BDBD59822C60/image-size/large?v=v2&px=999 "image.png")

This is what my setenv.sh file looks like.

```
CATALINA_OPTS="-XX:-PrintGCDetails -XX:+PrintGCDateStamps -XX:-PrintTenuringDistribution ${CATALINA_OPTS}"
CATALINA_OPTS="-Xloggc:$LOGBASEABS/logs/gc-`date +%F_%H-%M-%S`.log -XX:+UseGCLogFileRotation -XX:NumberOfGCLogFiles=5 -XX:GCLogFileSize=2M ${CATALINA_OPTS}"
CATALINA_OPTS="-XX:G1ReservePercent=20 ${CATALINA_OPTS}"
CATALINA_OPTS="-Djava.awt.headless=true ${CATALINA_OPTS}"
CATALINA_OPTS="-Datlassian.plugins.enable.wait=300 ${CATALINA_OPTS}"
CATALINA_OPTS="-Xms1024m -Xmx1024m -XX:+UseG1GC ${CATALINA_OPTS}"
CATALINA_OPTS="-Dsynchrony.enable.xhr.fallback=true ${CATALINA_OPTS}"
CATALINA_OPTS="-Dorg.apache.tomcat.websocket.DEFAULT_BUFFER_SIZE=32768 ${CATALINA_OPTS}"
CATALINA_OPTS="-Datlassian.recovery.password=passw0rd123 ${CATALINA_OPTS}"
CATALINA_OPTS="${START_CONFLUENCE_JAVA_OPTS} ${CATALINA_OPTS}"
CATALINA_OPTS="-Dconfluence.context.path=${CONFLUENCE_CONTEXT_PATH} ${CATALINA_OPTS}"
CATALINA_OPTS="-Dpassword.confirmation.disabled=true ${CATALINA_OPTS}"
```


author: AnnWorley
body: That looks correct but the recovery mode is a new feature of Confluence versions higher than 6.5.0. If you are using an older version you will need to use SQL queries as described in [Restore Passwords To Recover Admin User Rights](https://confluence.atlassian.com/conf64/restore-passwords-to-recover-admin-user-rights-936511358.html)  
To check your version, search the \<confluence_home\>/logs/atlassian-confluence.log for the phrase, "Starting Confluence". The startup entry will include the version of Confluence.  
If there is a custom authenticator in \<confluence_install\>/confluence/WEB-INF/classes/seraph-config.xml that is used by the SSO plugin, please comment it out and comment in:  

    <authenticator class="com.atlassian.confluence.user.ConfluenceAuthenticator"/>

Confluence will need to be restarted to pick up changes to configuration files or the database.  


author: Jefferson Dong
body: Going the SQL route worked. I was able to enable and reset the admin password. Thank you for your help!


Tags: user-management