{"id":643,"date":"2015-06-12T19:48:40","date_gmt":"2015-06-12T19:48:40","guid":{"rendered":"http:\/\/192.168.1.102\/?p=643"},"modified":"2015-06-12T19:48:40","modified_gmt":"2015-06-12T19:48:40","slug":"moving-ad-groups-from-one-domain-to-another-using-ldifde","status":"publish","type":"post","link":"https:\/\/digitalsos.net\/?p=643","title":{"rendered":"Moving AD groups from one domain to another using ldifde"},"content":{"rendered":"<p>This is something that I almost never do so I&#8217;m documenting it here to avoid future mistakes.<\/p>\n<p>We are migrating between domains and while we considered ADMT, there was too much clutter and our AD structure changed.\u00a0 So a piece meal approach was decided on.\u00a0 Hint to future self, don&#8217;t do this again, use ADMT!<\/p>\n<p>I&#8217;m transferring groups but this has proved problematic.\u00a0 Two main reasons for this, the AD structure is different and the Domain is different.<\/p>\n<p>Big lesson first up is that you need to exclude many SAM entry&#8217;s using the -o modifier.\u00a0 My command for groups striped out everything but member.\u00a0 However all the member mappings changed so I excluded them as well.\u00a0 I ended up with:<\/p>\n<blockquote><p>ldifde -f exportfile.ldf -s &lt;serverName&gt; -d &#8220;OU=Tomcat,OU=Security Groups,OU=IBM,DC=&lt;domain&gt;,DC=&lt;domain&gt;,DC=local&#8221; -r &#8220;(objectCategory=CN=group,CN=Schema,CN=Configuration,DC=&lt;domain&gt;,DC=&lt;domain&gt;,DC=local)&#8221; -o &#8220;badPasswordTime,badPwdCount,lastLogoff,lastLogon,logonCount,memberOf,objectGUID,objectSid,primaryGroupID,pwdLastSet,sAMAccountType,member&#8221;<\/p><\/blockquote>\n<p>Now to bring that over.\u00a0 I can convert using the -c option.\u00a0 In my case the OU&#8217;s lined up on the other side so the command was:<\/p>\n<blockquote><p>ldifde -i -f exportfile.ldf -s &lt;serverName&gt; -k -v -c &#8220;DC=&lt;domain&gt;,DC=&lt;domain&gt;,DC=local&#8221; &#8220;DC=&lt;domain&gt;,DC=&lt;domain&gt;,DC=org&#8221;<\/p><\/blockquote>\n<p>I have all the groups but no membership.\u00a0 Use ADMT next time.<\/p>\n<p>Errors that you can get with any of the SAM accounts is discussed here: <a href=\"https:\/\/support.microsoft.com\/en-us\/kb\/276382\" target=\"_blank\">https:\/\/support.microsoft.com\/en-us\/kb\/276382<\/a><\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is something that I almost never do so I&#8217;m documenting it here to avoid future mistakes. We are migrating between domains and while we considered ADMT, there was too much clutter and our AD structure changed.\u00a0 So a piece meal approach was decided on.\u00a0 Hint to future self, don&#8217;t do this again, use ADMT!<\/p>\n<div class=\"read-more-wrapper\"><a class=\"read-more\" href=\"https:\/\/digitalsos.net\/?p=643\" title=\"Read More\"> <span class=\"button \">Read More<\/span><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[33],"tags":[34,36,37,35],"class_list":["post-643","post","type-post","status-publish","format-standard","hentry","category-infrastructure","tag-ad","tag-export","tag-import","tag-ldifde"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/pgxmGV-an","_links":{"self":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts\/643","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=643"}],"version-history":[{"count":1,"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts\/643\/revisions"}],"predecessor-version":[{"id":644,"href":"https:\/\/digitalsos.net\/index.php?rest_route=\/wp\/v2\/posts\/643\/revisions\/644"}],"wp:attachment":[{"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=643"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=643"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalsos.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=643"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}