{"id":36,"date":"2017-02-03T12:40:00","date_gmt":"2017-02-03T11:40:00","guid":{"rendered":"https:\/\/techblog.dansbo.dk\/?p=36"},"modified":"2024-01-03T12:45:15","modified_gmt":"2024-01-03T11:45:15","slug":"change-domain-of-a-vnx-cifs-server","status":"publish","type":"post","link":"https:\/\/techblog.dansbo.dk\/?p=36","title":{"rendered":"Change domain of a VNX CIFS server"},"content":{"rendered":"\n<p>All information in this post can be found on https:\/\/support.emc.com, but I have been unable to find a single source.<\/p>\n\n\n\n<p>In order to change domain of a VNX CIFS server, it is necessary to delete the CIFS server\u2026 That is right, the CIFS server needs to be deleted, but don\u2019t worry. Shares, ownership and rights will be retained.<\/p>\n\n\n\n<p>When I first started searching for a way to change the domain of a CIFS server, I did find documentation stating that the CIFS server needed to be deleted. I discarded those posts as I did not want to delete the CIFS shares.<\/p>\n\n\n\n<p>\u00a0decided to open an EMC support chat to get the correct procedure for changing the domain and they also stated that I needed to delete the CIFS server. After a bit back and forth, I felt fairly convinced that it was actually the correct method, but just to be sure I set up a test before doing it on a production system.<\/p>\n\n\n\n<p>A bit of information about the test setup:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Old domain is called olddom.net<\/li>\n\n\n\n<li>New domain is called newdom.com<\/li>\n\n\n\n<li>The net interface used by the CIFS server is called cifs-if<\/li>\n\n\n\n<li>The filesystem used by the CIFS server is called cifs-fs<\/li>\n\n\n\n<li>There is a trust between olddom.net and newdom.com<\/li>\n<\/ul>\n\n\n\n<p>First we need to update the security IDs (SID) on the filesystem so they correspond to the new domain. The VNX will try to match user and group form the old domain to user and group in the new domain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_cifs &lt;dm-name> -Migrate cifs-fs -acl olddom.net:if=cifs-if newdom.net:if=cifs-if<\/code><\/pre>\n\n\n\n<p>The command above might take some time, but everything is online while it runs.<\/p>\n\n\n\n<p>Next we need to unjoin the CIFS server from the old domain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_cifs &lt;dm-name> -Unjoin compname=&lt;cifs-server-name>,domain=olddom.net,admin=&lt;admin user><\/code><\/pre>\n\n\n\n<p>When the domain is unjoined, we can delete the CIFS server.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_cifs &lt;dm-name> -delete compname=&lt;cifs-server-name><\/code><\/pre>\n\n\n\n<p>Now it is possible to create a new CIFS server with the same name, but a different domain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_cifs &lt;dm-name> -add compname=&lt;cifs-server-name>,domain=newdom.com,admin=&lt;admin user><\/code><\/pre>\n\n\n\n<p>Now join the CIFS server to the domain<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_cifs &lt;dm-name> -Join compname=&lt;cifs-server-name>,domain=newdom.com,admin=&lt;admin user><\/code><\/pre>\n\n\n\n<p>Finally we can replace remove the SIDs from the old domain.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>server_cifs &lt;dm-name> -Replace cifs-fs -acl :nb=&lt;cifs-server-name><\/code><\/pre>\n\n\n\n<p>That\u2019s it. Shares and files should now have the correct permissions for the new domain. I believe that this should also work without a trust between the two domains, but the -Migrate command needs the same user\/group\u2019s to be available in the new domain in order to change the SID\u2019s correctly.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All information in this post can be found on https:\/\/support.emc.com, but I have been unable to find a single source. In order to change domain of a VNX CIFS server,&#8230;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-36","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=\/wp\/v2\/posts\/36","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=36"}],"version-history":[{"count":1,"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions"}],"predecessor-version":[{"id":37,"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=\/wp\/v2\/posts\/36\/revisions\/37"}],"wp:attachment":[{"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=36"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=36"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techblog.dansbo.dk\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=36"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}