<?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 Damilola Davids on Medium]]></title>
        <description><![CDATA[Stories by Damilola Davids on Medium]]></description>
        <link>https://medium.com/@damilolavicdavids?source=rss-354012f24cb9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*lSJRv8lPYINlgAL6ngo-FQ.jpeg</url>
            <title>Stories by Damilola Davids on Medium</title>
            <link>https://medium.com/@damilolavicdavids?source=rss-354012f24cb9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 00:52:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@damilolavicdavids/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[100 Days of DevOps -Day 10: Automating Website Backups with Bash and Passwordless SSH]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-10-automating-website-backups-with-bash-and-passwordless-ssh-6ec9e48754b6?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ec9e48754b6</guid>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Sat, 16 Aug 2025 00:08:51 GMT</pubDate>
            <atom:updated>2025-08-16T00:08:51.513Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Task:</strong><br> Create a bash script to back up the static website running on <strong>App Server 2</strong> in Stratos Datacenter using the following instructions:</p><ol><li>Create a <strong>zip archive</strong> of /var/www/html/official.</li><li>Save it in /backup/ on App Server 2.</li><li>Copy the archive to /backup/ on the Nautilus Backup Server.</li><li>The script should not require a password when copying (passwordless SSH).</li><li>The script should be runnable by the respective server user.</li></ol><p><strong>Solution:</strong></p><ol><li><strong>Create </strong><strong>/scripts directory and the script file</strong></li></ol><pre>mkdir -p /scripts <br>vi /scripts/official_backup.sh</pre><p><strong>2. Paste the script content</strong></p><pre>#!/bin/bash<br><br># Variables<br>SRC_DIR=&quot;/var/www/html/official&quot;<br>BACKUP_NAME=&quot;xfusioncorp_official.zip&quot;<br>LOCAL_BACKUP_DIR=&quot;/backup&quot;<br>REMOTE_USER=&quot;clint&quot;           # Replace with actual user for App Server 2<br>REMOTE_HOST=&quot;172.16.238.16&quot;   # Replace with Nautilus Backup Server IP<br>REMOTE_DIR=&quot;/backup&quot;<br><br># Create local backup directory if it doesn&#39;t exist<br>mkdir -p $LOCAL_BACKUP_DIR<br><br># Create zip archive of website<br>zip -r $LOCAL_BACKUP_DIR/$BACKUP_NAME $SRC_DIR<br><br># Copy archive to Nautilus Backup Server<br>scp $LOCAL_BACKUP_DIR/$BACKUP_NAME $REMOTE_USER@$REMOTE_HOST:$REMOTE_DIR</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AzopAyuQ_vOzul8oBTljRQ.png" /></figure><p><strong>3. Make the script executable</strong></p><pre>chmod +x /scripts/official_backup.sh</pre><p><strong>4. Configure passwordless SSH to Backup Server</strong></p><pre>#generate SSH key<br>ssh-keygen -t rsa <br><br>#Copied key to Nautilus Backup Server<br>ssh-copy-id username@bkupserver_ip </pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*poUikYDT6uzpb4fmWlA7uA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_j7pbMd0-u27s-U6yhOw-g.png" /></figure><p>Checked and I was able to login to the bkup server without password</p><p><strong>5. Tested the script</strong></p><pre>/scripts/official_backup.sh</pre><p>Output: The archive was created in /backup/ on App Server 2 <strong>and</strong> copied to /backup/ on the Nautilus Backup Server without any password prompt.</p><p>💬 Follow along with my daily tasks from the #100DaysOfDevOps challenge by KodeKloud.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ec9e48754b6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 9: Fixing MariaDB Service Downtime]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-9-fixing-mariadb-service-downtime-9a5d970d8c3f?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/9a5d970d8c3f</guid>
            <category><![CDATA[mariadb]]></category>
            <category><![CDATA[sudo]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Fri, 15 Aug 2025 23:26:59 GMT</pubDate>
            <atom:updated>2025-08-15T23:26:59.259Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Scenario:</strong><br> A critical issue hit the Nautilus application in Stratos DC, connection to the database failed. After investigation, the production support team found that the mariadb service was <strong>down</strong> on the database server.</p><p>My task: investigate and bring the service back up.</p><p><strong>What is MariaDB?</strong></p><p>MariaDB is an open-source relational database management system (RDBMS) and a drop-in replacement for MySQL. It’s widely used for storing and managing structured data, supporting SQL queries, transactions, replication, and high availability setups. Many applications, including the Nautilus app here, depend on it for core functionality.</p><p><strong>Solution:</strong></p><ol><li><strong>Connected to the dbserver via SSH:</strong></li></ol><pre>ssh username@dbserver_ip</pre><p><strong>2. Confirmed the status of the MariaDB service</strong></p><pre>sudo systemctl status mariadb</pre><p>Output: service was inactive (dead).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*zNFw9FaOMITlo_siicyWYw.png" /></figure><p><strong>3. Since the service was inactive, I restarted it</strong></p><pre>sudo systemctl start mariadb</pre><p>Output: I got an error:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1012/1*RdVACKLiWgxk0yshQxmj3A.png" /></figure><p><strong>4. I checked the logs to see why the service failed</strong></p><pre>sudo systemctl status mariadb --no-pager -l<br>sudo journalctl -xeu mariadb --no-pager</pre><p>Output showed that: MariaDB sees leftover files in /var/lib/mysql but no proper initialized database. This could have occured due to a partial or failed installation ofthe service.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dwjBwgey6yQHSzkE1TKWIA.png" /></figure><p><strong>5. I stopped the service:</strong></p><pre>sudo systemctl stop mariadb</pre><p><strong>6. Tried to back up the existing /var/lib/mysql directory</strong></p><p>This is so as not to lose anything that might be needed later. I then found out that the directory did not exist at all. MariaDB had nowhere to store data, so it refuses to start. <strong>This was the exact cause of the issue</strong></p><p><strong>7. Created the directory with the correct ownership</strong></p><pre>sudo mkdir /var/lib/mysql<br>sudo chown mysql:mysql /var/lib/mysql<br>sudo chmod 750 /var/lib/mysql</pre><p><strong>8. Initialized the MariaDB data directory</strong></p><pre>sudo mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql</pre><p>Output: Tables were built successfully</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/972/1*fQPyat_gmVvo-MVTELpfCw.png" /></figure><p><strong>9. Started MariaDB and checked the status to be sure it was running</strong></p><pre>sudo systemctl start mariadb <br>sudo systemctl status mariadb</pre><ul><li>Output: Active (running</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*PO1SqzaLaJiGqr4plGV7PA.png" /></figure><p><strong>10. Enabled service at boot to prevent downtime when the system reboots.</strong></p><pre>sudo systemctl enable mariadb</pre><p><strong>11. Checked to see if the application could now connect to the database:</strong></p><pre>sudo mysql -u root -p</pre><p>Output: The application could now connect to MariaDB</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F4B7l4PqasB9ix3e-fwRnQ.png" /></figure><p><strong>Learning Note:</strong><br>MariaDB wouldn’t start simply because its data directory didn’t exist. The fix wasn’t just starting the service. It was creating the right directory, assigning correct permissions, and initializing system tables. The most critical part of troubleshooting is reading the logs carefully and acting on exactly what they say.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9a5d970d8c3f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 8: Installing Ansible v4.8.0 on the Jump Host]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-8-installing-ansible-v4-8-0-on-the-jump-host-8059e04a253f?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/8059e04a253f</guid>
            <category><![CDATA[ansible]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[pip3]]></category>
            <category><![CDATA[ansible-tutorial]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 01:45:36 GMT</pubDate>
            <atom:updated>2025-08-14T01:45:36.435Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Task:</strong><br>Install Ansible v4.8.0 on the jump host using pip3 and make sure it’s available for all users.</p><h3>What is Ansible &amp; What Does It Do?</h3><p>Ansible is an <strong>open-source automation tool</strong> used for:</p><h3>What is Ansible?</h3><p>Ansible is an <strong>open-source automation tool</strong> for:</p><ul><li>Configuration management: set up servers the same way every time.</li><li>Application deployment: install and update software easily.</li><li>Task automation: run commands on many servers at once.</li><li>Orchestration: coordinate multiple machines and services in complex setups.</li></ul><blockquote>It uses playbooks (written in YAML) to define what needs to be done.</blockquote><blockquote>It’s agentless which meansno extra software needed on the target machines, just SSH access.</blockquote><blockquote>It’s popular because it’s simple, readable, and works on many systems.</blockquote><h3>Task Solution:</h3><ol><li><strong>Checked OS and </strong><strong>pip3 availability on Jumphost</strong></li></ol><pre>cat /etc/*release # to check OS<br>python3 --version #Check if Python 3 is installed<br>pip3 --version # to check if pip3 is installed</pre><ul><li>Ansible runs on Python, so the first step is to make sure <strong>Python 3</strong> is available.</li><li>pip3 is Python’s package manager — without it, we can’t install Ansible from PyPI.</li></ul><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/950/1*xaIK04-FarZueEF6aIUGTQ.png" /></figure><p><strong>2. Installed Ansible v4.8.0</strong></p><p>Specified the version to lock it in case there is a newer version than the one specified in the task.</p><pre>sudo pip3 install ansible==4.8.0\</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DYVLiGMsG1JfkHyF7xoSFw.png" /></figure><p><strong>3. After installation was complete, verified installation</strong></p><pre>ansible --version</pre><p><em>When I checked my Ansible version with </em><em>ansible --version, I didn’t see “4.8.0”, instead, I saw “core 2.11.12.” . This is because Ansible’s version command shows the core engine version, not the full package version. To check the full release, I had to run </em><em>pip3 show ansible.</em></p><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jsR49SaaNZYVoS_Hf8XWig.png" /></figure><p><strong>4. Ensured Ansible was available to global users.</strong></p><ul><li>Since Ansible was installed with sudo pip3, It should be in /usr/local/bin and available to all users.</li><li>I checked with the command which ansible to confirm</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*WHlvSuUB9DQahTAQWlEGeQ.png" /></figure><p>It’s in a directory (/usr/local/bin) that’s part of the global $PATH, so any user on the jump host can run ansible without extra setup.</p><p><em>My daily tasks from the </em><strong><em>#100DaysOfDevOps</em></strong><em> challenge by KodeKloud.</em></p><p>#100DaysOfDevOps #DevOps #Linux #SSH #Automation #Security #KodeKloud #LearningInPublic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8059e04a253f" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 7: Setting Up Password-less SSH Authentication]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-7-setting-up-password-less-ssh-authentication-34e0dedb304d?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/34e0dedb304d</guid>
            <category><![CDATA[chmod]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Thu, 14 Aug 2025 00:41:06 GMT</pubDate>
            <atom:updated>2025-08-14T00:41:06.233Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Task</strong><br>Set up password-less authentication from thor on the jump host to all app servers via their respective sudo users.</p><p><strong>What is password-less SSH?</strong><br>Password-less SSH uses public/private key pairs instead of typing a password every time you connect to a server. I</p><ul><li>Enables automation (scripts, cron jobs) without manual password entry</li><li>Improves security, as private keys are harder to brute-force than passwords</li><li>Helps with consistency when managing multiple servers</li></ul><h3>Steps taken to carry out the task</h3><p><strong>1️. I made sure I was connected to the jump host ‘thor’</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/491/1*IPJ2iCZYDh_wpcb2llaU5g.png" /></figure><p><strong>2️. Generated SSH key pair for </strong><strong>thor</strong></p><pre>ssh-keygen -t rsa<br></pre><ul><li>Pressed Enter to accept default file location (~/.ssh/id_rsa).</li><li>Left the passphrase empty to allow full automation.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*6c3jX5kzK_4ITVloqRpCkA.png" /></figure><ul><li>The keys were saved to</li></ul><pre>~/.ssh/id_rsa    # Private key (keep safe)<br>~/.ssh/id_rsa.pub  # Public key</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L0CQOR9aaASDF7rjw53vPw.png" /></figure><p><strong>3️. Copied the public key to each app server’s sudo user</strong></p><p>For App Server 1 (tony):</p><pre>#For App Server 1 (tony):<br>ssh-copy-id tony@&lt;app_server1_ip&gt;<br><br>#For App Server 2 (steve):<br>ssh-copy-id steve@&lt;app_server2_ip&gt;<br><br>#For App Server 3 (banner):<br>ssh-copy-id banner@&lt;app_server3_ip&gt;</pre><p>💡 <strong>Note:</strong> Entered each user’s password <strong>once</strong> during this step. After that, no password was needed</p><p><strong>4. Tested password-less login to each app server</strong></p><pre>ssh tony@&lt;app_server1_ip&gt;<br>ssh steve@&lt;app_server2_ip&gt;<br>ssh banner@&lt;app_server3_ip&gt;</pre><p>Each connection succeeded without prompting for a password.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1002/1*1gEWiGQljUPNaqZY_WF3Aw.png" /></figure><p><strong>5. As best practice, protected my private key with:</strong></p><pre>chmod 600 ~/.ssh/id_rsa</pre><p><strong>chmod</strong> (short for <strong>change mode</strong>) is a Linux command used to change a file’s permissions.</p><ul><li><strong>6</strong> Owner can <strong>read (4)</strong> + <strong>write (2)</strong> = <strong>6</strong></li><li><strong>0</strong> →Group has <strong>no permissions</strong></li><li><strong>0</strong> Others have <strong>no permissions</strong></li></ul><p>This ensures only the owner can read the key. Without this, other users on the same system could copy the key and gain access.</p><p><strong>Key Takeaways</strong></p><ul><li>SSH key-based authentication improves automation and security.</li><li>ssh-copy-id is the fastest way to configure the authentication</li><li>Always secure your private key with chmod 600 in real-world setups.</li></ul><p><em>My daily tasks from the </em><strong><em>#100DaysOfDevOps</em></strong><em> challenge by KodeKloud.</em></p><p>#100DaysOfDevOps #DevOps #Linux #SSH #Automation #Security #KodeKloud #LearningInPublic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34e0dedb304d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 6: Setting Up a Cron Job]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-6-setting-up-a-cron-job-979089ff87c9?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/979089ff87c9</guid>
            <category><![CDATA[sudo]]></category>
            <category><![CDATA[bash]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[crond]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Wed, 13 Aug 2025 23:19:41 GMT</pubDate>
            <atom:updated>2025-08-13T23:19:41.489Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Task</strong></p><p>On all Nautilus app servers:</p><ul><li>Install cronie package and start the crond service.</li><li>Create a cron job for the root user to run every 5 minutes: echo hello &gt; /tmp/cron_text</li></ul><p><strong>Cron jobs</strong> are a simple but powerful way to automate repetitive tasks — from running backups to sending alerts. This test job writes “hello” to a file every 5 minutes, helping validate that the scheduling works before deploying production scripts.</p><h3>Steps taken to carry out the task</h3><p><strong>1️. Checked OS type</strong></p><ul><li>Connected to each app server via SSH as the assigned user</li><li>Confirmed the Linux distribution since package managers differ between Linux distributions:</li></ul><pre>cat /etc/os-release</pre><p><strong>2. Installed Cron package</strong></p><ul><li>Installedcronie (cron utility package).</li><li>Used yumfor the CentOS distribution (apt is used for debian and ubuntu.)</li></ul><pre>sudo yum install cronie -y</pre><p><strong>3. Started and enabled the crond service</strong></p><pre>sudo systemctl start crond<br>sudo systemctl enable crond<br>sudo systemctl status crond</pre><p>Output:</p><p>active (running) confirms it’s working.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2cioBm_dYS9kFcf7BnyskQ.png" /></figure><p><strong>4. Edited root’s crontab</strong></p><p>Opened the crontab editor:</p><pre>sudo crontab -e</pre><p>Added this line to root’s crontab to run the job every 5 minutes</p><pre>*/5 * * * * echo hello &gt; /tmp/cron_text</pre><p><strong>Breakdown:</strong></p><ul><li><strong>*/5</strong> → run every 5 minutes.</li><li><strong>* * *</strong> → no restrictions on hour, day, month, or day of week.</li><li><strong>echo hello</strong> → command that outputs the text &quot;hello&quot;.</li><li><strong>&gt; /tmp/cron_text</strong> → writes that output to the file /tmp/cron_text, overwriting it each time.</li></ul><p>This means that every 5 minutes, the cron job replaces the contents of /tmp/cron_text with the word hello.</p><p><strong>5. Saved and verified the cron job</strong></p><ul><li>Saved and exited the crontab editor.</li><li>Verified the cron job is scheduled:</li></ul><pre>sudo crontab -l</pre><p>Output showed the scheduled task:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/815/1*qoG8lD649LbHU2_pG62B5g.png" /></figure><p><strong>6. Waited for the cron job to run</strong></p><p>Waited for a little over 5 minutes then ran:</p><pre>cat /tmp/cron_text</pre><p>Output: hello</p><p>This confirmed success.</p><h3>Key Takeaways</h3><ul><li>Cron is essential for Linux automation.</li><li>Verify the cron service is running.</li><li>Use test jobs before deploying critical scheduled tasks.</li></ul><p>💬 Following along with my daily tasks from the <strong>#100DaysOfDevOps</strong> challenge by KodeKloud.</p><p>#100DaysOfDevOps #DevOps #Linux #Automation #Cron #KodeKloud #LearningInPublic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=979089ff87c9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 5: Installing & Disabling SELinux (for Maintenance)]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-5-installing-disabling-selinux-for-maintenance-057020564e27?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/057020564e27</guid>
            <category><![CDATA[centos]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[redhat-linux]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[selinux]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Mon, 11 Aug 2025 18:54:12 GMT</pubDate>
            <atom:updated>2025-08-12T21:15:41.925Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Task</strong></p><p>On <strong>App Server 1</strong> within the Stratos Datacenter:</p><ul><li>Install the required SELinux packages</li><li>Permanently disable SELinux (for now)</li><li>No reboot needed immediately; it will be disabled after the planned maintenance reboot tonight</li></ul><h4>What is SELinux?</h4><p><strong>SELinux (Security-Enhanced Linux)</strong> is a security module built into the Linux kernel that enforces <strong>Mandatory Access Control (MAC)</strong>.<br> Instead of relying only on standard Linux permissions (owner, group, others), SELinux uses <strong>policies</strong> to decide which processes can access which files, sockets, and other system resourceseven if standard permissions would normally allow it.</p><p>This adds a second layer of defense against misconfigurations or exploited services.</p><h4>Steps Taken to Carry Out the Task</h4><h4><strong>1. Checked the OS Version</strong></h4><p>I confirmed the server’s operating system to determine which package manager to use.</p><pre>cat /etc/*release</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*B-KPONUK4xY0bUoTIFT8ug.png" /></figure><h4><strong>2. Installed the Required SELinux Packages using yum</strong></h4><p>The OS showed CentOS, so I used yum for installing packages. I sucessfully installed the packages</p><pre>sudo yum install selinux-policy selinux-policy-targeted policycoreutils</pre><ul><li>selinux-policy → The base rule set for SELinux</li><li>selinux-policy-targeted → Default policy that targets high-risk services</li><li>policycoreutils → Command-line tools to manage SELinux</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-r_K8F--hswjtNaKcoloLQ.png" /></figure><h4><strong>️3. Permanently Disabled SELinux</strong></h4><ul><li>Opened the SELinux configuration file:</li></ul><pre>sudo vi /etc/selinux/config<br><br>#Once the file was opened, Changed<br>SELINUX=enforcing<br><br>#to <br><br>SELINUX=disabled</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dKaYtKrUY44fvb3GbFXxpQ.png" /></figure><ul><li>Saved and exited the file in vi using (:wq).</li></ul><h4>4️. Verified the Config Change</h4><pre>grep SELINUX= /etc/selinux/config</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*KWJePvQhQ-WnUTmkinnmNg.png" /></figure><p>This confirms that after the next reboot, SELinux will be disabled.</p><h3>Key Takeaways</h3><ul><li>SELinux adds a policy-based security layer that works alongside traditional Linux permissions</li><li>Permanent changes to SELinux state require editing /etc/selinux/config</li></ul><p>💬 Following along with my daily tasks from the <strong>#100DaysOfDevOps</strong> challenge by <strong>KodeKloud</strong>.</p><p>#100DaysOfDevOps #DevOps #Linux #SELinux #Security #KodeKloud #LearningInPublic</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=057020564e27" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 4: Granting Execute Permissions to a Script]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-4-granting-execute-permissions-to-a-script-19661fcbd95e?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/19661fcbd95e</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[permission]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Sun, 10 Aug 2025 19:56:14 GMT</pubDate>
            <atom:updated>2025-08-10T19:56:14.546Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Task</strong></p><p>On App Server 3 within the Stratos Datacenter:</p><ul><li>Grant <strong>execute permissions</strong> to the /tmp/xfusioncorp.sh script</li><li>Ensure <strong>all users</strong> can execute it</li></ul><p>In Linux, a file won’t run as a program unless it has <strong>execute permissions</strong> (x) even if it contains valid commands or code. In team environments, shared scripts (like backup jobs) are often stored in shared directories. Making them readable + executable for all users ensures automation tools, cron jobs, and team members can run them without hitting permission errors.</p><h3>Steps taken to carry out the task</h3><p><strong>1. Connected to App Server 3 via SSH</strong></p><pre>ssh username@hostname<br># Entered the password when prompted</pre><p><strong>2. Checked the Current Permissions</strong></p><pre>ls -l /tmp/xfusioncorp.sh</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/991/1*rB9ZiyqkSsALMLgffr1Zdg.png" /></figure><p>This shows that the script does not have any permissions at the moment. <strong>scripts need read (</strong><strong>r) and execute (</strong><strong>x)</strong> permission to be executable. Without r, the shell can’t read the commands inside the file to run them.</p><p><strong>3. Granted Execute Permissions to All Users</strong></p><pre>sudo chmod a+rx /tmp/xfusioncorp.sh</pre><ul><li>a means all users (owner, group, others)</li><li>+rx → add <strong>read</strong> and <strong>execute</strong> permission</li></ul><p><strong>4️. Verified the Change</strong></p><pre>ls -l /tmp/xfusioncorp.sh</pre><p>Output:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/734/1*FUANKwt5q26s58F8RuyNcw.png" /></figure><p>Now x appears for <strong>owner</strong>, <strong>group</strong>, and <strong>others</strong>, meaning all can execute the script.</p><pre><strong><em>Quick permission guide:</em></strong><br>In -r-xr-x--x:<br>First char → file type (- = file, d = directory)<br>Next 3 → owner perms (r-x = read + execute)<br>Next 3 → group perms (r-x = read + execute)<br>Last 3 → others perms (--x = execute only)<br><br>r = read, w = write, x = execute, - = no permission.</pre><p><strong>5. Tested Execution to confirm the script runs without permission errors</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*68uEHnKwSk5F_6eCWd_h9Q.png" /></figure><h3>Key Takeaways</h3><ul><li>Scripts need execute permission (x) to run</li><li>chmod a+x is a quick way to grant execute rights to everyone</li><li>Verify with ls -l after changing permissions</li></ul><p>💬 Following along with my daily tasks from the #100DaysOfDevOps challenge by KodeKloud.</p><p>#100DaysOfDevOps #DevOps #Linux #Permissions #KodeKloud #LearningInPublic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1Fe2w8iMkwuzlF6do6bIJw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=19661fcbd95e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 3: Disabling Direct SSH Root Login on All App Servers]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-3-disabling-direct-ssh-root-login-on-all-app-servers-1c2c5558dabd?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/1c2c5558dabd</guid>
            <category><![CDATA[servers]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[sudo]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[root-login]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Fri, 08 Aug 2025 15:22:02 GMT</pubDate>
            <atom:updated>2025-08-08T15:22:02.818Z</atom:updated>
            <content:encoded><![CDATA[<p>Today’s task in the <strong>100 Days of DevOps</strong> challenge by KodeKloud was all about <strong>server security, </strong>specifically, disabling direct SSH root login on all application servers in the Stratos Datacenter. There were 3 Application servers in all.</p><h4>Why Disable Direct Root Login?</h4><p>On Linux systems, the <strong>root</strong> account has unrestricted privileges. If an attacker gains access to it, they can control everything.</p><p>Allowing root to log in directly over SSH is risky because:</p><ul><li>It’s a well-known username, attackers don’t have to guess it</li><li>Brute-force attacks become easier</li><li>There’s no way to track individual user actions if everyone uses root</li></ul><p><strong>The best practice is to:</strong></p><ul><li>Have users log in with their own accounts</li><li>Grant them administrative privileges via sudo when needed</li></ul><p><strong>Example:</strong> On cloud servers (like AWS EC2), providers disable root SSH login by default — you log in as ec2-user, ubuntu, or similar, then use sudo for admin tasks.</p><h4>Steps Taken</h4><p><strong>1. Connected to Each App Server via SSH</strong></p><pre>ssh username@server_ip</pre><p>The task required repeating the process for all three app servers.</p><p><strong>2. Edited the SSH Configuration File</strong></p><p>Opened the sshd_config file:</p><pre>sudo vi /etc/ssh/sshd_config</pre><p>Pressed <strong>i</strong> to enter insert mode, then found the line:</p><pre>PermitRootLogin yes</pre><p>Changed it to</p><pre>PermitRootLogin no</pre><p>Changing it to no disables root login via SSH.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/922/1*SrnRzT1Z-w3ixTPUerKAPg.png" /></figure><p><strong>3. Saved and Closed the File</strong></p><p>Pressed Esc → typed :wq → hit Enter.</p><p><strong>4. Restarted the SSH Service</strong></p><pre>sudo systemctl restart sshd</pre><p><strong>5. Verified the Setting</strong></p><p>Instead of trying to log in as root (since I didn’t have the root password), I checked with:</p><pre>sudo sshd -T | grep permitrootlogin</pre><p><strong>Output:</strong></p><pre>permitrootlogin no</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*R5feUAhZiSAU2tHVmg6rtQ.png" /></figure><p>Confirmed the setting had taken effect.</p><p><strong>6. Repeated for All App Servers</strong></p><p>I followed the same steps on the remaining two servers.</p><h4>Key Takeaways</h4><ul><li>Disabling root SSH login is a <strong>fundamental server hardening step.</strong></li><li>Always verify changes with sshd -T or by testing login.</li><li>Use sudo privileges for admin work instead of direct root access.</li></ul><p>💬 I’ll keep sharing these daily tasks here on Medium and shorter recaps on <a href="http://Alright — here’s your **Day 3 Medium post** in the same style as Days 1 and 2, with an explanation of the concept and a real-world tie-in.  ---  # **100 Days of DevOps — Day 3: Disabling Direct SSH Root Login on All App Servers**  Today’s task in the **100 Days of DevOps** challenge by [KodeKloud](https://kodekloud.com/) was all about **server security** — specifically, disabling direct SSH root login on all application servers in the Stratos Datacenter.  ---  ## **Why Disable Direct Root Login?**  On Linux systems, the **root** account has unrestricted privileges. If an attacker gains access to it, they can control everything.  Allowing root to log in directly over SSH is risky because:  * It’s a well-known username — attackers don’t have to guess it * Brute-force attacks become easier * There’s no way to track individual user actions if everyone uses root  **Better practice:**  * Have users log in with their own accounts * Grant them administrative privileges via `sudo` when needed  **Example:** On cloud servers (like AWS EC2), providers disable root SSH login by default — you log in as `ec2-user`, `ubuntu`, or similar, then use `sudo` for admin tasks.  ---  ## **Steps I Took**  ### 1️⃣ **Connected to Each App Server via SSH**  ```bash ssh username@server_ip ```  The task required repeating the process for all three app servers.  ---  ### 2️⃣ **Edited the SSH Configuration File**  Opened the `sshd_config` file:  ```bash sudo vi /etc/ssh/sshd_config ```  Pressed **`i`** to enter insert mode, then found the line:  ``` PermitRootLogin yes ```  Changed it to:  ``` PermitRootLogin no ```  ---  ### 3️⃣ **Saved and Closed the File**  Pressed `Esc` → typed `:wq` → hit Enter.  ---  ### 4️⃣ **Restarted the SSH Service**  ```bash sudo systemctl restart sshd ```  ---  ### 5️⃣ **Verified the Setting**  Instead of trying to log in as root (since I didn’t have the root password), I checked with:  ```bash sudo sshd -T | grep permitrootlogin ```  **Output:**  ``` permitrootlogin no ```  Confirmed the setting had taken effect.  ---  ### 6️⃣ **Repeated for All App Servers**  I followed the same steps on the remaining two servers.  ---  ## **Key Takeaways**  * Disabling root SSH login is a **fundamental server hardening step** * Always verify changes with `sshd -T` or by testing login * Use `sudo` privileges for admin work instead of direct root access  ---  💬 I’ll keep sharing these daily tasks here on Medium and shorter recaps on LinkedIn. If you want to join in, the challenge is free and here: [https://kodekloud.com/100-days-of-devops/](https://kodekloud.com/100-days-of-devops/)  \#100DaysOfDevOps #DevOps #Linux #Security #SSH #KodeKloud #LearningInPublic  ---  Do you want me to also draft your **Day 3 LinkedIn post** and graphic layout so it matches the Day 1 and 2 format? That way you’ll have the whole set ready to publish.">LinkedIn.</a></p><p>#100DaysOfDevOps #DevOps #Linux #Security #SSH #KodeKloud #LearningInPublic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N59vVMhMRigzEJC_O1u1VQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1c2c5558dabd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -Day 2: Creating a User with an Expiry Date]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-2-creating-a-user-with-an-expiry-date-4fdf5527b542?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fdf5527b542</guid>
            <category><![CDATA[devops-practice]]></category>
            <category><![CDATA[user-security]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[kodekloud]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 23:04:36 GMT</pubDate>
            <atom:updated>2025-08-07T23:04:36.051Z</atom:updated>
            <content:encoded><![CDATA[<h4>Today’s Task:</h4><p><strong>Create a user named </strong>siva <strong>on App Server 2 and set the expiry date to</strong> 2024-04-15, ensuring the username is in lowercase as per standard protocol.</p><h4>Why Set a User Expiry Date?</h4><p>An account expiry date is a <strong>security control</strong> that automatically disables a user after a specific date.<br> This is useful for:</p><ul><li>Temporary staff or contractors</li><li>Project-based accounts</li><li>Accounts created for audits, testing, or training</li></ul><p>It saves you from having to remember to manually disable accounts, and it reduces the risk of unused accounts being exploited. A perfect use case is giving a contract developer SSH access only until the project deadline — once the expiry date passes, the account is locked automatically.</p><h3>Steps I Took</h3><h4>1. Connected to App Server 2 via SSH</h4><pre>ssh username@IP_or_hostname<br># Entered the password when prompted</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Rb5v9iBjDf11RB9L2XKarw.png" /></figure><h4>2. Created the User with an Expiry Date</h4><pre>sudo useradd -e 2024-04-15 -m siva</pre><ul><li>-e sets the expiry date</li><li>-m → creates a home directory (e.g., /home/siva) so the user has a place to store files and configurations</li></ul><h4>3. Set a Password for the User</h4><pre>sudo passwd siva</pre><ul><li>Entered and confirmed the password for the account.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*z9-IMNYjvGjWk_kOXuH6lg.png" /></figure><h4>4. Verified the Expiry Date</h4><pre>sudo chage -l siva</pre><p><strong>Output snippet:</strong></p><pre>Account expires    : Apr 15, 2024</pre><p>This confirms the expiry date is set correctly.</p><h3>Key Takeaways</h3><ul><li>-e in useradd sets an account expiry date</li><li>Expiry dates are essential for <strong>temporary account security</strong></li><li>Verify account expiration with chage -l &lt;username&gt;</li></ul><p>I’m documenting all 100 days here on Medium and sharing shorter updates on <a href="https://www.linkedin.com/in/damilola-davids/">LinkedIn.</a></p><p>#100DaysOfDevOps #DevOps #Linux #UserManagement #Security #KodeKloud #LearningInPublic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eDD77Vf9E5ksUzOQUdIvqg.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fdf5527b542" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[100 Days of DevOps -  Day 1: Creating a User with a Non-Interactive Shell]]></title>
            <link>https://medium.com/@damilolavicdavids/100-days-of-devops-day-1-creating-a-user-with-a-non-interactive-shell-bb485b31f14b?source=rss-354012f24cb9------2</link>
            <guid isPermaLink="false">https://medium.com/p/bb485b31f14b</guid>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[shell-script]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Damilola Davids]]></dc:creator>
            <pubDate>Thu, 07 Aug 2025 20:07:37 GMT</pubDate>
            <atom:updated>2025-08-07T21:32:39.265Z</atom:updated>
            <content:encoded><![CDATA[<h3>100 Days of DevOps - Day 1: Creating a User with a Non-Interactive Shell</h3><p>I’ve started the <strong>100 Days of DevOps</strong> challenge by KodeKloud , a hands-on learning program where each day comes with a small, practical DevOps task.<br> Instead of overwhelming learners with huge projects, KodeKloud breaks DevOps concepts into <strong>100 bite-sized exercises</strong> so you can build real skills progressively.</p><p><strong>Today’s Task:</strong> <strong>Create a user named</strong> anita <strong>with a non-interactive shell on App Server 1.</strong></p><p><strong><em>What is a Non-Interactive Shell?</em></strong><br>A non-interactive shell is a shell that does not allow the user to log in and interact directly with the system. It is often used as a security measure for accounts that are meant to run background tasks or automated processes, but not for humans to log in.</p><p>Examples:</p><ul><li>Terraform AWS User with no console access, can run automation but no one can log in to the console with the credentials</li><li>Database Service Account for scheduled backups — can run backup jobs, but no one can SSH into it.</li></ul><h3>Steps Taken</h3><p><strong>1️. Connected to App Server 1 via SSH</strong></p><pre>ssh username@hostname<br># Entered the server password when prompted</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZH29UlGSVAU5K50_dAojFw.png" /></figure><p><strong>2. Created the User with a Non-Interactive Shell</strong></p><pre>sudo useradd -s /sbin/nologin anita</pre><ul><li>-s /sbin/nologindisables shell access making it non-interactive.</li></ul><p><strong>3. Verified the User</strong></p><pre>getent passwd anita</pre><p><strong>Output:</strong></p><ul><li>Got the output in the image below showing user has been created.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/855/1*k10uWURyfdEnYBIBxBhJzw.png" /></figure><p>This confirms that:</p><ul><li>User anita exists</li><li>The shell is /sbin/nologin (non-interactive)</li></ul><h3>Key Takeaways</h3><ul><li>Non-interactive shells help secure service or automation accounts</li><li>Always verify user creation with getent passwd &lt;username&gt;</li><li>This setup is common for automation, backups, and application service accounts</li></ul><p>💬 I’ll be documenting all 100 days here on Medium and posting short daily updates on <a href="https://www.linkedin.com/in/damilola-davids/">LinkedIn</a>.</p><p>#100DaysOfDevOps #DevOps #Linux #Security #KodeKloud #LearningInPublic</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MtsgLvMssP1Qri0uE8j-QQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bb485b31f14b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>