Disabling a User Directory via JIRA database method

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

Symptoms

At times, administrators may need to disable their LDAP/Crowd directory to allow for internal users to log in.  This can occur if JIRA suddenly loses communication to LDAP or maybe you're running an enclosed test environment.

Resolution

This involves direct database manipulation which is not recommended by Atlassian. Please ensure that backup your data before proceeding.

You can disable all non-internal directories with below query.
(info) Note: by default the internal directory will always have the ID of 1. So in the above query, all other directories will be disabled.

update cwd_directory set active = 0 where id != 1;

If you prefer to disable a specific user directory, then extract the directory id from below query and then substitute in the subsequent update query.

SELECT id, directory_name FROM cwd_directory WHERE directory_name = '<Name of the Directory to be disabled>'; --> Query to retrieve the directory id to be disabled.

UPDATE cwd_directory set active = 0 where id = <ID value returned from above query>; --> Query to disable the specific user directory.

(info) Note: Since these are database level changes, it needs Jira restart for changes to be effective.


Last modified on Oct 23, 2023

Was this helpful?

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