JIRA password reset after Import

I am importing a customers JIRA on a 4.4 (Exported from a 4.4)

But I cant login no matter what afterwards. I am running:

Disable CROWD:

{code}

update cwd_directory set active=0 where id=2;

{code}

Reset password as in: https://confluence.atlassian.com/display/JIRA044/Retrieving+the+JIRA+Administrator:

{code}

update cwd_user set credential='uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' where user_name='admin';

{code}

Reset Capcha

{code}

update cwd_user_attributes set attribute_value=0,lower_attribute_value=0 where user_id=10000 and (attribute_name='login.currentFailedCount' or attribute_name='login.totalFailedCount');

{code}

Eller

{code}

update cwd_user_attributes set attribute_value=0,lower_attribute_value=0 where user_id=10000;

{code}

I have used diffent versions of the last SQL.

Login just fails, there are nothing in the catalina.out and after 3 tries, Captcha is required...

I can see the cwd_user_attributes table being updated and JIRA is restartet after SQL's

4 answers

1 accepted

This widget could not be displayed.

Hi Normann,

No DB hacking of the target JIRA instance should be necessary in order to achieve this, as long as you ensure that you replace the admin user's hashed password in the exported entities.xml file (inside the export zip file) before importing into the target JIRA instance.

Note: this solution only applies to scenarios involving an XML export.

Cheers,
Thomas

This widget could not be displayed.
Yilin Mo Atlassian Team Jan 10, 2013

You can try the following :

insert into cwd_user (id, user_name, lower_user_name, active, created_date, updated_date, first_name, lower_first_name, last_name, lower_last_name, display_name, lower_display_name, email_address, lower_email_address, directory_id, credential)
values (8888, 'admin','admin','1', '2011-07-06 00:00:00','2011-07-06 00:00:00','System','system','Administrator','admin','System Administrator','system admin','admin@crowd','admin@crowd',(select id from cwd_directory where directory_type='INTERNAL'),'{PKCS5S2}Z+3vUbE1FStQUuVWdnKkCmdpH8ebqvsJQYJG9fMoPm5A52fKDas7+nXYg3J15EzP');

insert into cwd_membership (id, parent_id, child_id, membership_type,group_type,parent_name,lower_parent_name,child_name, lower_child_name,directory_id)
values (7777, (select id from cwd_group where group_name = 'jira-administrators' and directory_id = 1), 8888, 'GROUP_USER', 'GROUP', 'jira-administrators','jira-administrators', 'admin', 'admin', (select id from cwd_directory where directory_type='INTERNAL'));

insert into cwd_membership (id, parent_id, child_id, membership_type,group_type,parent_name,lower_parent_name,child_name, lower_child_name,directory_id)
values (6666, (select id from cwd_group where group_name = 'jira-developers' and directory_id = 1), 8888, 'GROUP_USER', 'GROUP', 'jira-developers','jira-developers', 'admin', 'admin', (select id from cwd_directory where directory_type='INTERNAL'));

insert into cwd_membership (id, parent_id, child_id, membership_type,group_type,parent_name,lower_parent_name,child_name, lower_child_name,directory_id)
values (5555, (select id from cwd_group where group_name = 'jira-users' and directory_id = 1), 8888, 'GROUP_USER', 'GROUP', 'jira-users','jira-users', 'admin', 'admin', (select id from cwd_directory where directory_type='INTERNAL'));

update schemepermissions set perm_parameter='jira-administrators' where permission=44;

After restart JIRA, you should be able to logon as login/password : admin/admin.

:)

Did not work, are You sure that JIRA 4.4 supports the "'{PKCS5S2}Z+3vUbE1FStQUuVWdnKkCmdpH8ebqvsJQYJG9fMoPm5A52fKDas7+nXYg3J15EzP'" string?

update cwd_user set credential='uQieO/1CGMUIXXftw3ynrsaYLShI+GTcPS4LdUGWbIusFvHPfUzD7CZvms6yMMvA8I7FViHVEqr6Mj4pCLKAFQ==' where user_name='admin';

Did not change anything

This widget could not be displayed.

Hi Normann,

One thing that comes to mind is that the directories might not be in the correct order, although it doesn't seem to document it in the JIRA docs like it does in the Confluence docs so maybe you could try running the queries in the Confluence docs and see whether this works for you: https://confluence.atlassian.com/display/DOC/Restoring+Passwords+To+Recover+Admin+User+Rights#RestoringPasswordsToRecoverAdminUserRights-Step3.PuttheInternalDirectoryinFirstPosition

All the best,
John

Thanks for the input, everything is apprciated, but I do think it should be ok:

jira_44=# select id,directory_name,active from cwd_directory;
 id |     directory_name      | active 
----+-------------------------+--------
  1 | JIRA Internal Directory |      1
  2 | Remote Crowd Directory  |      0
(2 rows)

jira_44=#

That does indeed look correct Normann. One thing that sometimes causes this can be the browser caches, so I'd suggest you also try clearing those, (or just changing browsers), and see whether you can login after that. Strange as it seems, sometimes it does actually work.

No luck either; FF, Safari, Chrome.... Postgres restart, jira restart...

update cwd_directory set directory_position=0 where ID=1 ? Not sure if this still require when CROWD is already inactive though

Tried to switch positions, made no difference - But thanks anyway :-)

This widget could not be displayed.
Yilin Mo Atlassian Team Jan 10, 2013

100% sure JIRA 4.4 support this, and I use this cross DB type to initial JIRA instance.

May be you should fire a support ticket for this :)

Well, the system is not under support :-/

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

Atlassian Research Workshop opportunity on Sep. 28th in Austin, TX

We're looking for participants for a workshop at Atlassian! We need Jira admins who have interesting custom workflows, issue views, or boards. Think you have a story to sha...

40 views 2 2
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you