<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Ebenezer Emelogu</title>
    <description>The latest articles on DEV Community by Ebenezer Emelogu (@eben).</description>
    <link>https://dev.to/eben</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F1074116%2Fe8ecdb9e-2793-423a-aea2-a8c26df954c1.png</url>
      <title>DEV Community: Ebenezer Emelogu</title>
      <link>https://dev.to/eben</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/eben"/>
    <language>en</language>
    <item>
      <title>🚀 How to Create a Learning Budget in Azure?</title>
      <dc:creator>Ebenezer Emelogu</dc:creator>
      <pubDate>Mon, 10 Mar 2025 12:13:11 +0000</pubDate>
      <link>https://dev.to/eben/how-to-create-a-learning-budget-in-azure-3pcl</link>
      <guid>https://dev.to/eben/how-to-create-a-learning-budget-in-azure-3pcl</guid>
      <description>&lt;h2&gt;
  
  
  🔍 Introduction
&lt;/h2&gt;

&lt;p&gt;Learning new skills can be incredibly beneficial for career advancement and professional growth. However, managing your expenses 💰 is essential to ensure that your learning experience remains affordable. This article will walk you through the step-by-step process of setting up a budget, allowing you to track your spending while ensuring you can afford to continue learning with Azure.  &lt;/p&gt;

&lt;h2&gt;
  
  
  ❓ Why a Learning Budget?
&lt;/h2&gt;

&lt;p&gt;As cloud adoption ☁️ has rapidly increased in recent years, many learners have struggled to use Azure effectively due to subscription access limitations. The free $200 monthly credit 🏷️ is often insufficient for long-term learning, especially for users on the African continent 🌍. To make this easier, users can create a long-term budget for learning and practice.  &lt;/p&gt;

&lt;h2&gt;
  
  
  🇳🇬 For Nigerian Users
&lt;/h2&gt;

&lt;p&gt;If you're in Nigeria, Azure does not support NGN payment methods ❌ as they are not accepted as billing options. To bypass this issue, you can obtain a virtual dollar card 💳 and fund it using Naira, which can then be used to purchase USD equivalent. Platforms like &lt;strong&gt;GeegPay, Clever, and Chipper&lt;/strong&gt; provide virtual cards for this purpose.  &lt;/p&gt;

&lt;p&gt;For those comfortable with cryptocurrency 💱, you can use &lt;strong&gt;ByBit virtual cards, Bitmama cards&lt;/strong&gt;, or any other crypto-based payment platform of your choice. Keep in mind that these virtual cards may come with a &lt;strong&gt;creation fee&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;Once your payment method is set up, you can proceed to &lt;strong&gt;create an Azure account&lt;/strong&gt; and set up your &lt;strong&gt;budget&lt;/strong&gt;.  &lt;/p&gt;

&lt;h2&gt;
  
  
  📝 Step 1: Sign Up for Azure
&lt;/h2&gt;

&lt;p&gt;Before setting up a budget, you need to have an Azure account. If you don’t have one, you can create a &lt;strong&gt;free account&lt;/strong&gt; that includes &lt;strong&gt;$200 in credit&lt;/strong&gt; for the first 30 days 🎉 and access to popular services for &lt;strong&gt;12 months&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;✅ &lt;strong&gt;Steps to Sign Up:&lt;/strong&gt;  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Visit the &lt;a href="https://azure.microsoft.com/" rel="noopener noreferrer"&gt;Azure website&lt;/a&gt;.
&lt;/li&gt;
&lt;li&gt;Click on &lt;strong&gt;“Start free”&lt;/strong&gt; and follow the instructions to create your account.
&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  💰 Step 2: Understand Azure Pricing
&lt;/h2&gt;

&lt;p&gt;Azure follows a &lt;strong&gt;pay-as-you-go&lt;/strong&gt; pricing model 💵, meaning you only pay for the services you use. Understanding the pricing of the services you plan to use is crucial for managing costs. The &lt;a href="https://azure.microsoft.com/en-us/pricing/calculator/" rel="noopener noreferrer"&gt;Azure Pricing Calculator&lt;/a&gt; can help you estimate expenses for different services.  &lt;/p&gt;

