Skip to content

badreddinkaztaoui/born2beroot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 

Repository files navigation

BornTobeRoot Project README

Table of Contents

  1. Virtualization and Virtual Machine
  2. Difference between Debian and Rocky Distros
  3. TTY
  4. AppArmor
  5. Sudo
  6. SSH
  7. UFW
  8. Creating Secure Passwords, Users, and Groups
  9. Cron Expressions and crontab
  10. Creating a Monitoring Script

Virtualization and Virtual Machine

Virtualization is the process of creating a virtual version of a resource (like a server, operating system, storage device, or network) using software. This allows you to run multiple virtual machines (VMs) on a single physical machine.

A Virtual Machine (VM) is a software emulation of a physical computer that can run its own operating system and applications as if it were a physical machine.

To set up virtualization, you can use software like VMware, VirtualBox, or KVM (Kernel-based Virtual Machine). These tools allow you to create and manage virtual machines on your system.

Difference between Debian and Rocky Distros

  • Debian: Debian is one of the oldest and most stable Linux distributions. It uses the APT package manager and focuses on stability, security, and free software principles.

  • Rocky Linux: Rocky Linux is a newer distribution, designed to be a direct replacement for CentOS after CentOS 8's shift towards CentOS Stream. It aims to provide a stable, free, and community-supported alternative to RHEL.

TTY

TTY stands for TeleTYpewriter and refers to the command-line interface in Unix-like operating systems. It provides a text-based interface to interact with the system. When you log in to a terminal session, you are essentially accessing a TTY.

AppArmor

AppArmor is a Linux security module that confines programs to a limited set of resources. It allows you to define per-program profiles, which restrict what specific programs can do. This provides an additional layer of security by limiting the potential damage that a compromised program can cause.

To install AppArmor on Debian-based systems, you can use the following command:

sudo apt-get install apparmor

Sudo

Sudo is a command that allows users to run programs with the security privileges of another user, typically the superuser (root). This enables users to perform administrative tasks without having to log in as the root user.

To install sudo on Debian-based systems, you can use the following command:

sudo apt-get install sudo

SSH

SSH (Secure Shell) is a cryptographic network protocol that allows secure communication over an unsecured network. It is commonly used for remote access to servers and for transferring files securely.

To install SSH on Debian-based systems, you can use the following command:

sudo apt-get install openssh-server

UFW

UFW (Uncomplicated Firewall) is a user-friendly front-end for managing iptables, the default firewall management tool in Linux. It provides an easy-to-use interface for configuring firewall rules.

To install UFW on Debian-based systems, you can use the following command:

sudo apt-get install ufw

Creating Secure Passwords, Users, and Groups

To create a secure password, it's recommended to use a combination of uppercase and lowercase letters, numbers, and special characters. Avoid using easily guessable information like names or common words.

To create a user, you can use the adduser command:

sudo adduser username

To create a group, you can use the addgroup command:

sudo addgroup groupname

Cron Expressions and crontab

Cron is a time-based job scheduler in Unix-like operating systems. It allows you to schedule tasks to run at specific times or intervals. Cron expressions define when a task should be executed.

To edit the cron table for a user, you can use the crontab -e command:

crontab -e

Then, you can add your cron expressions and corresponding commands.

Creating a Monitoring Script

To create a monitoring script using a shell file, you can follow these steps:

  1. Create a new file with a .sh extension, for example monitor.sh.
  2. Add your monitoring commands and logic to the script.
  3. Make the script executable with the command:
chmod +x monitor.sh

You can then run the script using:

./monitor.sh

Make sure to include any necessary shebang line (e.g., #!/bin/bash) at the beginning of your script to specify the interpreter.