<?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: Shirlyne Thiong'o</title>
    <description>The latest articles on DEV Community by Shirlyne Thiong'o (@shirlyne_thiongo).</description>
    <link>https://dev.to/shirlyne_thiongo</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%2F1719336%2F9591c60d-6baa-465b-a319-0fb738edfaac.jpg</url>
      <title>DEV Community: Shirlyne Thiong'o</title>
      <link>https://dev.to/shirlyne_thiongo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/shirlyne_thiongo"/>
    <language>en</language>
    <item>
      <title>My AWS re/Start Journey: Week 1 - Cloud Foundations</title>
      <dc:creator>Shirlyne Thiong'o</dc:creator>
      <pubDate>Sat, 14 Sep 2024 20:11:50 +0000</pubDate>
      <link>https://dev.to/shirlyne_thiongo/my-aws-restart-journey-week-1-cloud-foundations-dl7</link>
      <guid>https://dev.to/shirlyne_thiongo/my-aws-restart-journey-week-1-cloud-foundations-dl7</guid>
      <description>&lt;p&gt;I've recently embarked on an exciting 12-week learning journey through AWS re/Start, a comprehensive program designed to build cloud computing skills. In this article, I will document my experiences, learning highlights, and hands-on tasks throughout the program. Let's dive into Week 1, which covered essential foundational topics and culminated in a hands-on lab session where I launched and managed an EC2 instance.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Week 1: Foundation Building&lt;/strong&gt;&lt;br&gt;
The first week was all about setting the stage and building a strong foundation for cloud computing. Here’s a quick breakdown of the key modules we covered:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Introduction to Computing&lt;/strong&gt;&lt;br&gt;
This module gave us a solid understanding of the basics of computing, including how hardware and software interact, and the fundamental principles of networking, storage, and security. It was a great refresher and introduced me to concepts I’ll need throughout this journey.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Development Team Roles&lt;/strong&gt;&lt;br&gt;
We explored the different roles within a development team, from developers and testers to sysadmins and DevOps engineers. Understanding these roles helps clarify how teams collaborate to create, deploy, and maintain software.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloud Computing Basics&lt;/strong&gt;&lt;br&gt;
One of the core themes of AWS re/Start, cloud computing, was introduced with key concepts like virtualization, scalability, elasticity, and high availability. We learned how cloud providers like AWS offer flexible resources on-demand, which marked the beginning of my deep dive into cloud technologies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Pricing Fundamentals&lt;/strong&gt;&lt;br&gt;
One of the most critical aspects of AWS is understanding its pricing model. We covered the "pay-as-you-go" concept, exploring cost management tools, AWS Free Tier, and how to optimize cloud resources to avoid unnecessary expenses.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AWS Services and Service Categories&lt;/strong&gt;&lt;br&gt;
We were introduced to a broad range of AWS services grouped into categories such as Compute, Storage, Networking, and Databases. This gave me a sense of how expansive the AWS ecosystem is, and how these services work together to create end-to-end solutions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hands-on Lab: Launching an EC2 Instance&lt;/strong&gt;&lt;br&gt;
The week culminated in a hands-on lab session where I applied the knowledge gained. Here’s a summary of the key tasks we completed:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Starting the Lab&lt;/strong&gt;&lt;br&gt;
We kicked off the lab by navigating to the AWS Management Console, where we launched our first Amazon EC2 instance. It took a few minutes to provision the necessary resources, and the status indicators (red, yellow, and green) helped us monitor the lab’s readiness.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Launching the EC2 Instance&lt;/strong&gt;&lt;br&gt;
I created an EC2 instance named Web Server, selected the default Amazon Linux 2 AMI, and chose a t3.micro instance type. This instance type is suitable for small workloads and was available under the Free Tier.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configuring User Data&lt;/strong&gt;&lt;br&gt;
Using a User Data script, I automated the deployment of a simple Apache web server on the EC2 instance. This script installed the Apache HTTP server, started it, and even generated a basic HTML page with the message: "Hello From Your Web Server!"&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Monitoring the Instance&lt;/strong&gt;&lt;br&gt;
I monitored the EC2 instance via CloudWatch, which provided insights into its health and performance. Checking the instance status and system reachability gave me a better understanding of how AWS performs routine checks to ensure the smooth running of instances.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Updating the Security Group&lt;/strong&gt;&lt;br&gt;
Initially, I was unable to access the web server, which highlighted the importance of security groups in AWS. After adding an inbound rule to allow HTTP traffic on port 80, I was able to view the web page I had deployed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resizing and Terminating the Instance&lt;/strong&gt;&lt;br&gt;
The lab also demonstrated how easy it is to resize EC2 instances and modify EBS volumes. I stopped the instance, changed its type from t3.micro to t3.small, and increased the EBS volume size from 8 GiB to 10 GiB. Finally, I tested the termination protection feature before terminating the instance for good.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key Takeaways from Week 1&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;Cloud Basics&lt;/strong&gt;: Understanding fundamental cloud computing concepts and AWS’s vast range of services has provided a solid base for the weeks ahead.&lt;br&gt;
Hands-On Practice: The practical lab helped reinforce theoretical knowledge, especially with tasks like launching and managing EC2 instances.&lt;br&gt;
&lt;strong&gt;Cost Awareness&lt;/strong&gt;: Learning about AWS pricing has given me insight into how to optimize cloud costs, which is an essential skill for any cloud practitioner.&lt;br&gt;
Week 1 has been both informative and engaging, and I’m excited to see what the upcoming weeks hold as we dive deeper into AWS services and more advanced cloud technologies. Stay tuned for updates from Week 2!&lt;/p&gt;