&lt;h2&gt;
  
  
  💼 Step 3: Set Up Cost Management and Billing
&lt;/h2&gt;

&lt;p&gt;Azure provides built-in tools ⚙️ for &lt;strong&gt;cost management and billing&lt;/strong&gt; to help you track and control your spending.  &lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ &lt;strong&gt;Access Cost Management + Billing&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Log into the &lt;strong&gt;Azure portal&lt;/strong&gt; 🔐.
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;left-hand menu&lt;/strong&gt;, select &lt;strong&gt;“Cost Management + Billing”&lt;/strong&gt;. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzlb3xzbx76e6ssuv5l6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ffzlb3xzbx76e6ssuv5l6.png" alt="Image description" width="800" height="464"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2️⃣ &lt;strong&gt;Create a Budget&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Cost Management + Billing&lt;/strong&gt; section, select &lt;strong&gt;"Subscriptions"&lt;/strong&gt; and &lt;strong&gt;“Budgets”&lt;/strong&gt; 📊. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijcbt79wpwtoex3jpyvu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fijcbt79wpwtoex3jpyvu.png" alt="Image description" width="800" height="330"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fell1i99zumih8gbpy3uw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fell1i99zumih8gbpy3uw.png" alt="Image description" width="800" height="454"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2v3wjdbwus4k30ypd9j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq2v3wjdbwus4k30ypd9j.png" alt="Image description" width="278" height="566"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Click &lt;strong&gt;“Add”&lt;/strong&gt; ➕ to create a new budget.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsslkadlqzoik3esyaywy.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsslkadlqzoik3esyaywy.png" alt="Image description" width="800" height="289"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Enter details such as the &lt;strong&gt;budget name, scope, and spending limit&lt;/strong&gt; 💵.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8zs9duv6wtoulhmo2uav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8zs9duv6wtoulhmo2uav.png" alt="Image description" width="671" height="836"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Set up &lt;strong&gt;alerts&lt;/strong&gt; 🔔 to notify you when your spending reaches specific thresholds.  (Optional)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  📊 Step 4: Monitor Your Spending
&lt;/h2&gt;

&lt;p&gt;Regularly tracking your expenses ensures you stay within your budget. Azure provides multiple tools 🛠️ to help monitor your spending.  &lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 &lt;strong&gt;Cost Analysis&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Cost Management + Billing&lt;/strong&gt; section, select &lt;strong&gt;“Cost Analysis”&lt;/strong&gt; 📉.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcex0vzq8rt979zabc6rn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fcex0vzq8rt979zabc6rn.png" alt="Image description" width="800" height="376"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Use filters to view spending &lt;strong&gt;by service, resource group, or time period&lt;/strong&gt;.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  🔔 &lt;strong&gt;Cost Alerts&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Set up &lt;strong&gt;cost alerts&lt;/strong&gt; to receive &lt;strong&gt;notifications&lt;/strong&gt; 📩 when your spending exceeds a set limit.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz765btaq6gkr4je8awob.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fz765btaq6gkr4je8awob.png" alt="Image description" width="800" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In the &lt;strong&gt;Cost Management + Billing&lt;/strong&gt; section, select &lt;strong&gt;“Alerts”&lt;/strong&gt; 🚨.
&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;“Add”&lt;/strong&gt; ➕ to create a new alert.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  💡 Step 5: Optimize Your Costs
&lt;/h2&gt;

&lt;p&gt;To maximize your budget, consider using Azure’s &lt;strong&gt;cost-saving features&lt;/strong&gt; 🏷️.  &lt;/p&gt;

