Access inaccessible Confluence instance? (I disabled the internal user directory)
Asked by Scott Beeson:

So I set Confluence to use the JIRA user directory. I then disabled the confluence user directory. Everything was fine until my cookie expired. Now I can't login to Confluence with my admin account or any other account.

Here is what my Confluence cwd_directory table looks like currently:

|--------|-------------------------------|-------------------------------|-------------------------|-------------------------|---|---------------------------------------|----------------------------------------------------|----------------------------------------------------|----------|
| 360449 | Remote JIRA Directory         | remote jira directory         | 2015-05-27 10:05:09.397 | 2015-06-29 15:41:48.097 | 1 | NULL                                  | com.atlassian.crowd.directory.RemoteCrowdDirectory | com.atlassian.crowd.directory.remotecrowddirectory | CROWD    |
| 360450 | Confluence Internal Directory | confluence internal directory | 2015-05-27 10:05:10.180 | 2015-06-29 15:40:25.350 | 1 | Confluence default internal directory | com.atlassian.crowd.directory.InternalDirectory    | com.atlassian.crowd.directory.internaldirectory    | INTERNAL |

And here is my JIRA cwd_directory table (JIRA does work, I can login fine)

|---|-------------------------|-------------------------|-------------------------|-------------------------|---|------|-------------------------------------------------|-------------------------------------------------|----------|---|
| 1 | JIRA Internal Directory | jira internal directory | 2013-02-28 11:57:51.307 | 2015-06-29 15:44:35.603 | 1 | NULL | com.atlassian.crowd.directory.InternalDirectory | com.atlassian.crowd.directory.internaldirectory | INTERNAL | 0 |


Answers:
author: Siddheshwar mhetre
body: Hi,

You can try the following steps to enable the Directory

1. Use a native client to connect to your database
2. Run the following SQL:

   |--------------------------------------------------------|
   | **`UPDATE ``cwd_directory ``SET`` active = ``'T'``;`** |

   ![information](/html/@4DF2F60CA30FBCA0CD7B960B5D0F871B/images/emoticons/information.png "information") The value of 'T' may need to be changed to match the 'true' value in your database. The above is for PostgreSQL.
3. Restart Confluence and all the user directories will be enabled.

regards,

Siddheshwar.

comments: author: Scott Beeson
body: It's MSSQL. I tried setting it to 1 and that didn't fix the issue.


author: Scott Beeson
body: Updated original question with more information.


author: Scott Beeson
body: I just tried T out of desperation. Still can't login.


author: Siddheshwar mhetre
body: Thanks for more info,You can restore your admin password by using the following link.<https://confluence.atlassian.com/display/DOC/Restoring+Passwords+To+Recover+Admin+User+Rights>This link helps you to restore you password from database.


author: Scott Beeson
body: Siddheshwar could you post that as an answer?


author: Guilherme V.
body: Hi Scott, after executing the query that [Siddheshwar](https://answers.atlassian.com/questions/users?username=siddheshwar%20mhetre) commented, you have to restart your Confluence's service.

You can also create the following groups into Jira:

* confluence-user
* confluence-administrator

And add these groups into your Jira's user.


Tags: confluence-administration