<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Rofhiwa on Medium]]></title>
        <description><![CDATA[Stories by Rofhiwa on Medium]]></description>
        <link>https://medium.com/@kbnekhudzhiga?source=rss-2ac91702d024------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*wXtngR4mjJjUoMkf</url>
            <title>Stories by Rofhiwa on Medium</title>
            <link>https://medium.com/@kbnekhudzhiga?source=rss-2ac91702d024------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 19:53:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@kbnekhudzhiga/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Beginning a Journey Into Cloud Computing]]></title>
            <link>https://medium.com/@kbnekhudzhiga/beginning-a-journey-into-cloud-computing-11c9aad7f9fb?source=rss-2ac91702d024------2</link>
            <guid isPermaLink="false">https://medium.com/p/11c9aad7f9fb</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[building-in-public]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[university]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <dc:creator><![CDATA[Rofhiwa]]></dc:creator>
            <pubDate>Wed, 21 Oct 2026 15:33:02 GMT</pubDate>
            <atom:updated>2026-10-21T15:33:02.105Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BIfTHvE_ESLZDo8p0jnAWg.jpeg" /></figure><p>Things in computing are moving so fast that going back to the basics can feel like a chore, or even pointless. Some people in our generation have started automating the learning process itself, using AI tools to take their online courses for them. Taking the time to learn without those shortcuts can almost look foolish, as if you’re falling behind.</p><p>It isn’t. In fact, it’s the opposite.</p><blockquote><em>In an age where you can use plain language to get things done on a computer, your knowledge is the superpower.</em></blockquote><p>You can use these new technologies to do what you know works, then monitor it for errors, correct it, and verify it. But you can only do that if you understand what’s happening underneath.</p><h3>Why cloud, and why now</h3><p>My background is mostly in on-prem Windows servers. Cloud computing always felt like a “later in my career” thing, and I kept putting it off. But the cloud is where all the cool stuff is happening, and much of what I used to do on on-prem servers can be done there too, and more.</p><p>That’s why this scholarship matters to me. It’s the push I needed to stop postponing and start building real cloud skills.</p><h3>Skills are for serving others</h3><p>I’m excited about this opportunity, and I’m grateful to <strong>Wale University</strong> for the <strong>Independence Anniversary Scholarship</strong>. I want to keep learning so I can keep helping people, because at the core of it, skills are only fulfilling when you use them to serve others.</p><p>This is the start of the journey. I’ll be sharing what I learn along the way.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=11c9aad7f9fb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Build a Free Active Directory Domain Controller with Samba on Alma Linux]]></title>
            <link>https://medium.com/@kbnekhudzhiga/how-to-build-a-free-active-directory-domain-controller-with-samba-on-alma-linux-7cf8ece91481?source=rss-2ac91702d024------2</link>
            <guid isPermaLink="false">https://medium.com/p/7cf8ece91481</guid>
            <category><![CDATA[almalinux]]></category>
            <category><![CDATA[addc]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[homelab]]></category>
            <category><![CDATA[samba-dc]]></category>
            <dc:creator><![CDATA[Rofhiwa]]></dc:creator>
            <pubDate>Wed, 04 Mar 2026 00:28:26 GMT</pubDate>
            <atom:updated>2026-03-04T13:16:35.121Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*lb3DbwgfvHdc4J6A6qmFoA.png" /></figure><p>Well, here we go, my first tech article. If you want an Active Directory Domain Controller but licensing costs are a barrier, consider using Samba. In this guide, I’ll walk you through how to set it up.</p><p>This guide and the series that follows it explores open-source, Linux-based solutions that don’t isolate or replace the widely used enterprise operating systems already in your environment. The goal is to lower cost without lowering compatibility.</p><h3>What Is Samba?</h3><p>Samba is an open-source suite that has, since 1992, provided file and print services to SMB/CIFS clients</p><p>including every major version of Microsoft Windows.</p><p>Starting from version 4.0 (released in 2012), Samba can serve as a full <strong>Active Directory (AD) Domain Controller (DC)</strong>. It operates at the Windows Server 2008 R2 forest functional level, which is more than sufficient to manage modern enterprises running Windows 10/11 with strict compliance requirements, including NIST 800–171.</p><p>In short: you get enterprise-grade AD functionality without paying for a Windows Server license.</p><h3>Prerequisites</h3><ul><li>A machine running <strong>Alma Linux</strong> (installation guide: <a href="https://wiki.almalinux.org/documentation/installation-guide.html)">https://wiki.almalinux.org/documentation/installation-guide.html)</a></li><li>Root or sudo access</li><li>A desktop environment is available but this guide is <strong>CLI-first</strong> — GUIs will only be used where necessary</li></ul><h3>Step 1 — Set a Static IP Address</h3><p>We’ll use nmcli (NetworkManager Command Line Interface), a text-based tool for managing network connections on Linux.</p><p><strong>View your current connections:</strong></p><pre>nmcli connection show<br># or shorthand:<br>nmcli con show</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/0*sVjCBUdJ5AZQ8PG2.png" /></figure><p><strong>Check your current IP pattern:</strong></p><pre>ifconfig</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/0*8NvcEEY2YhfI_IWi.png" /></figure><p>In this example, the network is 192.168.122.0/24 with a subnet mask of 255.255.255.0. We’ll assign the server a static IP of 192.168.122.10.</p><p><strong>Set the static IP</strong> (replace &quot;enp1s0&quot; with your connection name from the previous step):</p><pre>nmcli con mod &quot;enp1s0&quot; ipv4.addresses 192.168.122.10/24</pre><p><strong>Set the gateway:</strong></p><pre>nmcli con mod &quot;enp1s0&quot; ipv4.gateway 192.168.122.1</pre><p><strong>Set DNS</strong> (using Google’s public DNS):</p><pre>nmcli con mod &quot;enp1s0&quot; ipv4.dns &quot;8.8.8.8 8.8.4.4&quot;</pre><p><strong>Switch to manual (static) mode:</strong></p><pre>nmcli con mod &quot;enp1s0&quot; ipv4.method manual</pre><p><strong>Restart the connection to apply:</strong></p><pre>nmcli con down &quot;enp1s0&quot;<br>nmcli con up &quot;enp1s0&quot;</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/862/0*ZCeuATBYD6Lzqegq.png" /></figure><h3>Step 2 — Set the Hostname</h3><blockquote><em>⚠️ </em><strong><em>Important:</em></strong><em> Do </em><strong><em>not</em></strong><em> use </em><em>.local in your domain name — it conflicts with mDNS and will cause hard-to-debug issues. Use </em><em>.com, </em><em>.org, </em><em>.lan, or similar instead.</em></blockquote><p>Run this as root or with sudo:</p><pre>hostnamectl set-hostname DC01.ac12.kar.org</pre><p>Verify it was set correctly:</p><pre>hostnamectl</pre><p><strong>Edit the hosts file</strong> to map the hostname to the static IP:</p><pre>via /etc/hosts<br># or: micro /etc/hosts</pre><p>Add this line (adjust to match your IP and domain):</p><pre>192.168.122.10   DC01.ac12.kar.org   DC01</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/721/0*ciYHNxuUs07vmidS.png" /></figure><h3>Step 3 — Back Up Existing Config Files</h3><p>Before making any changes, it’s best practice to back up existing configuration files rather than delete them.</p><pre># Back up the Samba config<br>mv /etc/samba/smb.conf /etc/samba/smb.conf.old</pre><pre># Back up the Kerberos config<br>mv /etc/krb5.conf /etc/krb5.conf.old</pre><h3>Step 4 — Download and Extract Samba</h3><p>Check <a href="https://download.samba.org/pub/samba/stable">https://download.samba.org/pub/samba/stable</a> for the latest stable release. At the time of writing that is <strong>4.23.6</strong>.</p><pre>wget https://download.samba.org/pub/samba/stable/samba-4.23.6.tar.gz<br>tar -zxf samba-4.23.6.tar.gz<br>cd samba-4.23.6</pre><h3>Step 5 — Install Dependencies</h3><p>First, enable the EPEL repository and CRB (CodeReady Builder), which provide many of the packages Samba needs:</p><pre>dnf -y install epel-release<br>dnf config-manager --set-enabled crb<br>dnf -y update</pre><p>Now install the build dependencies:</p><pre>sudo dnf install -y \<br>  gcc make git perl python3 python3-devel \<br>  pkg-config flex bison \<br>  gnutls-devel openssl-devel \<br>  openldap-devel \<br>  liblmdb-devel libtasn1-devel \<br>  libacl-devel \<br>  cyrus-sasl-devel \<br>  jansson-devel \<br>  glib2-devel dbus-devel \<br>  libarchive-devel zlib-devel \<br>  pam-devel gpgme-devel \<br>  python3-dns python3-markdown \<br>  xsltproc docbook-style-xsl \<br>  intltool gettext \<br>  perl-Parse-Yapp valgrind-devel</pre><h3>Step 6 — Configure and Build Samba</h3><pre>./configure</pre><blockquote><em>⚠️ You may encounter errors here. Each one will tell you what’s missing — read the output carefully and search for the specific error if needed. It is normal to iterate on this step.</em></blockquote><p>Once ./configure completes without errors:</p><pre># Build (using 2 CPU threads — increase if your machine has more)<br>make -j 2</pre><pre># Install<br>make -j 2 install</pre><p><strong>Add Samba to your PATH:</strong></p><pre>export PATH=/usr/local/samba/bin/:/usr/local/samba/sbin/:$PATH</pre><p>To make this permanent for all users:</p><pre>micro /etc/profile.d/samba.sh<br># Add this line:<br>export PATH=&quot;$PATH:/usr/local/samba/bin:/usr/local/samba/sbin&quot;</pre><h3>Step 7 — Provision the Domain</h3><p>Before running this command, know your network interface names. Run ifconfig to check — in this example they are lo and enp1s0.</p><pre>samba-tool domain provision \<br>  --use-rfc2307 \<br>  --interactive \<br>  --option=&quot;interfaces=lo enp1s0&quot; \<br>  --option=&quot;bind interfaces only=yes&quot;</pre><p>You will be prompted for several values. Here’s what to enter:</p><pre>Realm []:        AC12.KAR.ORG<br>Domain []:       AC12<br>Server Role:     dc<br>DNS backend:     SAMBA_INTERNAL<br>DNS forwarder:   8.8.8.8</pre><h3>Step 8 — Configure DNS Resolution</h3><p>Point the server’s DNS resolver to itself:</p><pre>micro /etc/resolv.conf</pre><p>Set the contents to:</p><pre>nameserver 127.0.0.1<br>search ac12.kar.org</pre><pre># Then lock it so nothing can overwrite it<br>chattr +i /etc/resolv.conf</pre><blockquote><em>Replace </em><em>ac12.kar.org with your own domain.</em></blockquote><h3>Step 9 — Start Samba and Test</h3><pre>samba</pre><p><strong>Test DNS is working:</strong></p><pre># Should resolve outbound<br>ping google.com</pre><pre># Should resolve the DC itself<br>ping DC01.ac12.kar.org</pre><p><strong>Check SRV and A records:</strong></p><pre>host -t SRV _ldap._tcp.ac12.kar.org.<br>host -t SRV _kerberos._udp.ac12.kar.org.<br>host -t A DC01.ac12.kar.org.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/0*9ObaGXazEN6AbLx9.png" /></figure><h3>Step 10 — Copy the Kerberos Config</h3><pre>cp /usr/local/samba/private/krb5.conf /etc/krb5.conf</pre><h3>Step 11 — Create a systemd Service</h3><p>Since Samba was built from source, no systemd service file was created automatically. Create one manually:</p><pre>cat &gt; /etc/systemd/system/samba-ad-dc.service &lt;&lt; &#39;EOF&#39;<br>[Unit]<br>Description=Samba Active Directory Domain Controller<br>After=network.target remote-fs.target nss-lookup.target</pre><pre>[Service]<br>Type=forking<br>ExecStart=/usr/local/samba/sbin/samba -D<br>PIDFile=/usr/local/samba/var/run/samba.pid<br>Environment=PATH=/usr/local/samba/sbin:/usr/local/samba/bin:/usr/sbin:/usr/bin<br>Restart=on-failure</pre><pre>[Install]<br>WantedBy=multi-user.target<br>EOF</pre><p><strong>Fix SELinux labels</strong> — on Alma Linux, SELinux will block systemd from executing the binary if the labels are wrong (you’ll see exit status 203/EXEC):</p><pre>chcon -R -t bin_t /usr/local/samba/sbin/<br>chcon -R -t lib_t /usr/local/samba/lib/</pre><p><strong>Enable and start the service:</strong></p><pre>systemctl daemon-reload<br>systemctl enable samba-ad-dc<br>systemctl start samba-ad-dc<br>systemctl status samba-ad-dc</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/884/0*lg3Ida1dRr89T5Qk.png" /></figure><p>You can also verify the process is running with:</p><pre>ps -ax | grep samba</pre><h3>Step 12 — Set Up DHCP</h3><p>Install the DHCP server:</p><pre>sudo dnf -y install dhcp-server</pre><p>Edit the configuration file:</p><pre>nano /etc/dhcp/dhcpd.conf</pre><blockquote><em>⚠️ </em><strong><em>Note:</em></strong><em> The config block below is in Kea DHCP JSON format. If you installed </em><em>kea instead of the legacy </em><em>dhcp-server, use this format. If you installed the legacy </em><em>dhcpd, the syntax will be different — check which service you’re running with </em><em>systemctl list-units | grep dhcp.</em></blockquote><pre>{<br>  &quot;Dhcp4&quot;: {<br>    &quot;interfaces-config&quot;: {<br>      &quot;interfaces&quot;: [&quot;enp1s0&quot;]<br>    },<br>    &quot;lease-database&quot;: {<br>      &quot;type&quot;: &quot;memfile&quot;,<br>      &quot;persist&quot;: true,<br>      &quot;name&quot;: &quot;/var/lib/kea/dhcp4.leases&quot;<br>    },<br>    &quot;valid-lifetime&quot;: 86400,<br>    &quot;subnet4&quot;: [<br>      {<br>        &quot;id&quot;: 1,<br>        &quot;subnet&quot;: &quot;192.168.122.0/24&quot;,<br>        &quot;pools&quot;: [<br>          { &quot;pool&quot;: &quot;192.168.122.100 - 192.168.122.200&quot; }<br>        ],<br>        &quot;option-data&quot;: [<br>          { &quot;name&quot;: &quot;routers&quot;,             &quot;data&quot;: &quot;192.168.122.1&quot; },<br>          { &quot;name&quot;: &quot;domain-name-servers&quot;, &quot;data&quot;: &quot;192.168.122.10&quot; },<br>          { &quot;name&quot;: &quot;domain-name&quot;,         &quot;data&quot;: &quot;ac12.kar.org&quot; }<br>        ]<br>      }<br>    ]<br>  }<br>}</pre><p><strong>Start and enable DHCP:</strong></p><pre>systemctl start kea-dhcp4<br>systemctl enable --now kea-dhcp4<br>systemctl status kea-dhcp4</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/0*9UiknFjiiT_Sc5pi.png" /></figure><h3>Step 13 — Open the Firewall</h3><p>Install and enable firewalld if it isn’t already running:</p><pre>dnf install -y firewalld<br>systemctl enable --now firewalld</pre><p>Open the ports needed for domain joining and AD services:</p><pre>firewall-cmd --permanent --add-service=dns<br>firewall-cmd --permanent --add-service=kerberos<br>firewall-cmd --permanent --add-service=kpasswd<br>firewall-cmd --permanent --add-service=ldap<br>firewall-cmd --permanent --add-service=ldaps<br>firewall-cmd --permanent --add-service=samba<br>firewall-cmd --permanent --add-service=samba-dc<br>firewall-cmd --permanent --add-service=ntp</pre><pre># RPC dynamic ports (required for Windows domain join)<br>firewall-cmd --permanent --add-port=49152-65535/tcp</pre><pre># Global Catalog<br>firewall-cmd --permanent --add-port=3268/tcp<br>firewall-cmd --permanent --add-port=3269/tcp</pre><pre># DHCP<br>firewall-cmd --permanent --add-port=67/udp</pre><pre>firewall-cmd --reload<br>firewall-cmd --list-all</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/0*h4n5SgOENvtUP_JE.png" /></figure><h3>What’s Next?</h3><p>Your Samba Active Directory Domain Controller is now up and running on Alma Linux. In the next part of this series, we’ll cover:</p><ul><li>Joining a Windows 10/11 machine to the domain</li><li>Creating and managing users with samba-tool</li><li>Setting up Group Policy Objects (GPOs)</li></ul><p><em>Follow along for the next part. All commands in this guide were tested on Alma Linux 10.</em></p><p>Leave a comment</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7cf8ece91481" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>