It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to rename users in Confluence and move them to new directory

Moshe Hajaj Aug 07, 2011

Hi,

I know that thee is a doc about it, but it is very buggy and doesn't seem to do the work properly (tested on v3.5.7).

In my organization I need to move all the users to a new Active-Directory with a new username, e.g. from username - first.last @ foo.com, to a new username - flast @ bar.com

Did anyone tried such a thing on v3.5.x? Did such a thing worked for you?

If yes I would very appriciate it if you reply with your solution.

Best

Moshe

5 answers

1 accepted

5 votes
Answer accepted
Colin Goudie Aug 07, 2011

Yes it can be done. Recently we have complete a couple of these migrations. (Generally an internal Crowd directory has been replaced with an AD connection)

It sounds like to me the steps in brief would be something like

  1. Remove ALL users from the internal Confluence directory
  2. Add new AD connection and sync, forcing new users to be created with their new usernames
    At this stage, all content in confluence will appear to be from invalid users
  3. Use the scripts you have identified from the link above (but fix it) to rename users to the new user name
  4. RE-INDEX :)

I found for 3.5.x the script above was pretty accurate but I do recall a few minor changes I have had to make. Send me your email I can shoot an update through

Moshe Hajaj Aug 08, 2011

Colin, that would be great. you can mail me to moatlsanswers@suremail.info

Thank you

Moshe Hajaj Aug 08, 2011

I got it, thank you.

I still need to test it, but from first glance I noticed you dropped this statment (it is part od Atlassian doc):

update OS_PROPERTYENTRY a, usermigration u
set a.entity_name = concat('CWD_', u.newusername)
where a.entity_name = concat('CWD_', u.oldusername);

Any reason why?

0 votes
Brendan Patterson Aug 07, 2011

We have done this in the past but did so following that doc and though far from ideal is the only real solution.

There are only two other options I'm aware of.

One is integrating Crowd and determining if it's "user aliasing" features meet your needs.

The other is to implement a custom authenticator for Confluence which would replace usernames on the fly as you need. However all the Confluence content would still have the original names embedded in all but the first solution - which shouldn't really matter.

Brendan

0 votes
aseith Nov 03, 2011

Hi guys,

are local group memberships preserved when doing this migration? For older versions of Confluence, this has worked for us pretty well, but recent versions seem to discard memberships. Or maybe I'm wrong?

Alex

Fajar Suryawan Jun 06, 2013

Hi Aseith, how was the migration? Is the local group preserved? Let us know. Here we have to do the same migration process. :-)

Thanks

Fajar

0 votes
Pierre Major Jul 31, 2012

Hi Guys,

I had to move a user from the "Confluence internal directory" to a "Delegated LDAP Authentication". The user has the same username in both directories, so I did not had to change it.

What I did is: put the "internal directory" down in the list of user directories (, under the "ldap" one. And tadada, the user got migrated. There is very little side effect to the process (in our case) because the user was the only real user in the internal directory.

Pierre

0 votes
aseith Jun 20, 2013

Fajar,

to cut a very long story short: no, local groups were not preserved. We wrote a couple of ugly scripts and sql queries to work around it and luckily it has been working without any major issues so far.

Regards

Alex

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Statuspage

⭐️Would you recommend Statuspage? Leave a (honest!) review. ⭐️

Hi Community friends, We're working on sourcing more reviews on Capterra – a popular software review site –  to help teams like yours make more informed decisions when choosing an inc...

44 views 2 3
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you