&lt;h3&gt;
  
  
  1️⃣ &lt;strong&gt;Azure Reservations&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Purchase &lt;strong&gt;Azure Reservations&lt;/strong&gt; to save up to &lt;strong&gt;72%&lt;/strong&gt; 🏆 compared to pay-as-you-go pricing.
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Azure portal&lt;/strong&gt;, go to &lt;strong&gt;“Reservations”&lt;/strong&gt; and follow the steps to &lt;strong&gt;purchase a reservation&lt;/strong&gt; 🛍️.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  2️⃣ &lt;strong&gt;Azure Cost Management Recommendations&lt;/strong&gt;
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Use &lt;strong&gt;Azure’s cost management recommendations&lt;/strong&gt; ✅ to identify opportunities for savings 💡.
&lt;/li&gt;
&lt;li&gt;In the &lt;strong&gt;Cost Management + Billing&lt;/strong&gt; section, select &lt;strong&gt;“Recommendations”&lt;/strong&gt; 📌.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🎯 Conclusion
&lt;/h2&gt;

&lt;p&gt;Creating a budget for your &lt;strong&gt;Azure learning journey&lt;/strong&gt; is essential to &lt;strong&gt;manage costs effectively&lt;/strong&gt;. By following the &lt;strong&gt;steps in this article&lt;/strong&gt;, you can &lt;strong&gt;establish a budget&lt;/strong&gt;, &lt;strong&gt;track your spending&lt;/strong&gt;, and &lt;strong&gt;optimize costs&lt;/strong&gt;—allowing you to make the most of your &lt;strong&gt;Azure learning experience&lt;/strong&gt; 🚀.  &lt;/p&gt;

</description>
    </item>
    <item>
      <title>Setting Up NGINX on Ubuntu</title>
      <dc:creator>Ebenezer Emelogu</dc:creator>
      <pubDate>Thu, 30 Jan 2025 10:45:28 +0000</pubDate>
      <link>https://dev.to/eben/setting-up-nginx-on-ubuntu-2lni</link>
      <guid>https://dev.to/eben/setting-up-nginx-on-ubuntu-2lni</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;Introduction&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;What is NGINX?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;NGINX (pronounced "Engine-X") is a powerful tool that helps websites run fast and handle many visitors simultaneously. It works like a smart traffic manager, ensuring web pages load quickly and smoothly.&lt;/p&gt;

&lt;p&gt;Originally built as a web server, NGINX is now used for many things, like speeding up websites, balancing traffic, and acting as a security guard for online services. That’s why it’s trusted by some of the biggest websites in the world.&lt;/p&gt;

&lt;p&gt;In this blog, we’ll explore what makes NGINX so useful in a simple way and also share my experience setting up and configuring NGINX on a fresh Ubuntu server.&lt;/p&gt;

&lt;p&gt;I used &lt;strong&gt;Visual Studio Code&lt;/strong&gt; for everything, including the &lt;strong&gt;Remote SSH feature&lt;/strong&gt;, to connect to the Linux machine to simplify things. You can use any SSH client you choose, as it does not matter.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Setting up NGINX on a Linux Server&lt;/strong&gt;
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Server Setup&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;I started by provisioning a fresh Ubuntu server on &lt;strong&gt;Azure&lt;/strong&gt;. Using SSH, I connected to the server and prepared it for NGINX installation. You can use any cloud provider for this or a local Linux machine if needed. &lt;a href="https://learn.microsoft.com/en-us/azure/virtual-machines/linux/quick-create-portal?tabs=ubuntu" rel="noopener noreferrer"&gt;Create a Linux VM on Azure&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aywayygyenvg1cf55b4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F6aywayygyenvg1cf55b4.png" alt="Image description" width="800" height="353"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;This is my Linux machine on the VS Code terminal.&lt;/em&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;NGINX Installation&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;First, we need to make sure to update our packages, as this is a fresh Linux server, and we are using the Ubuntu distribution.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Update your system&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After updating packages, we need to install NGINX using the following commands:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Install NGINX using CLI, press Y to allow it to install&lt;/span&gt;
&lt;span class="nb"&gt;sudo &lt;/span&gt;apt &lt;span class="nb"&gt;install &lt;/span&gt;nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn57iqrzkp016sgbkkcml.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fn57iqrzkp016sgbkkcml.png" alt="Image description" width="800" height="699"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Verify Installation of NGINX&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To verify the installation, check the NGINX version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Check NGINX version&lt;/span&gt;
nginx &lt;span class="nt"&gt;-v&lt;/span&gt;
&lt;span class="c"&gt;# If output is -&amp;gt; nginx version: nginx/1.xx.x (ubuntu)&lt;/span&gt;
&lt;span class="c"&gt;# You have successfully installed it.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29ojl7cdrz3cyji2rb76.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F29ojl7cdrz3cyji2rb76.png" alt="Image description" width="563" height="60"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To see the status of NGINX:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl status nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ohhj0emji2zh6smap9p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F2ohhj0emji2zh6smap9p.png" alt="Image description" width="800" height="312"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;As we can see, NGINX is up and running.&lt;/em&gt;&lt;/p&gt;


