Bulk modify usernames in JIRA

Do you know by any chance if there is another way to modify multiple users? For example I have multiple users that are firstname.lastname@email.com and I want to delete @email.com from their user. 

I tried doing this from the DB but I ended up changing the usernames how I wanted but the users appear  corrupt.

Thanks!

1 answer

1 accepted

This widget could not be displayed.

This needs to be properly tested before done on the production but i have done something very similar a few years back and this approach worked superwell.

  1. Create a local admin account in the internal database if you don't already have one.
  2. Shut down JIRA
  3. dump database
  4. do:

    cat your.jira.db.sql | sed 's/@email.com//g' > your.new.jira.db.sql
  5. Drop the database, recreate an empty database, import the new dump.
  6. Restart Jira and attempt to login with what would be your new username

You might have to login with JIRA using a built in admin account if this fails, in that case you might also have to adjust the JIRA user directory to reflect that you no longer use the email, but another object for usernames on AD or whatever you might use.

Once authentication is done, i warmly recommend you to rebuild all indexes. You will also have to do the same for all other systems that ride on Jira's authentication. An example would be if Confluence uses a JIRA user server for authentication, Confluence database would need the same treatment.

Other things to think of:

If you have users with other email addresses you can piggyback these with more sed statements, but beware that a user can only exist once, so if you have a tony@email1.com and a tony@email2.com you will end up with a conflict.

I warmly recommend you to test, test, test, test and test again on a virtual server that is a close clone of your system before you actually go ahead and do this on a production system. Make sure you back up both databases and filesystems so you can reverse fast. Make it an art, than kick it into gear.

Good luck.

Thanks Jonas, I will try to do this!

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in New to Jira

Are you planning to trial, or are currently trialling Jira Software? - We want to talk to you!

Hello! I'm Rayen, a product manager at Atlassian. My team and I are working hard to improve the trial experience for Jira Software Cloud. We are interested in   talking to 20 people planning t...

155 views 2 0
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