Unable to login

gsmhp July 11, 2019

We have a self hosted Jira instance.   After adding Active Directory user directories and possibly disabling the Jira directory, I can no longer login with a Jira Administrator account.  Is there a way to reset a user account without being able to login to the front end of the application?

I do have full access to the database and server running Jira.

1 answer

0 votes
Andy Heinzer
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
July 12, 2019

Hi Sanjay,

Sorry to hear about this problem.  I understand you recently enabled an LDAP user directory and might have disabled the internal Jira user directory and can no longer login to Jira.

I would recommend walking through the guide in Retrieving the JIRA Administrator.  While Jira 7 and higher has a recover mode you can specify in the JVM startup options, if that approach does not work, then I would be interested to see if you can run the following SQL queries against the Jira database and in turn perhaps I can guide you that way:

  1. To find out which group(s) have been granted the JIRA Administrators global permission, run the following database query:

    select group_id from globalpermissionentry where PERMISSION='ADMINISTER';
  2. To find out which group(s) have been granted the JIRA System Administrators global permission, run the following database query:

    select group_id from globalpermissionentry where PERMISSION='SYSTEM_ADMIN';
  3. Now that you know which group(s) have the global permission, run the following database query to find out which users are in that group (replace "jira-administrators" with the group returned by the above query):

    select child_name, directory_id from cwd_membership where parent_name='jira-administrators';

and then also

4. This shows us a list of all the user directories in Jira.

select * from cwd_directory;

With these 4 query results we should be able to understand the user directories, groups, and system admins account names.  It can then be possible to adjust these via SQL as a means to be able to login to Jira again.

Regards,

Andy

Suggest an answer

Log in or Sign up to answer