&lt;h3&gt;
  
  
  &lt;strong&gt;Custom HTML Page&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;To test our NGINX installation, I opened the default HTML file in the &lt;code&gt;/var/www/html/&lt;/code&gt; directory and replaced it with the text below. You can do this with any text editor of your choice, such as Nano or Vim.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="cp"&gt;&amp;lt;!DOCTYPE html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;head&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;title&amp;gt;&lt;/span&gt;DevOps Stage 0&lt;span class="nt"&gt;&amp;lt;/title&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/head&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;table&lt;/span&gt; &lt;span class="na"&gt;width=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;height=&lt;/span&gt;&lt;span class="s"&gt;"100%"&lt;/span&gt; &lt;span class="na"&gt;style=&lt;/span&gt;&lt;span class="s"&gt;"text-align: center; border-spacing: 0;"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;tr&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;td&amp;gt;&lt;/span&gt;
                &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;Welcome to DevOps Stage 0 - Ebenezer Emelogu/Eben&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
            &lt;span class="nt"&gt;&amp;lt;/td&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/tr&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/table&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;First, change the file ownership on the &lt;code&gt;index.nginx-debian.html&lt;/code&gt; file, as by default, the current user will not be able to make write changes to this file.&lt;/p&gt;

&lt;p&gt;You can give read and write permission to the current user by using this command:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo chown &lt;/span&gt;700 /var/www/html/index.nginx-debian.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;If you just want to make this a one-time change, you can use &lt;code&gt;sudo&lt;/code&gt; instead:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;vi /var/www/html/index.nginx-debian.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Proceed to edit it using a text editor. I am using the &lt;strong&gt;Vim&lt;/strong&gt; text editor in this scenario:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;vi /var/www/html/index.nginx-debian.html
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Paste in the HTML text above and save.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrbl82jfjwuceksy74uf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxrbl82jfjwuceksy74uf.png" alt="Image description" width="783" height="951"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Testing&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;We will use the public IP of the VM to test the web page and see if NGINX serves our HTML page on the browser.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvs0imh264o2jfd9f09v6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvs0imh264o2jfd9f09v6.png" alt="Image description" width="800" height="485"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We get the error that the page is not reachable. This is a network issue, as the port needs to be opened from the network security group on Azure and also set up the UFW on the Ubuntu machine.&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Firewall Configuration&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Checking the UFW status on Ubuntu:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisttiuzwcx755pg8chu7.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fisttiuzwcx755pg8chu7.png" alt="Image description" width="800" height="276"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;This shows that the firewall is inactive.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We will enable it and then set it up for port 22 and port 80:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 22/tcp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;ufw allow 80/tcp
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxy71sdqywj74e37434c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbxy71sdqywj74e37434c.png" alt="Image description" width="763" height="264"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enable UFW for network connections:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw &lt;span class="nb"&gt;enable&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe962c9i37mzpe9v6q6ia.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe962c9i37mzpe9v6q6ia.png" alt="Image description" width="800" height="217"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Checking the status again:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;ufw status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpte89k524tj0ud7v5qpg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpte89k524tj0ud7v5qpg.png" alt="Image description" width="567" height="247"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;We now have ports 80 and 22 opened for connections, and thus NGINX should be able to serve our HTML page now.&lt;/em&gt;&lt;/p&gt;