&lt;h1&gt;
  
  
  AWS #AWSreStart #CloudComputing #EC2 #DevOps #CloudSkills #CloudJourney #AWSCloud #AmazonEC2 #CloudLab #TechLearning #CloudPractitioner #AWSInternship #CloudTechnology #AWSBasics #AWSHandsOn
&lt;/h1&gt;

</description>
    </item>
    <item>
      <title>Using a Bash script to Automate User Account Management in Linux</title>
      <dc:creator>Shirlyne Thiong'o</dc:creator>
      <pubDate>Tue, 02 Jul 2024 18:07:47 +0000</pubDate>
      <link>https://dev.to/shirlyne_thiongo/using-a-bash-script-to-automate-user-account-management-in-linux-47el</link>
      <guid>https://dev.to/shirlyne_thiongo/using-a-bash-script-to-automate-user-account-management-in-linux-47el</guid>
      <description>&lt;p&gt;It's critical for Sysops engineers to adopt the habit of effectively managing user accounts, particularly when onboarding new clients, users, or staff members. This post will walk you through the process of writing a Bash script that adds users, adds them to groups, generates passwords, and logs all of your activities automatically. This module is a component of the HNG Devops Track job. To start working practically with devops and all of its relevant stacks, HNG is a great place to start. Applying is possible, or you can learn more at &lt;a href="https://hng.tech/internship" rel="noopener noreferrer"&gt;https://hng.tech/internship&lt;/a&gt;. Now let's begin the assignment for today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Overview&lt;/strong&gt;&lt;br&gt;
Handling user accounts by hand can be laborious and prone to mistakes. This procedure needs to be automated for consistency, time savings, and reduced mistake. Using a file containing a list of usernames and groups, we will develop a script named "create_users.sh" that creates users and groups, configures their home directories, generates random passwords, and logs all tasks, actions, and errors to a management.log file.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites:&lt;/strong&gt;&lt;br&gt;
It is essential that you possess the following knowledge before we start; if not, please review previous modules to familiarize yourself with the ideas;&lt;/p&gt;

&lt;p&gt;1.Basic familiarity with Linux commands&lt;br&gt;
2.Rights to administer the system and&lt;br&gt;
3.A text editor (such as vim, nano, etc.)&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The following tasks are completed by the script:&lt;/p&gt;

&lt;p&gt;1.reads from a file a list of users and groups.&lt;br&gt;
2.establishes users and places them in designated groups.&lt;br&gt;
3.creates home directories and grants the necessary access.&lt;br&gt;
4.creates passwords at random for users.&lt;br&gt;
5.records every operation in the file /var/log/user_management.log.&lt;br&gt;
6./var/secure/user_passwords.csv is where the created passwords are safely stored.&lt;/p&gt;

&lt;p&gt;Script Breakdown&lt;br&gt;
Below is a breakdown of the complete script with explanations.&lt;/p&gt;

&lt;p&gt;Bash shells are commonly found on Linux operating systems. In this article, we will be working primarily with Ubuntu, a Linux distribution. You can download and set up Ubuntu here: (Canonical Ubuntu)[&lt;a href="http://ubuntu.com/download" rel="noopener noreferrer"&gt;http://ubuntu.com/download&lt;/a&gt;].&lt;br&gt;
Once you have your terminal open, you should write the following scrips:&lt;/p&gt;

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

&lt;p&gt;To open the created script for editing,iput he following:&lt;/p&gt;

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

&lt;p&gt;This will open a terminal window on the nano text editor.Type the following script;&lt;/p&gt;

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

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

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Save the script: Press Ctrl + O (the letter O, not zero) to write out (save) the file. Press Enter to confirm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Exit Nano: Press Ctrl + X to exit the editor&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To populate the users list,enter the following script,this will also open a nano text editor:&lt;/p&gt;

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

&lt;p&gt;On the terminal:&lt;br&gt;
&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvq1nwi9t4hjetnqxm5y1.JPG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fvq1nwi9t4hjetnqxm5y1.JPG" alt="Image description" width="299" height="162"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Save the script: Press Ctrl + O (the letter O, not zero) to write out (save) the file. Press Enter to confirm.&lt;/li&gt;
&lt;li&gt;Exit Nano: Press Ctrl + X to exit the editor.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Type the following script to confirm if the users are populated:&lt;/p&gt;

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

&lt;p&gt;To execute the script with a text file containing usernames and groups as an argument,write the following script:&lt;/p&gt;

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

&lt;p&gt;To verify the script:&lt;br&gt;
After running the script, verify the results:&lt;/p&gt;

&lt;p&gt;Log File: Check&lt;br&gt;
&lt;/p&gt;

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

&lt;/div&gt;



&lt;p&gt;for logged actions.&lt;br&gt;
&lt;/p&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;ol&gt;
&lt;li&gt;Password File: Check
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;



&lt;p&gt;for generated passwords.&lt;br&gt;
&lt;/p&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;ol&gt;
&lt;li&gt;User and Group Existence: Verify that users and groups were created
&lt;/li&gt;
&lt;/ol&gt;

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

&lt;/div&gt;





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

&lt;/div&gt;





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

&lt;/div&gt;



&lt;p&gt;In Conclusion:&lt;br&gt;
The onboarding process for new users, staff, or accounts can be greatly streamlined by automating user account management with bash scripts. You may build a strong script that guarantees users are created, assigned to groups, and have safe passwords while logging actions for transparency and auditability by following the instructions we provided in this post. Remember that HNG made these challenges possible. You can also join their VIP channel to receive perks and study in a very supportive setting. To sign up, visit &lt;a href="https://hng.tech/premium" rel="noopener noreferrer"&gt;https://hng.tech/premium&lt;/a&gt;. I'll see you in the upcoming module. Thank you.&lt;/p&gt;

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