{"id":11995,"date":"2021-12-22T11:38:48","date_gmt":"2021-12-22T18:38:48","guid":{"rendered":"https:\/\/sanuja.com\/blog\/?p=11995"},"modified":"2021-12-22T21:08:20","modified_gmt":"2021-12-23T04:08:20","slug":"how-to-join-linux-to-a-windows-ad-ds-domain","status":"publish","type":"post","link":"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain","title":{"rendered":"How to join Linux to a Windows AD-DS Domain"},"content":{"rendered":"<p>Linux (Unix-like) servers are very popular choice in the tech world. A majority of web and file servers are hosted on Unix and Unix-like operating systems. At the same time Microsoft Windows Servers are utilized by all major organization for its easy-to-use features such as Active Directory Domain Services, also simply known as, domains. If you have a mixed environment with both Linux and Windows servers or Linux desktops (end devices) and Windows servers, you need to be able to Windows domain join Linux machines. This is a step-by-step guide on how to domain join a CentOS, which is similar to RHEL (Red Hat Enterprise Linux) to an existing Windows Domain.<\/p>\n<p><!--more--><\/p>\n<p>You may watch the video instead of using this article.<br \/>\n<iframe width=\"560\" height=\"315\" src=\"https:\/\/www.youtube.com\/embed\/hBZTozismJw\" title=\"YouTube video player\" frameborder=\"0\" allow=\"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture\" allowfullscreen><\/iframe><\/p>\n<h2>Preparation<\/h2>\n<p>You should have a Windows Server (in this example Windows Server 2019) with the server promoted to an Active Directory Domain Services (AD-DS) domain.<\/p>\n<figure id=\"attachment_11997\" aria-describedby=\"caption-attachment-11997\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain.jpg\"><img decoding=\"async\" data-attachment-id=\"11997\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/win_server_2019_promoted_domain\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain.jpg\" data-orig-size=\"1082,616\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640166207&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"win_server_2019_promoted_domain\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Windows Server 2019 domain promoted&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain-300x171.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain-1024x583.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain-1024x583.jpg\" alt=\"Windows Server 2019 domain promoted\" width=\"474\" height=\"270\" class=\"size-large wp-image-11997\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain-1024x583.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain-300x171.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain-768x437.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/win_server_2019_promoted_domain.jpg 1082w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-11997\" class=\"wp-caption-text\">Windows Server 2019 domain promoted<\/figcaption><\/figure>\n<p>A Linux machine with OS and packages updates done so the system and the repository are up-to-date. In this demonstration, we will be using CentOS 8. The command for update is yum update. If you are using other versions of Linux other than CentOS or RHEL, please use the appropriate commands (for example, Ubuntu, it would be apt-get update and apt-get upgrade).<\/p>\n<figure id=\"attachment_11998\" aria-describedby=\"caption-attachment-11998\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8.jpg\"><img decoding=\"async\" data-attachment-id=\"11998\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/yum_update_centos8\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8.jpg\" data-orig-size=\"1332,212\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640166384&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"yum_update_CentOS8\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Updates on CentOS 8&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8-300x48.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8-1024x163.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8-1024x163.jpg\" alt=\"Updates on CentOS 8\" width=\"474\" height=\"75\" class=\"size-large wp-image-11998\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8-1024x163.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8-300x48.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8-768x122.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/yum_update_CentOS8.jpg 1332w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-11998\" class=\"wp-caption-text\">Updates on CentOS 8<\/figcaption><\/figure>\n<div class=\"alert alert-info\" role=\"alert\"><p class=\"printonly\"><strong>Notice<\/strong><\/p>This demonstration is done using CentOS 8 and Windows Server 2019. Same method can be used to domain join RHEL, Ubuntu and other Unix-like distributions. However, the specific commands used in this article must be modified accordingly.<\/div>\n<h2>Step-by-step Guide<\/h2>\n<p><b>Step 1:<\/b> On the Linux machine, install the following packages needed for the domain join process that includes Kerberos, Samba, Realmd and few others.<\/p>\n<p>realmd<br \/>oddjob<br \/>oddjob-mkhomedir<br \/>sssd<br \/>adcli<br \/>openldap-clients<br \/>samba-common<br \/>samba-common-tools<br \/>krb5-workstation<\/p>\n<p>You may copy and paste the following combined command in CentOS 8:<br \/>\n<i>yum install realmd oddjob oddjob-mkhomedir sssd adcli openldap-clients samba-common samba-common-tools krb5-workstation<\/i><\/p>\n<figure id=\"attachment_12001\" aria-describedby=\"caption-attachment-12001\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1.jpg\"><img decoding=\"async\" data-attachment-id=\"12001\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step1_linux_packages_install-2\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1.jpg\" data-orig-size=\"2418,1349\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640167160&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step1_linux_packages_install\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux packages install for domain join&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-300x167.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-1024x571.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-1024x571.jpg\" alt=\"Linux packages install for domain join\" width=\"474\" height=\"264\" class=\"size-large wp-image-12001\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-1024x571.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-300x167.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-768x428.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-1536x857.jpg 1536w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-2048x1143.jpg 2048w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step1_linux_packages_install-1-1038x576.jpg 1038w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12001\" class=\"wp-caption-text\">Linux packages install for domain join<\/figcaption><\/figure>\n<p><b>Step 2:<\/b> Set an appropriate hostname for the Linux machine. The hostname should also include your Windows domain ending. For example, if your domain is sanuja.local, your Linux hostname should be hostname.sanuja.local where \u201chostname\u201d is a term of your choice. To change the hostname in CentOS 8, use the following command:<br \/>\n<i>hostnamectl set-hostname hostname.sanuja.local<\/i><\/p>\n<p>You should check your hostname change with the following commands:<br \/>\n<i>hostname<\/i><br \/>\n<i>cat \/etc\/hostname<\/i><br \/>\nBoth above commands should return full hostname including the domain ending.<\/p>\n<p><i>dnsdomainname<\/i><br \/>\nThe DNS domain name command above should return only the domain name at the end of your hostname.<\/p>\n<figure id=\"attachment_12003\" aria-describedby=\"caption-attachment-12003\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname.jpg\"><img decoding=\"async\" data-attachment-id=\"12003\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step2_hostname\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname.jpg\" data-orig-size=\"1280,300\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640172222&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step2_hostname\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux hostname change and test&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname-300x70.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname-1024x240.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname-1024x240.jpg\" alt=\"Linux hostname change and test\" width=\"474\" height=\"111\" class=\"size-large wp-image-12003\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname-1024x240.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname-300x70.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname-768x180.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step2_hostname.jpg 1280w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12003\" class=\"wp-caption-text\">Linux hostname change and test<\/figcaption><\/figure>\n<p><b>Step 3:<\/b> Confirm the Linux and the Windows Server are on the same network. To join the domain, both machines must be on the same network and in the same subnet. I would recommend that you have a static IP address on the Windows Server with the Domain Controller installed. The Linux machine may use either a DHCP IP from a pool or use static IP.<\/p>\n<p><b>Step 4:<\/b> Confirm Linux Server (or computer) and Windows Server can ping each other. From the Linux machine, ping the Windows Server IP and from the Windows Server machine, ping the Linux IP. This proves the connectivity between the two machines.<\/p>\n<figure id=\"attachment_12004\" aria-describedby=\"caption-attachment-12004\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows.jpg\"><img decoding=\"async\" data-attachment-id=\"12004\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step4_pings_linux_windows\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows.jpg\" data-orig-size=\"1090,956\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640168155&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step4_pings_linux_windows\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux and Windows ping each other&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows-300x263.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows-1024x898.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows-1024x898.jpg\" alt=\"Linux and Windows ping each other\" width=\"474\" height=\"416\" class=\"size-large wp-image-12004\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows-1024x898.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows-300x263.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows-768x674.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step4_pings_linux_windows.jpg 1090w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12004\" class=\"wp-caption-text\">Linux and Windows ping each other<\/figcaption><\/figure>\n<p><b>Step 5:<\/b> Now, we need to setup the Linux hosts file. First you need to know your IP address of the Linux. If you have used a DHCP to obtain an IP for the Linux, you can use <em>ifconifg<\/em> command to check the IP (you may also use it for static IP checks as well).<\/p>\n<figure id=\"attachment_12005\" aria-describedby=\"caption-attachment-12005\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip.jpg\"><img decoding=\"async\" data-attachment-id=\"12005\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step5_check_linux_ip\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip.jpg\" data-orig-size=\"1274,894\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640168332&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step5_check_linux_ip\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Use ifconfig to check IP&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip-300x211.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip-1024x719.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip-1024x719.jpg\" alt=\"Use ifconfig to check IP\" width=\"474\" height=\"333\" class=\"size-large wp-image-12005\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip-1024x719.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip-300x211.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip-768x539.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_check_linux_ip.jpg 1274w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12005\" class=\"wp-caption-text\">Use ifconfig to check IP<\/figcaption><\/figure>\n<p>Change the configuration within the hosts file. To open the hosts file, use the following command. I am using nano but you may use vim or gedit as well.<br \/>\n<i>nano \/etc\/hosts<\/i><\/p>\n<p>In the hosts file, you will see two line already entered by the system. The first line is for the IPv4 loopback (127.0.0.1) and the second line is for the IPv6 loopback (::1). We may either leave both these line as it is or we can replace the IPv6 loopback line. In this demonstration, I am replacing the IPv6 line with the edits I want to make.<\/p>\n<figure id=\"attachment_12006\" aria-describedby=\"caption-attachment-12006\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks.jpg\"><img decoding=\"async\" data-attachment-id=\"12006\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step5_2_hosts_file_loopbacks\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks.jpg\" data-orig-size=\"1463,165\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640168618&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step5_2_hosts_file_loopbacks\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Typical default Linux hosts file&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks-300x34.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks-1024x115.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks-1024x115.jpg\" alt=\"Typical default Linux hosts file\" width=\"474\" height=\"53\" class=\"size-large wp-image-12006\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks-1024x115.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks-300x34.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks-768x87.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_2_hosts_file_loopbacks.jpg 1463w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12006\" class=\"wp-caption-text\">Typical default Linux hosts file<\/figcaption><\/figure>\n<p>Add the IP address of the Linux machine along with hostname and the complete hostname with the domain name at the end. For example, 192.168.1.4 linserv {space} linserver.sanuja.local.<\/p>\n<figure id=\"attachment_12007\" aria-describedby=\"caption-attachment-12007\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain.jpg\"><img decoding=\"async\" data-attachment-id=\"12007\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step5_3_hosts_file_ip_domain\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain.jpg\" data-orig-size=\"1467,172\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640168706&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step5_3_hosts_file_ip_domain\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Add Linux IP to hosts file with host and domain name&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain-300x35.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain-1024x120.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain-1024x120.jpg\" alt=\"Add Linux IP to hosts file with host and domain name\" width=\"474\" height=\"56\" class=\"size-large wp-image-12007\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain-1024x120.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain-300x35.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain-768x90.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step5_3_hosts_file_ip_domain.jpg 1467w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12007\" class=\"wp-caption-text\">Add Linux IP to hosts file with host and domain name<\/figcaption><\/figure>\n<p><b>Step 6:<\/b> Confirm the hosts file change with pinging the Linux machine using its own terminal. Use the hostname and full hostname to test it.<\/p>\n<figure id=\"attachment_12008\" aria-describedby=\"caption-attachment-12008\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname.jpg\"><img decoding=\"async\" data-attachment-id=\"12008\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step6_ping_linux_hostname\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname.jpg\" data-orig-size=\"1153,713\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640168944&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step6_ping_linux_hostname\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux pings by its own hostname&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname-300x186.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname-1024x633.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname-1024x633.jpg\" alt=\"Linux pings by its own hostname\" width=\"474\" height=\"293\" class=\"size-large wp-image-12008\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname-1024x633.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname-300x186.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname-768x475.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step6_ping_linux_hostname.jpg 1153w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12008\" class=\"wp-caption-text\">Linux pings by its own hostname<\/figcaption><\/figure>\n<p><b>Step 7:<\/b> On the Windows Server, add a record in the Forward Lookup Zones within the DNS Manager with the details of the Linux machine. Open Server Manager > Tools > DNS Manager.<\/p>\n<p>Expand the Forward Lookup Zones from the left-hand pane and select your domain. In this demonstration it would be sanuja.local. Then right click on a blank space on the right-hand pane and open New Host (A or AAAA)&#8230; record.<\/p>\n<figure id=\"attachment_12009\" aria-describedby=\"caption-attachment-12009\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv.jpg\"><img decoding=\"async\" data-attachment-id=\"12009\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step7_add_dns_record_winserv\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv.jpg\" data-orig-size=\"1190,1102\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640169206&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step7_add_DNS_record_winserv\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Right click on a blank space on the right-hand pane and open New Host (A or AAAA)&amp;#8230;&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv-300x278.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv-1024x948.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv-1024x948.jpg\" alt=\"Right click on a blank space on the right-hand pane and open New Host (A or AAAA)...\" width=\"474\" height=\"439\" class=\"size-large wp-image-12009\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv-1024x948.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv-300x278.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv-768x711.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_add_DNS_record_winserv.jpg 1190w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12009\" class=\"wp-caption-text\">Right click on a blank space on the right-hand pane and open New Host (A or AAAA)&#8230;<\/figcaption><\/figure>\n<p>Fill in the New Host record information with the Linux data. For the name, use the Linux hostname without the domain ending. The FQDN should populate with the full hostname with the domain ending (which is the FQDN). Enter the IP address of your Linux machine.<\/p>\n<figure id=\"attachment_12010\" aria-describedby=\"caption-attachment-12010\" style=\"width: 515px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv.jpg\"><img decoding=\"async\" data-attachment-id=\"12010\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step7_fill_dns_record_winserv\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv.jpg\" data-orig-size=\"515,590\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640169435&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step7_fill_DNS_record_winserv\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Fill in the New Host record information with the Linux data&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv-262x300.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv.jpg\" alt=\"Fill in the New Host record information with the Linux data\" width=\"515\" height=\"590\" class=\"size-full wp-image-12010\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv.jpg 515w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_fill_DNS_record_winserv-262x300.jpg 262w\" sizes=\"(max-width: 515px) 100vw, 515px\" \/><\/a><figcaption id=\"caption-attachment-12010\" class=\"wp-caption-text\">Fill in the New Host record information with the Linux data<\/figcaption><\/figure>\n<p>Linux DNS record should now be in the Forward Lookup Zones.<\/p>\n<figure id=\"attachment_12011\" aria-describedby=\"caption-attachment-12011\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record.jpg\"><img decoding=\"async\" data-attachment-id=\"12011\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step7_dns_record\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record.jpg\" data-orig-size=\"1159,327\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640169517&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step7_DNS_record\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux DNS record in the DNS Manager&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record-300x85.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record-1024x289.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record-1024x289.jpg\" alt=\"Linux DNS record in the DNS Manager\" width=\"474\" height=\"134\" class=\"size-large wp-image-12011\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record-1024x289.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record-300x85.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record-768x217.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step7_DNS_record.jpg 1159w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12011\" class=\"wp-caption-text\">Linux DNS record in the DNS Manager<\/figcaption><\/figure>\n<p><b>Step 8:<\/b> Now ping again to Linux machine from the Windows server. This time, ping using the Linux hostnames. For example, linserv and linserv.sanuja.local (as per above DNS record). You should be able to get ICMP ping replies back from the Linux machine.<\/p>\n<p><b>Step 9:<\/b> On the Linux machine, edit the resolv.conf file so it can be used by the Linux to see the DNS server on the Windows machine. Use the following command to open the reslov.conf file.<br \/>\n<i>nano \/etc\/resolv.conf<\/i><\/p>\n<p>Note, this file is created by the NetworkManager. This means that this file may be overwritten by the system each time you reboot your Linux machine. I will explain how to stop this in a different article\/video. But for now, add a new namesever line to resolv.conf. You should already have an entry for your domain name on the first line. You may also have a DNS entry added because of the Network Manager having a DNS. This DNS record is coming from your Linux Network Card configuration. We should change the configuration to point the DNS record to the Windows Server with our domain.<\/p>\n<figure id=\"attachment_12012\" aria-describedby=\"caption-attachment-12012\" style=\"width: 474px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg.jpg\"><img decoding=\"async\" data-attachment-id=\"12012\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step9_resolv_dns_network_mtg\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg.jpg\" data-orig-size=\"2394,605\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640170525&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step9_resolv_DNS_network_mtg\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux Network Manager updating resolv.conf file.&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-300x76.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-1024x259.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-1024x259.jpg\" alt=\"Linux Network Manager updates the resolv.conf file.\" width=\"474\" height=\"120\" class=\"size-large wp-image-12012\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-1024x259.jpg 1024w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-300x76.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-768x194.jpg 768w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-1536x388.jpg 1536w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_resolv_DNS_network_mtg-2048x518.jpg 2048w\" sizes=\"(max-width: 474px) 100vw, 474px\" \/><\/a><figcaption id=\"caption-attachment-12012\" class=\"wp-caption-text\">Linux Network Manager updates the resolv.conf file.<\/figcaption><\/figure>\n<p>No need to delete the DNS entry already in the file. Instead, just add a new nameserver entry just above it. The Linux will take the first nameserver available when looking for DNS information. Enter your Windows Server IP address with the nameserver entry.<\/p>\n<figure id=\"attachment_12013\" aria-describedby=\"caption-attachment-12013\" style=\"width: 502px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery.jpg\"><img decoding=\"async\" data-attachment-id=\"12013\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step9_new_dns_entery\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery.jpg\" data-orig-size=\"502,255\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640170655&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step9_new_dns_entery\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Add a new nameserver entry just above current DNS&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery-300x152.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery.jpg\" alt=\"Add a new nameserver entry just above current DNS\" width=\"502\" height=\"255\" class=\"size-full wp-image-12013\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery.jpg 502w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step9_new_dns_entery-300x152.jpg 300w\" sizes=\"(max-width: 502px) 100vw, 502px\" \/><\/a><figcaption id=\"caption-attachment-12013\" class=\"wp-caption-text\">Add a new nameserver entry just above current DNS<\/figcaption><\/figure>\n<p><b>Step 10:<\/b> Check if the Linux is already on a domain by using the relam list command. Then if there are no record (there should not be), check if your Linux can see the Windows domain by using the command realm discover sanuja.local (your domain instead of sanuja.local). You can check all the commands for joining a domain using realm by typing realm [Enter].<\/p>\n<figure id=\"attachment_12014\" aria-describedby=\"caption-attachment-12014\" style=\"width: 555px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command.jpg\"><img decoding=\"async\" data-attachment-id=\"12014\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step10_realm_command\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command.jpg\" data-orig-size=\"555,501\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640171018&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step10_realm_command\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux realm options&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command-300x271.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command.jpg\" alt=\"Linux realm options\" width=\"555\" height=\"501\" class=\"size-full wp-image-12014\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command.jpg 555w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command-300x271.jpg 300w\" sizes=\"(max-width: 555px) 100vw, 555px\" \/><\/a><figcaption id=\"caption-attachment-12014\" class=\"wp-caption-text\">Linux realm options<\/figcaption><\/figure>\n<p>Note: Use the \u201cadministrator\u201d user and the password for your Windows Domain during the joining process on the Linux side.<\/p>\n<p>Once you have joined the Windows Domain, your Linux machine should appear under Server Manager > Tools > Active Directory Users and Computers in the Windows Server.<\/p>\n<figure id=\"attachment_12015\" aria-describedby=\"caption-attachment-12015\" style=\"width: 863px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined.jpg\"><img decoding=\"async\" data-attachment-id=\"12015\" data-permalink=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\/step10_adds_linux_joined\" data-orig-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined.jpg\" data-orig-size=\"863,406\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;Sanuja Senanayake&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;1640171264&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"step10_adds_linux_joined\" data-image-description=\"\" data-image-caption=\"&lt;p&gt;Linux on Active Directory Users and Computers in the Windows Server&lt;\/p&gt;\n\" data-medium-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined-300x141.jpg\" data-large-file=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined.jpg\" src=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined.jpg\" alt=\"Linux on Active Directory Users and Computers in the Windows Server\" width=\"863\" height=\"406\" class=\"size-full wp-image-12015\" srcset=\"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined.jpg 863w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined-300x141.jpg 300w, https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_adds_linux_joined-768x361.jpg 768w\" sizes=\"(max-width: 863px) 100vw, 863px\" \/><\/a><figcaption id=\"caption-attachment-12015\" class=\"wp-caption-text\">Linux on Active Directory Users and Computers in the Windows Server<\/figcaption><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Linux (Unix-like) servers are very popular choice in the tech world. A majority of web and file servers are hosted on Unix and Unix-like operating systems. At the same time Microsoft Windows Servers are utilized by all major organization for its easy-to-use features such as Active Directory Domain Services, also simply known as, domains. If &hellip; <a href=\"https:\/\/sanuja.com\/blog\/how-to-join-linux-to-a-windows-ad-ds-domain\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">How to join Linux to a Windows AD-DS Domain<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":12014,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_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":""},"categories":[3],"tags":[18,7,10,19],"class_list":["post-11995","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-computer-science","tag-computing","tag-server","tag-tech","tag-tutorials"],"jetpack_featured_media_url":"https:\/\/sanuja.com\/blog\/wp-content\/uploads\/2021\/12\/step10_realm_command.jpg","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts\/11995","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/comments?post=11995"}],"version-history":[{"count":9,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts\/11995\/revisions"}],"predecessor-version":[{"id":12021,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/posts\/11995\/revisions\/12021"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/media\/12014"}],"wp:attachment":[{"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/media?parent=11995"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/categories?post=11995"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sanuja.com\/blog\/wp-json\/wp\/v2\/tags?post=11995"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}