&lt;h3&gt;
  
  
  &lt;strong&gt;Final Test&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Our webpage is now served.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefs47t6vd8a32wed9xap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fefs47t6vd8a32wed9xap.png" alt="Image description" width="800" height="230"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Challenges Faced&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Firewall Configuration&lt;/strong&gt;: Initially, the NGINX page didn’t load because the firewall blocked HTTP traffic. I resolved this by allowing traffic on port 80 using &lt;code&gt;ufw&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;File Permissions&lt;/strong&gt;: I encountered permission issues while editing the HTML file. Using &lt;code&gt;sudo&lt;/code&gt; resolved this problem.&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;Learning and Growth&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;This task helped me:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Gain hands-on experience with NGINX and Ubuntu.&lt;/li&gt;
&lt;li&gt;Understand basic web server configuration.&lt;/li&gt;
&lt;li&gt;Develop problem-solving skills by troubleshooting firewall and permission issues.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This experience aligns with my goal of becoming a &lt;strong&gt;DevOps Engineer&lt;/strong&gt;, as it introduced me to foundational tools and practices in the field.&lt;/p&gt;




&lt;h2&gt;
  
  
  &lt;strong&gt;References&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://hng.tech/hire/infrastructure-engineers" rel="noopener noreferrer"&gt;Infrastructure Engineers - HNG Tech&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://hng.tech/hire/cloud-engineers" rel="noopener noreferrer"&gt;Cloud Engineers - HNG Tech&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;🚀&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Cloud Cryptography: A Beginner's Guide for Everyday Users</title>
      <dc:creator>Ebenezer Emelogu</dc:creator>
      <pubDate>Wed, 15 Jan 2025 21:09:50 +0000</pubDate>
      <link>https://dev.to/eben/cloud-cryptography-a-beginners-guide-for-everyday-users-fc1</link>
      <guid>https://dev.to/eben/cloud-cryptography-a-beginners-guide-for-everyday-users-fc1</guid>
      <description>&lt;p&gt;The globalization and technological evolution of the modern age have led humanity to discover cloud computing. However, such convenience brings an important question: How do we ensure that our sensitive data remains secure? The key to this issue can be found in cloud cryptography—an intriguing domain that employs Encryption to protect data when it queries the cloud.&lt;/p&gt;

&lt;p&gt;Let's break this down in a simple way with a fun conversation between an IT expert and Osinachi, a curious 10-year-old who's just starting to explore the internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;A Fun Chat About Cloud Security&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: Hey! Quick question. All this talk about "the cloud" — like Google, Apple, and Microsoft services — how safe is it? My data's not just floating around in the air.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: (Laughs) It's not just floating above your head like a raincloud! Think of it as a super-secure vault… but online.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: Hmm. But can someone hack into it? Like those cool spies in movies?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: Only if they're a genius with a lot of time and resources. But that's why we use cryptography. Your data is scrambled into a secret code. So even if someone grabs it, they can't understand it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: Oh! So it's like sending my data in a locked box?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: Exactly! And only you have the key. Unless, of course, you make your key something silly like "12345."&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: Ha! I feel called out.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: (Smiles) We've all been there. I'm just kidding, but cloud providers do take security seriously. They protect your data with Encryption, multi-factor authentication, and secure connections.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: So, are you telling me that Apple, Google, and the others are using James Bond-level tech to keep my files safe?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: Pretty much! And they do it all in the background, so you don't notice. Think of it like having James Bond guarding your data… minus the tuxedo!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: That's cool. But wait, isn't the cloud like a big public space? Isn't everyone using the same servers?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: Good question! Think of it like an apartment building. You've got your own locked space, completely separate from everyone else's. Even if someone causes trouble in their apartment, your space stays secure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Osinachi&lt;/strong&gt;: Got it! So, are there no uninvited guests crashing my data party?&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IT Expert&lt;/strong&gt;: Exactly! Your data stays yours.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Cloud Cryptography?
&lt;/h3&gt;

