Export stash user/group to crowd
Asked by Bastien Chong:

I'd like to setup Stash to use Crowd. I have configured the link, but it seems like it's not possible to export Stash's users/group to Crowd.

So I guess I have to transfert everything manually ? Now the question is, what about the built-in group like System Admin/admin/project Creator. What's the correct name I would need to use to recreate them inside Crowd ?


Answers:
author: Caspar Krieger
body: **Official answer:**Unfortunately there's no Stash importer in Crowd yet, so you will have to do it manually unless you can export your Stash users to CSV and then use Crowd's CSV importer.

**Completely unsupported, 100% at your own risk alternative:** Depending on how adventurous you are feeling and the number of users you have, you may be able to make this process a bit more straightforward by first creating an Internal Directory in Crowd which uses the same password encoding as your user configuration in Stash, and then copying the cwd_user, cwd_group, and cwd_membership tables from Stash's database to Crowd's database, because they both use the same format to store users, groups, and memberships. You will need to update any references to directory_id in these tables to match the id of the new directory in Crowd. User and group attributes will be lost this way. **This is completely speculative; I haven't tried it, we will not support it, and it may not even work.**

As far as the built in groups with special meanings go, you shouldn't have to worry about that; I suggest you connect a separate evaluation version of Stash to an evaluation version of Crowd and follow the instructions in [](https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Atlassian+Stash)<https://confluence.atlassian.com/display/CROWD/Integrating+Crowd+with+Atlassian+Stash>and [](https://confluence.atlassian.com/display/STASH/Connecting+Stash+to+Crowd)<https://confluence.atlassian.com/display/STASH/Connecting+Stash+to+Crowd>

If that doesn't work out of the box for you, please raise a support request and we'll be happy to help you get it working :)

comments: author: Bastien Chong
body: Hi Caspar,

Thanks for the answer. I don't understand why I shouldn't worry about the built-in groups. If I recreate all my users inside crowd and then link it to STASH as my primary user directory, I will want my user to be in those admin group, no ? (something similar to jira-administrators that is imported for example)

Or that mean that part for global permissions are still handled by STASH, and I just have to make sure my users in Crowd are using the same username and that way, the global permissions will still know who we are ?


author: Caspar Krieger
body: Apologies for the late reply. I *suspect* you won't have to worry about the special groups because I would *expect* that Stash still uses the same special groups when it gets connected to a remote Crowd instance, and because those groups still exist in Crowd it should "just work". But really, this is now speculation on my part, which is why I suggested that you try it and see if it works ;) Or, if you open a support request for Stash, you should be able to get a better answer, if you haven't already.


Tags: bitbucket-server