Move one user back to Internal directory from Delegated

Vidar Hegre October 7, 2012

Hello Jira Community,

A week back we got some help to move all our users from Internal to Delegated authentication. Now it seems that we have one user gandalfx which has the wrong name (should be gandalfy) for LDAP authentication. He is registered in the Delegated directory but cannot be looked up since his short name (userid) is wrong. He cannot set his password since he is delegated. And since we cannot change his username in Jira (id field) and cannot change his username in AD we are stuck. How can we move this one user back to the internal directory so he doesn't lose all his issues and history? Looked at some suggested sql query scripts on the comments in JRA-24213 but it seemed a bit risky. Any other suggestions?

Regards,

Vidar

4 answers

1 accepted

2 votes
Answer accepted
fsim
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.
October 9, 2012

I think this would help other users as well.

UPDATE cwd_user SET directory_id = 1, credential = 'uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' where user_name = 'gandalfx';

After that, login with the password "sphere". Might need to reassign the internal JIRA groups to this user though
0 votes
Vidar Hegre November 29, 2012

We did this on Jira 5.1. And we only needed to change the directory_id column in the cwd_user. But afterwards the user lost the group memberships and we had to reapply this. Maybe because of the columns you are referring to but easier just to add the groups to the user afterwards :-)

Vidar

0 votes
M November 29, 2012

What version of JIRA did you execute the above SQL on?

I have JIRA 4.3.4, and looking in the tables "cwd_user_attributes" and "cwd_membership", I see that they, and others, also have a column named "directory_id". Does this column in these tables need to also be updated at the same time when the table "cwd_user" is updated?

thanks,

-markus

0 votes
Vidar Hegre October 14, 2012

This worked for us :-) But had to restart the Jira service to get it applied.

Vidar

Suggest an answer

Log in or Sign up to answer