&lt;p&gt;Cloud cryptography uses Encryption to protect data stored or processed in cloud environments. Encryption turns your data into a scrambled code (ciphertext) that can only be read by someone with the correct key to decrypt it. This ensures that even if unauthorized parties intercept the data, they won't be able to make sense of it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Standard Cryptographic Techniques Used in the Cloud
&lt;/h3&gt;

&lt;p&gt;Here are four standard encryption techniques you'll find in cloud security:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Symmetric Encryption&lt;/strong&gt;&lt;br&gt;
It uses a single key to both encrypt and decrypt data.&lt;br&gt;
It's fast and efficient but requires secure sharing of the key.&lt;br&gt;
Examples: Advanced Encryption Standard (AES) and Data Encryption Standard (DES).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Asymmetric Encryption&lt;/strong&gt;&lt;br&gt;
Involves a pair of keys: a public key and a private key.&lt;br&gt;
The public key encrypts the data, but only the private key can decrypt it.&lt;br&gt;
Examples: RSA (Rivest-Shamir-Adleman) and ECC (Elliptic Curve Cryptography).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Hashing&lt;/strong&gt;&lt;br&gt;
Converts data into a fixed-length value (a hash) that can't be reversed to its original form.&lt;br&gt;
Hashing ensures data integrity by detecting any changes.&lt;br&gt;
Commonly used in blockchain, digital signatures, and database indexing.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Hybrid Encryption&lt;/strong&gt;&lt;br&gt;
Two types of keys are used for hybrid encryption: asymmetric (public and private) and symmetric (a shared key). It secures online communication. For instance, when you access a secure website, a temporary key is generated through asymmetric encryption that will be used to encrypt your data with symmetric encryption at a higher speed.&lt;br&gt;
Consider, for example, encrypted email. A shared key is used to encrypt the message by the sender, and the same key is then secured using the public key of the receiver. The recipient uses their private key to unlock the shared key, allowing them to decipher the message.&lt;/p&gt;

&lt;h3&gt;
  
  
  Benefits of Cloud Cryptography:
&lt;/h3&gt;

&lt;p&gt;Let us list some of the important benefits of cloud data encryption using cryptography:&lt;br&gt;
✅ Data Privacy: With Encryption, only authorized users can access sensitive data.&lt;br&gt;
✅ Security-Optimized: Data is secured in its storage and transfer phases (in transit; at rest).&lt;br&gt;
✅ Regulatory Compliance: Enables businesses to comply with data protection regulations by protecting sensitive data.&lt;/p&gt;

&lt;h3&gt;
  
  
  Challenges of Cloud Cryptography:
&lt;/h3&gt;

&lt;p&gt;Here we go with the challenges we can face regarding cloud cryptography.&lt;br&gt;
But although cloud cryptography is highly secure, it does present some challenges&lt;/p&gt;

&lt;p&gt;🔐 Key Management: It is critical to ensure the correct creation, dissemination, and rotation of encryption keys that secure data at rest and in transit&lt;/p&gt;

&lt;p&gt;⚙️ Performance Overhead: Encryption can degrade system performance as scrambling and unscrambling data takes time.&lt;/p&gt;

&lt;p&gt;🧩 Complexity: These Solutions require experience to ensure they are secure and configured correctly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;With cloud computing becoming as pervasive as it is, securing data within these pseudo-environments is more critical than ever. Cloud cryptography protects sensitive information through Encryption and cryptographic techniques.&lt;/p&gt;

