Skip to content

Latest commit

 

History

History
161 lines (131 loc) · 2.15 KB

EvaluationQuest.md

File metadata and controls

161 lines (131 loc) · 2.15 KB

Password policy

sudo chage -l <username>

Check UFW status

sudo ufw status

Note

look for status: active

Check the chosen operating system

lsb_release -a || cat /etc/os-release

Check that user has been added to sudo and user42 groups

getent group sudo
getent group user42

Create new user

sudo adduser <new_username>

Create a group named “evaluating”

sudo groupadd evaluating

Add new user to group evaluating

sudo usermod -aG evaluating <your_new_username>

Check if the new user belongs to the “evaluating” group

getent group evaluating

Check hostname

hostnamectl

Modify the hostname by replacing the login with new one, then restart VM

sudo hostnamectl set-hostname <new_hostname>
sudo reboot

Note

restore machine to original hostname
sudo hostnamectl set-hostname <new_hostname>
sudo reboot

How to view the partitions from the VM

lsblk

Check that the “sudo” program is properly installed

dpkg -l | grep sudo

Check sudo rules

sudo visudo

Check UFW instalation

sudo ufw status numbered

Add new port to UFW

sudo ufw allow 8080

Delete this new rule

sudo ufw delete 4
sudo ufw delete 2

Check that the SSH service is properly installed

sudo service ssh status

Note

Check if its active and port 4242

Verify IP adress

hostname -I

Open script monitoring.sh

vim /usr/local/bin/monitoring.sh

Change monitoring from 10min to 1min

sudo crontab -u root -e
change 10 value to 1

Cron stop

sudo cronstop

Cron start

cronstart

Check if the script still exists in the same place

sudo reboot
sudo crontab -u root -e