How to bulk set users to inactive via SQL

Mick Flanigan August 20, 2013

Trying to take all users in Internal Directory and set tehm to inactive status, however testign out our SQL it does not seem to make a user inactive. We set active = 0 where user is in directory 1 (internal) for a specific user. We can see the changes take place in the cwd_user table, however I can still login as that user. if I set the user to inactive using the Edit mode in JIRA, I can see in SQL the active flag sets to 0, and I no longer can login as this user. What is missing? I looked at the scheme and we are not seeing where else we need to change to make the user inactive. We have 300+ users in our internal directory we want to force to login with AD, and wish to set all to inactive on internal directory.

2 answers

1 accepted

1 vote
Answer accepted
Bruna Griebeler
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 20, 2013

Hi Mick,

Sorry if my answer seems silly, but just to make sure. Are you restarting Jira after making the changes on the database?

Also, if you want to use AD as primary Directory, you can put the Internal on the second position and the AD on the top. Afetr that you can disable the Internal, this will make all users inside this directory to be automaticaly disabled.

0 votes
Mick Flanigan August 20, 2013

Hi Bruna, thansk for the answer. We had not restarted JIRA, apparantly it caches this data. We do have AD as primary and Internal as secondary, but we want to leave internal running since we have our emergency login if AD goes down, as well as some rest script logins there. Thanks!

Suggest an answer

Log in or Sign up to answer