&lt;p&gt;Whether you're a curious 10-year-old like Osinachi or an experienced IT professional, understanding cloud cryptography empowers you to stay secure in today's connected world.&lt;/p&gt;

&lt;p&gt;By understanding best practices in cloud encryption, we can all enjoy the cloud's convenience without compromising the safety of our data.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Automating User On-Boarding With Bash Scripting.</title>
      <dc:creator>Ebenezer Emelogu</dc:creator>
      <pubDate>Tue, 02 Jul 2024 21:32:29 +0000</pubDate>
      <link>https://dev.to/eben/automating-user-on-boarding-with-bash-scripting-3p00</link>
      <guid>https://dev.to/eben/automating-user-on-boarding-with-bash-scripting-3p00</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;In Modern day IT administration, automation must become part of your day-to-day activity. This is because automation is crucial in maintaining uniformity, and security policies of the organization as well as avoiding time wastage in doing the same things over again.&lt;/p&gt;

&lt;p&gt;One of those repetitive tasks automation takes care of is creating of user or simply a new user on-boarding in an organization.&lt;/p&gt;

&lt;p&gt;This blog post briefly examines a simple way that the user onboarding process on Linux Operating Systems can be automated using bash scripting. &lt;/p&gt;

&lt;p&gt;This article references HNG task 1 for the DevOps track.&lt;br&gt;
HNG is a non-profit organization that provides internship and learning programs for individuals seeking to gain real-life experience in IT.&lt;br&gt;
You can find out more about HNG using the links below.&lt;br&gt;
&lt;a href="https://hng.tech/internship"&gt;HNG INTERNSHIP&lt;/a&gt;&lt;br&gt;
&lt;a href="https://hng.tech/learn"&gt;HNG LEARN&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Automating User On-Boarding Using Bash
&lt;/h2&gt;

&lt;p&gt;The script we are going to use will enable us to achieve the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Create users&lt;/li&gt;
&lt;li&gt;Generate random passwords for the users&lt;/li&gt;
&lt;li&gt;Store the passwords in a secure file&lt;/li&gt;
&lt;li&gt;Create groups for the users&lt;/li&gt;
&lt;li&gt;Assign the users to their personal and additional groups.&lt;/li&gt;
&lt;li&gt;Log all actions to a log file.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This script can be reused over and over again as it is not limited to just the one-time creation of users and also it can be modified to perform additional tasks or take out what is not needed.&lt;/p&gt;

