Wednesday, November 16, 2016

CentOS 7: Moving Active Directory Domains

This goes hand-in-hand with this article:  http://www.mims.me/2016/05/centos-7-ad-authentication.html

1  First, we need to leave the first domain

realm leave -v EXAMPLE.COM

or

realm leave -v EXAMPLE.COM -U <domain admin account>


2.  Next, we need to join the new domain

realm join -v EXAMPLE.COM -U <domain admin account>


3.  If this worked, then go to the article mentioned at the top of the article to set various settings.


4.  I had a lot of trouble with various errors when trying to join my new domain, so here are some places to look if you have trouble.


/etc/samba/smb.conf  ... see if there are ANY references to the OLD domain or OLD DNS servers in this file and modify them to the NEW domain and NEW DNS servers.

If the below doesn't exist, don't add, but in my case it did, so make sure to modify.



[global]
#--authconfig--start-line--

# Generated by authconfig on 2015/08/04 13:08:52
# DO NOT EDIT THIS SECTION (delimited by --start-line--/--end-line--)
# Any modification may be deleted or altered by authconfig in future

   password server = ADDC1 ADDC2, ADDC3
security = user
   idmap config * : range = 16777216-33554431
   template shell = /bin/bash
   winbind use default domain = false
   winbind offline logon = false

#--authconfig--end-line--


___________________________________________________

/etc/krb5.conf  ... see if there are ANY references to the OLD domain and OLD DNS servers in this file and modify them to the NEW domain and NEW DNS servers

___________________________________________________

If it still doesn't work, run authconfig-tui and use the settings below (obviously modified for your domain):





5.  All you're looking for is that the computer successfully joined the domain.