HowTo: Reset failed login count from Confluence database

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

You're seeing CAPTCHA on every Confluence login attempt (due to the number of failed login attempts) and do not have access to the admin UI to reset the failed login attempts. 

Environment

Confluence Server and Data Center

Solution

We strongly recommend you back up your database before you begin.

  1. Shut down Confluence.
  2. Clear all cookies from your browser and close all browsers.
  3. Run the following query to see the current number of failed login attempts for the user name you need to reset (in this example the username is admin):

    SELECT TOTALFAILED, CURFAILED
    FROM LOGININFO
    WHERE username IN (
      SELECT user_key
      FROM user_mapping
      WHERE lower_username = 'admin'
    );
  4. Once you've confirmed that the user name has failed login attempts, run the following update:

    UPDATE LOGININFO
    SET CURFAILED = 0
    WHERE username IN (
      SELECT user_key
      FROM user_mapping
      WHERE lower_username = 'admin'
    );
    1. If you have multiple users to update, you can use the following query by adding each user to it:

      UPDATE LOGININFO
      SET CURFAILED = 0
      WHERE username IN (
        SELECT user_key
        FROM user_mapping
        WHERE lower_username IN ('username1', 'username2'));
  5. Start Confluence and attempt to log in again.
      

Last modified on Mar 9, 2021

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.