How to activate inactive user (LDAP)

Deleted user August 22, 2016

Hi guys!

My case looks like this:

  1. We have user sync via LDAP to AD for a long time.
  2. Today for the first time we have created a new user in AD with a power shell script.
  3. That script created user in "disabled" state.
  4. This user poped-up in Jira, but in "inactive" state.
  5. Next we have corrected his name and activated account in AD. In every other service this user works and can login.
  6. Name has changed in JIRA too (so synchronization is working) but that user is still inactive.

There is no activate button, because of LDAP synchronization.

My JIRA version is 6.4.1
We have 26 user licenses left.

 

9 answers

4 votes
marek_knappe February 7, 2017

update wd_user set active=1 where user_name='there_username';

John Rutherford April 30, 2018

** typo

update cwd_user set active=1 where user_name='there_username';
Like Ann Kristin likes this
Jonathan Lucas February 22, 2019

this seems to require a restart of Jira, doesn't it? At least I just tested this in dev and had no luck until the restart of Jira service on my Linux machines...

Ann Kristin February 22, 2019

You must shut down Jira before doing anything to the database like this.
When done, start it again.

To be sure if the "active" property is the problem, run this query first:
SELECT active FROM cwd_user WHERE USER_NAME = 'the_username';

If result is active=0, then run the query suggested by the others.

Jonathan Lucas February 22, 2019

many thanks Ann Kristin for the heads-up and the hint that all app server(s) need to be down. Will try my best (so much efforts for a single user...) to find an appropriate slot for a downtime ;)

Pujan Ziaie February 24, 2019

we got the same problem. Is this a bug in Jira? Updating db manually is a pain

Jonathan Lucas February 25, 2019

not sure that this is a real bug. It seems to be more kind of an artifact from earlier usage of the Jira internal user directory on our side and now switching over to Active Directory (user was disabled back then and should now be "re-activated" via AD).

Ann Kristin February 25, 2019

We have not used the internal user directory earlier, so I don't think that is the only reason this happens at least.  Seems like there is something from AD that makes Jira recognise the user as inactive/disabled.  

Jonathan Lucas April 12, 2019

actually I got this fixed by disabling the option to "filter out expired users". Re-adding did do the trick...err.png

Like # people like this
3 votes
fatma polat March 27, 2018

Any other solution except db update? it is not a good solution such as our company which has lots of users and turnover..

0 votes
sanan sanan March 11, 2019

Hi Nastjak,

 

thanks for you replies. Now I understand why i cannot see this option. We are using Sun Directory Server Enterprise Edition .

 

But for now, we have resolved this issue by increasing the search index limit in the LDAP itself. 

Since, the limit was low Jira and other tools were not able to search users beyond previously set limit. 

Thanks for your answers.

 

Regards

sanan

0 votes
Nastja K February 1, 2019

This solution worked for me without changing anything in the database:

  1. Login with the local account.
  2. Edit your LDAP connector settings and uncheck the following checkbox in Advanced settings section:
    Screen Shot 2019-02-01 at 11.55.44.png
  3. Force the full synchronisation.
sanan sanan March 1, 2019

Hi NastjaK,

 

I am facing the same issue but I am not able to find "Manage User Status Locally" in the LDAP settings. 

We are using Jira 7.13 server version.

 

I login with the local admin id and go the user directories and open the Edit page. But there, I am not able to find anything like "Manage user status locally".

How and where do you get this option

 

Regards

sanan

Nastja K March 9, 2019

Hi sansan,

 

Unfortunately I can't doublecheck this in Jira 7.13, but in Jira 7.10 it's under Advanced settings section.

Screen Shot 2019-03-09 at 18.18.02.png

Nastja K March 9, 2019

And I noticed, that this option is active only if you choose Microsoft Active Directory in Directory type under Server settings section. In other cases it's impossible to change the value of that checkbox :(

Screen Shot 2019-03-09 at 18.23.06.png

0 votes
Deleted user August 31, 2016

Well nope, but it took them like 5 seconds to do it.

No rocket sience for database admins.

0 votes
Ann Kristin August 31, 2016

Hi Lukasz,

Thank you for your answer! I guess we have to do the same thing then. Do you know exactly what they changed in the database?

Ann Kristin February 22, 2019

To answer my own question: 

To verify if this really is the problem, run:

SELECT active
FROM database.schema.cwd_user
WHERE USER_NAME = 'theusersname'; 

 If the result is active: 0, then:
Shut down Jira and run the following query:

UPDATE database.schema.cwd_user SET active = 1 WHERE user_name = 'theusersname';

0 votes
Deleted user August 31, 2016

Hi Ann,

Well actually I have this problem solved with a workaround.

I've asked our database masters to manually change this directly in Jiras database.
Then I needed to restart application server and voilà! User is active.

0 votes
Ann Kristin August 31, 2016

Did you find a solution to this?
We are experiencing the same problem here (not sure how the user was created though), but he pops up in JIRA as "inactive", even though he is not in disabled state in AD.
The user have never been set as inactive/active in JIRA (and it seems that is not an option with LDAP sync).

0 votes
Jonas Andersson
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.
August 22, 2016

Is he fulfilling all demands your organization has? (we use LDAP filters that make sure he has a phonenumber, email, is in the right OU and so forth.

Is he fulfilling all demands JIRA has? (In most cases the user have to be added to group jira-users to become active).

Last thing, if you edit the user in Jira, can you activate the account here?

Deleted user August 22, 2016

Well he does fulfil all demands. Other ways he would not pop up in Jira.

And yes, I have double checked if all data is there.

User is added to group jira-users and jira-delevopers.

I have not edited user in Jira. I have edited him in AD, and changes was synced, but user is still inactive. 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events