Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Need to change authentication order via SQL commands

Christopher Reitci June 2, 2017

On my Jira Test system I have just added the LDAP authentication connectivity. I then changed the order of authentication to look at LDAP first. Problem is I just locked myself out and I don't know of a local admin ID I can use (the original installers did not keep that info around).

Rather than re-installing the software over again I want to go into the SQL db and change the authentication order to where JIRA Internal Directory is first, then restart Jira.

What SQL commands can I use to do this?

I am using Jira v7.1.9

2 answers

1 accepted

1 vote
Answer accepted
AnnWorley
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
June 2, 2017

The table you want is cwd_directory. 

Start with 

select * from cwd_directory;

Note the id column for the LDAP and JIRA Internal directories (check the directory_name column)

The id for LDAP is probably 0, set it to a temporary value, like 2, to free up 0 for your Internal Directory:

update cwd_directory set directory_position = 2 where id = <LDAP id from previous query>;

Then use a similar update statement to change the Internal directory position to 0. Afterward, change the temporary 2 to 1 so the directory_position column is 0 and 1.

David Martin
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 6, 2017

Yes this worked for me.  Now the search order is Jira Internal Directory first, the Active Directory.

 

Christopher Reitci June 6, 2017

This worked for me and I am able to get into my Jira again.  Thanks.

0 votes
Nic Brough -Adaptavist-
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 2, 2017

Have a look at https://confluence.atlassian.com/jira/retrieving-the-jira-administrator-192836.html

A lot of it is about changing passwords and groups etc, but there's also instructions on changing the order and enabling different  directories in there.

Christopher Reitci June 6, 2017

Thanks Nic.  This was resolved by changing the authentication order above - but your link to manually create a local admin user would have been my backup plan.

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, atlassian government cloud, fedramp, webinar, register for webinar, atlassian cloud webinar, fedramp moderate offering, work faster with cloud

Unlocking the future with Atlassian Government Cloud ☁️

Atlassian Government Cloud has achieved FedRAMP Authorization at the Moderate level! Join our webinar to learn how you can accelerate mission success and move work forward faster in cloud, all while ensuring your critical data is secure.

Register Now
AUG Leaders

Atlassian Community Events