&lt;p&gt;Let's break down the provided script step by step to understand what it does piece by piece.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;First off, we set the interpreter of the script which states what shell we will be using to run the script.&lt;br&gt;
&lt;code&gt;#!/bin/bash&lt;/code&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Define log file and password file locations.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Define the log file location for logging
LOG_FILE="/var/log/user_management.log"
# Define the location of the password file where the generated passwords for each user will be stored
PASSWORD_FILE="/var/secure/user_passwords.txt"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Define the location of the users_txt file where we have entered the names of the users with their respective groups.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Define the location of the user file for the creation of users and groups
USER_FILE="users.txt"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Ensure the log and password files exist.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Ensure log file and password file exist and set proper permissions
touch "$LOG_FILE" "$PASSWORD_FILE"
chmod 600 "$LOG_FILE" "$PASSWORD_FILE"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Create and Ensure the /var/secure directory exists with appropriate permissions.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Create /var/secure directory if it doesn't exist
if [ ! -d "/var/secure" ]; then
    mkdir -p /var/secure
    chmod 700 /var/secure
    echo "$(date) - Created /var/secure directory." | tee -a "$LOG_FILE"
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Generate Password Function for user password generation.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Function to generate a random 12-character alphanumeric password
generate_password() {
    tr -dc A-Za-z0-9 &amp;lt;/dev/urandom | head -c 12
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;Confirming that the users_txt file to be used for user creation exist
# Ensure the users.txt file exists
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;if [ ! -f "$USER_FILE" ]; then
    log_message "User file $USER_FILE does not exist. Exiting."
    exit 1
fi
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Creation of users, personal groups and password generation
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Read users from the users.txt file.&lt;/li&gt;
&lt;li&gt;Check if the user exists, if not, create the user and their personal group.&lt;/li&gt;
&lt;li&gt;Generate and set a password for the user.&lt;/li&gt;
&lt;li&gt;Save the password securely.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Step 1: Create Users, groups and generate passwords for the users
log_message "Starting user creation process..."
while IFS=';' read -r username groups; do
    username=$(echo "$username" | xargs)
    groups=$(echo "$groups" | xargs)

    if [ -z "$username" ]; then
        log_message "Empty username found. Skipping."
        continue
    fi

    if id "$username" &amp;amp;&amp;gt;/dev/null; then
        log_message "User $username already exists."
        continue
    fi

    if groupadd "$username"; then
        if useradd -m -g "$username" "$username"; then
            log_message "User $username and group $username created."

            password=$(generate_password)
            if echo "$username:$password" | chpasswd; then
                log_message "Password set for user $username."
                echo "$username:$password" &amp;gt;&amp;gt; "$PASSWORD_FILE"
                log_message "Password for user $username saved to $PASSWORD_FILE."
            else
                log_message "Failed to set password for user $username."
            fi
        else
            log_message "Failed to create user $username."
        fi
    else
        log_message "Failed to create group $username."
    fi
done &amp;lt; "$USER_FILE"

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Group Assignment Process
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Read users and their groups from the users.txt file.&lt;/li&gt;
&lt;li&gt;Check if the user exists, if not log a message and skip to the next user.&lt;/li&gt;
&lt;li&gt;Add the user to specified groups, creating groups if they don't exist.
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Step 2: Add Users to Groups
log_message "Starting group assignment process..."
while IFS=';' read -r username groups; do
    username=$(echo "$username" | xargs)
    groups=$(echo "$groups" | xargs)

    if [ -z "$username" ]; then
        log_message "Empty username found. Skipping."
        continue
    fi

    if ! id "$username" &amp;amp;&amp;gt;/dev/null; then
        log_message "User $username does not exist. Skipping group assignment."
        continue
    fi

    IFS=',' read -ra GROUP_ARRAY &amp;lt;&amp;lt;&amp;lt; "$groups"
    for group in "${GROUP_ARRAY[@]}"; do
        group=$(echo "$group" | xargs)
        if [ -z "$group" ]; then
            log_message "Empty group name for user $username. Skipping."
            continue
        fi

        if ! getent group "$group" &amp;gt; /dev/null 2&amp;gt;&amp;amp;1; then
            if groupadd "$group"; then
                log_message "Group $group created."
            else
                log_message "Failed to create group $group."
                continue
            fi
        fi

        if usermod -aG "$group" "$username"; then
            log_message "User $username added to group $group."
        else
            log_message "Failed to add user $username to group $group."
        fi
    done
done &amp;lt; "$USER_FILE"

log_message "User and group creation process completed."

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Verify the User accounts that have been created
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;You can verify if the account was created successfully by using the id user command to show the user and the groups
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
id user_name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You can also retrieve the secure passwords by viewing the contents of the password file
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo cat /var/secure/user_passwords.csv

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;You can view the logs for the operation by using this command
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sudo cat /var/log/user_management.log

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Creating a bash script to manage user accounts can make adding new employees or users much easier. By following the steps in this guide, you can build a reliable script that:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Creates user accounts&lt;/li&gt;
&lt;li&gt;Adds users to groups&lt;/li&gt;
&lt;li&gt;Sets secure passwords&lt;/li&gt;
&lt;li&gt;Logs actions for transparency and audits.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/Eben-DevOps/User-Creation-Script.git"&gt;Link to the script&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks to HNG for making this possible. You can also join their premium channel to enjoy more benefits, learn and network in a great environment. by using this link to join &lt;a href="https://hng.tech/premium"&gt;HNG Premium&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
