A 42 system administration project focused on creating and hardening a Linux virtual machine.
Linux, virtualisation, SSH, UFW, sudo, cron, LVM, hardening
Born2beRoot is a 42 curriculum project that consists of installing and configuring a Linux virtual machine while respecting system administration and security constraints.
The goal is not only to "make a VM work", but also to understand what is being configured, why it is configured that way, and how to explain and defend those choices clearly during the evaluation.
This project mainly helps me work on:
- virtualization and the role of a virtual machine
- Linux system administration without a graphical interface
- securing access, privileges, and services
- the ability to explain a simple and justified architecture
A quick summary of the current setup:
| Element | Value |
|---|---|
| Distribution | Debian |
| Hypervisor | VirtualBox |
| Hostname | kpourcel42 |
| Main user | kpourcel |
| Required groups | sudo, user42 |
| SSH | active on port 4242 |
| Root via SSH | disabled |
| Firewall | UFW enabled |
| Monitoring | periodic script with cron |
| Bonus | none |
- Linux virtual machine without a graphical interface
- non-root user created and added to the required groups
- password policy and
sudorules configured - SSH service enabled with root login disabled
- UFW firewall enabled with explicit rules
- monitoring script executed periodically
- documentation useful for the evaluation and manual checks
- bonus features can be documented later if needed
Through this project, I work on the following concepts:
- difference between a host machine and a virtual machine
- minimal Linux installation
- users, groups, permissions, and privilege escalation
sudoconfiguration and related log inspection- SSH, network ports, and minimal service exposure
- firewall management with UFW
- partitioning and LVM
- automation with
cron - evaluation topics related to the chosen distribution:
apt/aptitudeand AppArmor for Debian, or SELinux /dnffor a RHEL-based distribution depending on the subject version
This repository does not contain a program to compile. It mainly serves as documentation support for the project.
Using this project means starting the virtual machine, checking the expected services, and being able to justify each configuration choice.
hostnamectl
getent passwd <login>
id <login>
sudo systemctl status ssh
ss -tuln | grep 4242
sudo ufw status numbered
lsblk -f
sudo crontab -u root -l
ssh <login>@127.0.0.1 -p 4242This README follows the constraints commonly associated with Born2beRoot:
- a Linux virtual machine without a graphical interface
- a non-root main user present on the machine
- properly configured administrative groups and privileges
- an applied password policy
- SSH active only on the expected port
rootSSH login disabled- an active firewall
- a hostname matching the expected login format
- a monitoring script launched periodically
- a partition layout that can be shown and explained, with LVM depending on the subject
Important note: if your campus uses a different version of the subject, some distributions, bonus parts, or service names may vary. In that case, the official PDF of your subject is the source of truth.
The project can be checked with a series of simple and reproducible tests:
- verify that the main user exists and belongs to the correct groups
- verify that
sshis active and listening on the correct port - verify that
ufwis active and that the rules are correct - verify that
sudologs commands properly - verify the hostname
- verify the partitioning and the presence of LVM if required
- verify the
cronscheduler and the monitoring script frequency
getent group sudo
getent group user42
sudo systemctl status ssh
sudo ufw status numbered
sudo ls /var/log/sudo
sudo tail -n 20 /var/log/sudo/*
cat /etc/hostname
lsblk
sudo crontab -u root -lThis project helped me improve in several important areas:
- moving from a "click-and-use" approach to a "configure-and-understand" approach
- reasoning in terms of services, configuration files, and permissions
- applying simple system security principles
- checking a system with precise commands instead of assumptions
- presenting an architecture clearly during an evaluation
Middle-555
42 student