{"id":732,"date":"2017-04-24T10:54:55","date_gmt":"2017-04-24T07:54:55","guid":{"rendered":"https:\/\/helia.ee\/koolitus\/?page_id=732"},"modified":"2017-04-24T10:56:24","modified_gmt":"2017-04-24T07:56:24","slug":"centos-7-samba-primary-domain-controller-on-centos-7","status":"publish","type":"page","link":"https:\/\/helia.ee\/koolitus\/?page_id=732","title":{"rendered":"CentOS 7 &#8211; Samba Primary Domain Controller On CentOS 7"},"content":{"rendered":"<div class=\"td-post-header\">\n<header class=\"td-post-title\">\n<h1 class=\"entry-title\">Setting Up Samba Primary Domain Controller On CentOS 7<\/h1>\n<\/header>\n<\/div>\n<div class=\"td-post-sharing td-post-sharing-top td-with-like\"><\/div>\n<div class=\"td-post-content\">\n<div class=\"td-post-featured-image\"><a class=\"td-modal-image\" href=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2014\/01\/Samba.png\" data-caption=\"\"><img loading=\"lazy\" decoding=\"async\" class=\"entry-thumb td-animation-stack-type0-1\" title=\"Samba\" src=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2014\/01\/Samba.png\" alt=\"\" width=\"696\" height=\"382\" \/><\/a><\/div>\n<p>In our previous tutorial, we have shown you how to <strong><a href=\"http:\/\/www.unixmen.com\/install-configure-samba-server-centos-7\/\" target=\"_blank\" rel=\"noopener noreferrer\">setup a Samba Standalone server<\/a><\/strong>. This tutorial describes how to setup Samba Primary Domain Controller in CentOS 7. This setup was tested in CentOS 7 minimal server, although the same steps should work on RHEL 7 and Scientific Linux 7 as well.<\/p>\n<h2>Scenario<\/h2>\n<p>I will be using two systems as mentioned below for the purpose of this article.<\/p>\n<div id=\"FIOnDemandWrapper_fiInstance_102086_0_5077678\" class=\"FIOnDemandWrapper\"><\/div>\n<h4>Samba PDC:<\/h4>\n<ul>\n<li><strong>OS:<\/strong> CentOS 7 Minimal server<\/li>\n<li><strong>Hostname:<\/strong> server.unixmen.local<\/li>\n<li><strong>IP Address:<\/strong> 192.168.1.150\/24<\/li>\n<li><strong>Samba Domain:<\/strong> UNIXMEN<\/li>\n<\/ul>\n<h4>Client:<\/h4>\n<ul>\n<li><strong>OS:<\/strong> Windows 7 32 bit<\/li>\n<li><strong>Hostname:<\/strong> mywindesktop<\/li>\n<li><strong>IP Address:<\/strong> 192.168.1.100\/24<\/li>\n<\/ul>\n<p>Well, now let us dive into the Samba PDC setup.<\/p>\n<h2>Installation<\/h2>\n<p>Run the following command to install samba packages.<\/p>\n<pre>yum install samba* -y<\/pre>\n<p>To verify the version of Samba, enter the following commands:<\/p>\n<pre>smbd -V<\/pre>\n<pre>smbclient -V<\/pre>\n<p>The output will be as below:<\/p>\n<div class=\"insert-post-ads\"><\/div>\n<pre>Version 4.1.1<\/pre>\n<h2>Samba Configuration<\/h2>\n<p>Edit samba default configuration file;<\/p>\n<pre>vi \/etc\/samba\/smb.conf<\/pre>\n<p>Find the following lines, and make the changes as shown below. Replace UNIXMEN with your own domain name.<\/p>\n<pre>[Global]\r\n\u00a0 workgroup = UNIXMEN\r\n\u00a0 security = user\r\n\u00a0 domain master = yes\r\n\u00a0 domain logons = yes\r\n\u00a0 local master = yes\r\n\u00a0 preferred master = yes\r\n\u00a0 passdb backend = tdbsam\r\n\u00a0 logon path = \\\\%L\\Profiles\\%U\r\n\u00a0 logon script = logon.bat\r\n\u00a0 add machine script = \/usr\/sbin\/useradd -d \/dev\/null -g 200 -s \/sbin\/nologin -M %u\r\n\r\n[homes]\r\n\u00a0 comment = Home Directories\r\n\u00a0 browseable = yes\r\n\u00a0 writable = yes\r\n\r\n[printers]\r\n\u00a0 comment = All Printers\r\n\u00a0 path = \/var\/spool\/samba\r\n\u00a0 printable = Yes\r\n\u00a0 print ok = Yes\r\n\u00a0 browseable = No\r\n\r\n[netlogon]\r\n\u00a0 comment = Network Logon Service\r\n\u00a0 path = \/var\/lib\/samba\/netlogon\r\n\u00a0 browseable = No\r\n\u00a0 writable = No\r\n\r\n[Profiles]\r\n\u00a0 path = \/var\/lib\/samba\/profiles\r\n\u00a0 create mask = 0755\r\n\u00a0 directory mask = 0755\r\n\u00a0 writable = Yes<\/pre>\n<p>To make this much simple, move your old <strong>smb.conf<\/strong> file to a safe location.<\/p>\n<pre>mv \/etc\/samba\/smb.conf \/etc\/samba\/smb.conf.bak<\/pre>\n<p>Create a new <strong>smb.conf<\/strong> file under \/etc\/samba\/ directory;<\/p>\n<pre>vi \/etc\/samba\/smb.conf<\/pre>\n<p>and copy\/paste the above lines. Don\u2019t forget to change the Domain name with your own.<\/p>\n<div id=\"FIOnDemandWrapper_fiInstance_102083_14_5077678\" class=\"FIOnDemandWrapper\"><\/div>\n<p>Save and close the file<\/p>\n<p>Test Samba configuration file syntax errors using the following command:<\/p>\n<pre>testparm<\/pre>\n<p>Your output might look like below.<\/p>\n<pre>Load smb config files from \/etc\/samba\/smb.conf\r\nrlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)\r\nProcessing section \"[homes]\"\r\nProcessing section \"[printers]\"\r\nProcessing section \"[netlogon]\"\r\nProcessing section \"[Profiles]\"\r\nLoaded services file OK.\r\nServer role: ROLE_DOMAIN_PDC\r\nPress enter to see a dump of your service definitions\r\n\r\n[global]\r\n\u00a0\u00a0 \u00a0workgroup = UNIXMEN\r\n\u00a0\u00a0 \u00a0add machine script = \/usr\/sbin\/useradd -d \/dev\/null -g 200 -s \/sbin\/nologin -M %u\r\n\u00a0\u00a0 \u00a0logon script = logon.bat\r\n\u00a0\u00a0 \u00a0logon path = \\\\%L\\Profiles\\%U\r\n\u00a0\u00a0 \u00a0domain logons = Yes\r\n\u00a0\u00a0 \u00a0preferred master = Yes\r\n\u00a0\u00a0 \u00a0domain master = Yes\r\n\u00a0\u00a0 \u00a0idmap config * : backend = tdb\r\n\r\n[homes]\r\n\u00a0\u00a0 \u00a0comment = Home Directories\r\n\u00a0\u00a0 \u00a0read only = No\r\n\r\n[printers]\r\n\u00a0\u00a0 \u00a0comment = All Printers\r\n\u00a0\u00a0 \u00a0path = \/var\/spool\/samba\r\n\u00a0\u00a0 \u00a0printable = Yes\r\n\u00a0\u00a0 \u00a0print ok = Yes\r\n\u00a0\u00a0 \u00a0browseable = No\r\n\r\n[netlogon]\r\n\u00a0\u00a0 \u00a0comment = Network Logon Service\r\n\u00a0\u00a0 \u00a0path = \/var\/lib\/samba\/netlogon\r\n\u00a0\u00a0 \u00a0browseable = No\r\n\r\n[Profiles]\r\n\u00a0\u00a0 \u00a0path = \/var\/lib\/samba\/profiles\r\n\u00a0\u00a0 \u00a0read only = No\r\n\u00a0\u00a0 \u00a0create mask = 0755<\/pre>\n<p>Create the shares with proper permissions which we have mentioned in the <strong>smb.conf<\/strong> file<\/p>\n<pre>mkdir -m 1777 \/var\/lib\/samba\/netlogon\r\nmkdir -m 1777 \/var\/lib\/samba\/profiles<\/pre>\n<div>Now, create the users whom you want to login to the domain.<\/div>\n<pre>useradd user1\r\nuseradd user2\r\n<\/pre>\n<h4>Create Machine accounts:<\/h4>\n<p>You need to create <strong>machine account<\/strong> for every machine in order to allow domain login from Windows machines. The machine account are special accounts with <strong>$<\/strong> at the end, i.e. <strong>machine$<\/strong>.\u00a0The system accounts for machines do not need login shell neither home directory.<\/p>\n<p>Add a new group named \u201cmachine\u201d with group id \u201c200\u201d.<\/p>\n<pre>groupadd -g 200 machine<\/pre>\n<p>To add a Samba machine account, run the following command:<\/p>\n<pre>smbpasswd -m -a machine1$<\/pre>\n<p>Here, <strong>smbpasswd -m \u2026.<\/strong> \u2013 tells that account will be used as NT primary domain controller (Machine account).<\/p>\n<p>For more details about, smbpasswd command, refer <a href=\"https:\/\/www.samba.org\/samba\/docs\/man\/manpages\/smbpasswd.8.html\" target=\"_blank\" rel=\"noopener noreferrer\">this link<\/a>.<\/p>\n<h4>Create Samba user accounts:<\/h4>\n<pre>smbpasswd -a root\r\nsmbpasswd -a user1\r\nsmbpasswd -a user2<\/pre>\n<p>Here, <strong>\u2018root\u2019<\/strong> user is the administrator that can be used to join the Windows NT\/2000\/XP\/7 systems to be part of the domain.\u00a0<a name=\"INDEX-46\"><\/a> In this case, do not provide <em><strong>smbpasswd<\/strong><\/em> with the same password as the actual root account on the server. Create a different password to be used solely for creating computer accounts. This will reduce the possibility of compromising the root password.<\/p>\n<h4>Start Samba services:<\/h4>\n<p>Finally start samba services and enable them to start automatically on every boot.<\/p>\n<pre>systemctl start smb\r\nsystemctl start nmb\r\nsystemctl enable smb\r\nsystemctl enable nmb<\/pre>\n<h4><strong>Firewall Configuration:<\/strong><\/h4>\n<p><span id=\"Port_usage_when_Samba_runs_as_an_Active_Directory_Domain_Controller\" class=\"mw-headline\">Samba uses the following Ports when runs as an Active Directory Domain Controller:<\/span><\/p>\n<table border=\"1\">\n<tbody>\n<tr>\n<th><strong>Service<\/strong><\/th>\n<th><strong>Port<\/strong><\/th>\n<th><strong>protocol<\/strong><\/th>\n<\/tr>\n<tr>\n<td>DNS<\/td>\n<td>53<\/td>\n<td>tcp\/udp<\/td>\n<\/tr>\n<tr>\n<td>Kerberos<\/td>\n<td>88<\/td>\n<td>tcp\/udp<\/td>\n<\/tr>\n<tr>\n<td>End Point Mapper (DCE\/RPC Locator Service)<\/td>\n<td>135<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>NetBIOS Name Service<\/td>\n<td>137<\/td>\n<td>udp<\/td>\n<\/tr>\n<tr>\n<td>NetBIOS Datagram<\/td>\n<td>138<\/td>\n<td>udp<\/td>\n<\/tr>\n<tr>\n<td>NetBIOS Session<\/td>\n<td>139<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>LDAP<\/td>\n<td>389<\/td>\n<td>tcp\/udp<\/td>\n<\/tr>\n<tr>\n<td>SMB over TCP<\/td>\n<td>445<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>Kerberos kpasswd<\/td>\n<td>464<\/td>\n<td>tcp\/udp<\/td>\n<\/tr>\n<tr>\n<td>LDAPS (only if \u201ctls enabled = yes\u201d)<\/td>\n<td>636<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>Dynamic RPC Ports*<\/td>\n<td>1024-5000<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>Global Cataloge<\/td>\n<td>3268<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>Global Cataloge SSL (only if \u201ctls enabled = yes\u201d)<\/td>\n<td>3269<\/td>\n<td>tcp<\/td>\n<\/tr>\n<tr>\n<td>Multicast DNS<\/td>\n<td>5353<\/td>\n<td>tcp\/udp<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Run the following commands one by one to allow Samba ports through firewall.<\/p>\n<pre>firewall-cmd --permanent --add-port=53\/tcp\r\nfirewall-cmd --permanent --add-port=53\/udp\r\nfirewall-cmd --permanent --add-port=88\/tcp\r\nfirewall-cmd --permanent --add-port=88\/udp\r\nfirewall-cmd --permanent --add-port=135\/tcp\r\nfirewall-cmd --permanent --add-port=137\/tcp\r\nfirewall-cmd --permanent --add-port=137\/udp\r\nfirewall-cmd --permanent --add-port=138\/udp\r\nfirewall-cmd --permanent --add-port=139\/tcp\r\nfirewall-cmd --permanent --add-port=389\/tcp\r\nfirewall-cmd --permanent --add-port=389\/udp\r\nfirewall-cmd --permanent --add-port=445\/tcp\r\nfirewall-cmd --permanent --add-port=464\/tcp\r\nfirewall-cmd --permanent --add-port=464\/udp\r\nfirewall-cmd --permanent --add-port=636\/tcp\r\nfirewall-cmd --permanent --add-port=1024-5000\/tcp\r\nfirewall-cmd --permanent --add-port=1024-5000\/udp\r\nfirewall-cmd --permanent --add-port=3268\/tcp\r\nfirewall-cmd --permanent --add-port=3269\/tcp\r\nfirewall-cmd --permanent --add-port=5353\/tcp\r\nfirewall-cmd --permanent --add-port=5353\/udp<\/pre>\n<p>Finally restart firewall service.<\/p>\n<pre>firewall-cmd --reload<\/pre>\n<h4><strong>SELinux Configuration:<\/strong><\/h4>\n<p>Apply the proper SELinux policies to Samba domain controller.<\/p>\n<pre>setsebool -P samba_domain_controller on\r\nsetsebool -P samba_enable_home_dirs on\r\n<\/pre>\n<p>Also to the Samab shares which we have defined in the <strong>smb.conf<\/strong> file.<\/p>\n<pre>chcon -t samba_share_t \/var\/lib\/samba\/netlogon\r\nchcon -t samba_share_t \/var\/lib\/samba\/profiles<\/pre>\n<p>If you don\u2019t want to mess up with Firewall and SELinux, simply disable them. Restart your server once you completed all above steps.<\/p>\n<h2><strong>Joining Windows Clients To Samba PDC<\/strong><\/h2>\n<p>Now try to join the samba domain from Windows OS client using the newly created user.<\/p>\n<p>Right click on My Computer, go to <strong>Properties -&gt;Advanced system settings<\/strong>.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_002.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32518 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_002.png\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_002.png 778w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_002-768x592.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_002-696x537.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_002-545x420.png 545w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_002\" width=\"778\" height=\"600\" \/><\/a><\/p>\n<p>In the <strong>Computer Name<\/strong> tab, Click on the <strong>Change<\/strong> button.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_003.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32519 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_003.png\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_003.png 778w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_003-768x592.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_003-696x537.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_003-545x420.png 545w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_003\" width=\"778\" height=\"600\" \/><\/a><\/p>\n<p>In the Domain field, enter your Domain name. In my case, it\u2019s <strong>unixmen<\/strong>.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_004.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32520 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_004.png\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_004.png 778w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_004-768x592.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_004-696x537.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_004-545x420.png 545w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_004\" width=\"778\" height=\"600\" \/><\/a><\/p>\n<p>Enter the Samba administrator, which is <strong>root<\/strong> in our case, and it\u2019s password. Not the actual root user password. Enter the root password which we created earlier using <strong>smbpasswd<\/strong> command.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_006.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32521 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_006.png\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_006.png 778w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_006-768x592.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_006-696x537.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_006-545x420.png 545w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_006\" width=\"778\" height=\"600\" \/><\/a>You may get an error like as shown below.<\/p>\n<pre><strong>\"The specified domain either does not exist or could not be contacted\" <\/strong><\/pre>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_007.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32522 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_007.png\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_007.png 778w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_007-768x592.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_007-696x537.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_007-545x420.png 545w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_007\" width=\"778\" height=\"600\" \/><\/a><\/p>\n<p>Don\u2019t worry. We can easily fix this error by doing the following tricks.<\/p>\n<p>To get rid of this error, open the windows registry. Go to <strong>HKEY_LOCAL_MACHINE\u00a0 -&gt; SYSTEM -&gt; CurrentControlSet -&gt; Services -&gt; LanmanWorkstation -&gt; Parameters<\/strong>.<\/p>\n<p>Create new two DWORD values called <strong>\u201cDomainCompatibilityMode\u201d<\/strong> and <strong>\u201cDNSNameResolutionRequired\u201d<\/strong>. And set values for <strong>\u201cDomainCompatibilityMode\u201d<\/strong> as <strong>1(one)<\/strong> and <strong>\u201cDNSNameResolutionRequired\u201d<\/strong> as <strong>0(zero)<\/strong>. Refer the below screenshot.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_008.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32523 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_008.png\" sizes=\"auto, (max-width: 778px) 100vw, 778px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_008.png 778w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_008-768x592.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_008-696x537.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_008-545x420.png 545w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_008\" width=\"778\" height=\"600\" \/><\/a><\/p>\n<p>Now, you\u2019ll be able to join your windows client to domain.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32524 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_009-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_009\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>Click Ok to continue.<\/p>\n<p>Opps! Again error!!<\/p>\n<pre>Changing the Primary Domain DNS name of this computer to \"\" failed. The name will remain \"UNIXMEN\".\r\n The error was:\r\n\r\nThe specified domain either does not exist or could not be contacted<\/pre>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32525 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_010-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_010\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>Simply click Ok to ignore this message. Don\u2019t restart now.<\/p>\n<p>Download and install a <strong>hotfix<\/strong> from the following link to prevent this error in future.<\/p>\n<ul>\n<li><a href=\"http:\/\/support.microsoft.com\/kb\/2171571\" target=\"_blank\" rel=\"noopener noreferrer\">Download Hotfix<\/a><\/li>\n<\/ul>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32526 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_011-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_011\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>After installing the fix, restart the Windows OS machine and you will able to login to Samba domain now.<\/p>\n<p>Press CTRL+ALT+Del keys, Click <strong>Switch user<\/strong>, and select <strong>Other user<\/strong> option.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32527 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_012-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_012\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>Enter the user name and password. Remember we already have created two users namely <strong>user1<\/strong> and <strong>user2<\/strong> in our previous steps.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32528 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_013-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_013\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>That\u2019s it. The new user will be able to login to the domain now.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32529 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_014-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_014\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>Please note that, a network drive will be automatically created for the each user. The users can store their personal files\/folders in that network folder if they want.<\/p>\n<p><a href=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-32530 td-animation-stack-type0-1\" src=\"http:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015.png\" sizes=\"auto, (max-width: 800px) 100vw, 800px\" srcset=\"https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015.png 800w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015-768x576.png 768w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015-80x60.png 80w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015-265x198.png 265w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015-696x522.png 696w, https:\/\/www.unixmen.com\/wp-content\/uploads\/2015\/01\/Windows-7-Running-Oracle-VM-VirtualBox_015-560x420.png 560w\" alt=\"Windows 7 [Running] - Oracle VM VirtualBox_015\" width=\"800\" height=\"600\" \/><\/a><\/p>\n<p>You access the samba users roaming profiles in the following location in the Samba server.<\/p>\n<pre>ls \/var\/lib\/samba\/profiles<\/pre>\n<p>Sample output:<\/p>\n<pre>user1.V2\u00a0 user2.V2<\/pre>\n<p>Viewing individual users profiles:<\/p>\n<pre>ls \/var\/lib\/samba\/profiles\/user1.V2\/<\/pre>\n<p>Sample output:<\/p>\n<pre>AppData\u00a0\u00a0 Desktop\u00a0\u00a0\u00a0 Downloads\u00a0 Links\u00a0 NTUSER.DAT\u00a0 Pictures\u00a0\u00a0\u00a0\u00a0 Searches\r\nContacts\u00a0 Documents\u00a0 Favorites\u00a0 Music\u00a0 ntuser.ini\u00a0 Saved Games\u00a0 Videos<\/pre>\n<p>At this stage you have a fully operational Samba Domain Controller on CentOS 7. That\u2019s it. Start using your Samba PDC. Good luck!<\/p>\n<p>Cheers!<\/p>\n<p>For more details, refer the official <a href=\"https:\/\/www.samba.org\/samba\/docs\/using_samba\/toc.html\" target=\"_blank\" rel=\"noopener noreferrer\"><strong>Samba documentation<\/strong><\/a>.<\/p>\n<\/div>\n","protected":false},"excerpt":{"rendered":"<p>Setting Up Samba Primary Domain Controller On CentOS 7 In our previous tutorial, we have shown you how to setup a Samba Standalone server. This tutorial describes how to setup Samba Primary Domain Controller in CentOS 7. This setup was tested in CentOS 7 minimal server, although the same steps should work on RHEL 7 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":645,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"class_list":["post-732","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/732","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=732"}],"version-history":[{"count":3,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/732\/revisions"}],"predecessor-version":[{"id":735,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/732\/revisions\/735"}],"up":[{"embeddable":true,"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=\/wp\/v2\/pages\/645"}],"wp:attachment":[{"href":"https:\/\/helia.ee\/koolitus\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=732"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}