{"id":26455099,"url":"https://github.com/msabr/born2beroot_1337","last_synced_at":"2026-04-11T15:35:40.067Z","repository":{"id":281958924,"uuid":"947013682","full_name":"msabr/BORN2BEROOT_1337","owner":"msabr","description":"A system administration project that introduces virtualization and Linux system setup. You’ll configure a virtual machine using Debian and implement security measures, user management, partitions, and SSH configuration. It teaches fundamental system administration skills essential for managing Linux servers. 🚀","archived":false,"fork":false,"pushed_at":"2025-03-12T02:58:17.000Z","size":0,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-12T03:31:49.992Z","etag":null,"topics":["1337cursus","1337school","42born2code","bash","linux","security","shell","ssh","ufw","ufw-firewall","virtualbox","visualization"],"latest_commit_sha":null,"homepage":"","language":null,"has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msabr.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2025-03-12T02:47:08.000Z","updated_at":"2025-03-12T03:01:38.000Z","dependencies_parsed_at":"2025-03-12T03:41:56.215Z","dependency_job_id":null,"html_url":"https://github.com/msabr/BORN2BEROOT_1337","commit_stats":null,"previous_names":["msabr/born2beroot_1337"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msabr%2FBORN2BEROOT_1337","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msabr%2FBORN2BEROOT_1337/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msabr%2FBORN2BEROOT_1337/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msabr%2FBORN2BEROOT_1337/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msabr","download_url":"https://codeload.github.com/msabr/BORN2BEROOT_1337/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244301018,"owners_count":20430851,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["1337cursus","1337school","42born2code","bash","linux","security","shell","ssh","ufw","ufw-firewall","virtualbox","visualization"],"created_at":"2025-03-18T20:30:00.662Z","updated_at":"2025-12-31T00:13:51.035Z","avatar_url":"https://github.com/msabr.png","language":null,"funding_links":[],"categories":[],"sub_categories":[],"readme":"# **Born2beroot - 42 Network**  \n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"Born2beroot.png\"/\u003e\n\u003c/div\u003e\n\n## **Overview**  \nBorn2beroot is a system administration project that introduces the fundamentals of **virtualization, server security, and Linux configuration**. The goal is to set up a **secure Debian-based virtual machine** while implementing essential security measures and user management.  \n\n## **Project Scope**  \nIn this project, you will:  \n- Install and configure a **Debian-based virtual machine** (using VirtualBox or UTM).  \n- Set up a **custom user and groups** with specific permissions.  \n- Implement **UFW (Uncomplicated Firewall)** for security.  \n- Enforce strong **password policies** and **sudo rules**.  \n- Configure **SSH** to allow remote connections securely.  \n- Implement **disk partitioning and LVM (Logical Volume Manager)**.  \n- Set up and use **monitoring tools** to track system performance.  \n\n## **Learning Outcomes**  \n- Understanding **virtualization** and **system setup**.  \n- Strengthening knowledge of **Linux security best practices**.  \n- Managing **users, permissions, and groups** effectively.  \n- Implementing and maintaining **firewall configurations**.  \n- Learning **LVM partitioning** for flexible disk management.  \n- Using **monitoring tools** to track system health.  \n\n## **Setup Instructions**  \n### **1. Install Debian and Configure Virtual Machine**  \n- Use **VirtualBox** (or **UTM for macOS**).  \n- Install a **minimal Debian environment** without a GUI.  \n\n### **2. User and Group Management**  \n- Create a **new user** with **sudo privileges**.  \n- Configure **password expiration policies** to enforce security.  \n\n### **3. Security Enhancements**  \n- Install and configure **UFW (Uncomplicated Firewall)**.  \n- Disable **root login via SSH** and change the default SSH port.  \n- Implement strong **password policies** using `pam_pwquality`.  \n\n### **4. LVM Partitioning**  \n- Use **LVM (Logical Volume Manager)** for flexible storage allocation.  \n- Set up separate partitions for **root, home, and swap**.  \n\n## **System Monitoring Script**  \nAs part of the project, a **system monitoring script** is required to display important system metrics. Below is the script that **automatically runs every 10 minutes**, sending a message to all logged-in users via `wall`.  \n\n### **Script:**\n```bash\n#!/bin/bash\n\n# System Architecture\narchitectur=$(uname -a)\n\n# CPU Information\ncpuphysical=$(grep \"physical id\" /proc/cpuinfo | sort -u | wc -l)\ncpuvirtual=$(grep -c \"processor\" /proc/cpuinfo)\n\n# Memory Usage\nmemoryusage=$(free --mega | awk '/Mem/ {printf(\"%d/%dMB (%.2f%%)\\n\", $3, $2, ($3 / $2) * 100 )}')\n\n# Disk Usage\nfulldisk=$(df -BG | awk '/^\\/dev/ \u0026\u0026 !/boot/ {sum += $2} END {print sum}')\nusagedisk=$(df -BM | awk '/^\\/dev/ \u0026\u0026 !/boot/ {sum += $3} END {print sum}')\npordisk=$(df -BM | awk '/^\\/dev/ \u0026\u0026 !/boot/ {used+=$3} {total+=$2} END {printf(\"%.2f\"), (used/total)*100}')\n\n# CPU Load\ncpuload=$(mpstat 1 1 | awk '/Average/ {printf \"%.2f\\n\", 100 - $NF}')\n\n# Last Boot Time\nlastboot=$(uptime -s | cut -c-16)\n\n# LVM Usage\nlvmu=$(lsblk | grep -q \"lvm\" \u0026\u0026 echo \"yes\" || echo \"no\")\n\n# Established TCP Connections\nctcp=$(ss -t state established | wc -l)\n\n# Logged-in Users\nulog=$(who | cut -d \" \" -f1 | sort -u | wc -l)\n\n# Network Information\nip=$(hostname -I | awk '{print $1}')\nmac=$(ip link show | awk '/ether/ {print $2}')\n\n# Sudo Commands Executed\ncmds=$(journalctl _COMM=sudo | grep COMMAND | wc -l)\n\n# Display System Information\nwall \"  \n    #Architecture: $architectur\n    #CPU physical: $cpuphysical\n    #vCPU: $cpuvirtual\n    #Memory Usage: $memoryusage\n    #Disk Usage: $usagedisk/${fulldisk}Gb ($pordisk%)\n    #CPU load: $cpuload\n    #Last boot: $lastboot\n    #LVM use: $lvmu\n    #Connections TCP: $ctcp ESTABLISHED\n    #User log: $ulog\n    #Network: IP $ip ($mac)\n    #Sudo: $cmds commands executed\"\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsabr%2Fborn2beroot_1337","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsabr%2Fborn2beroot_1337","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsabr%2Fborn2beroot_1337/lists"}