These are some commands that will be usefull during the evaluation of the born2beroot proyect.
Get the machine signature in sha1 format
shasum born2beroot.vdi
Checks if a graphical interface is installed
ls /usr/bin/*session
Expected output for no GUI: /usr/bin/dbus-run-session
Show system details
uname -a
Check that sudo is installed
apt-cache policy sudo
Check the strong configuration for sudo
cat /etc/sudoers.d/sudo_config
See partitions
lsblk
Service is runing
service ssh status
Configuration file
/etc/ssh/sshd_config
Connect via SSH
ssh alaparic@localhost -p 4242
Configure port rule
ufw allow <number>
Delete port rule
ufw delete <number>
See opened ports
ufw status numbered
Create a new user
adduser <username>
Create a new group
addgroup <groupname>
Add user to group
adduser <username> <groupname>
Check which groups a user belongs to
groups <username>
Check password rules in users
chage -l <username>
See password policy
vim /etc/pam.d/common-password
See password expiration
vim /etc/login.defs
Check current hostname
hostname
Chnage the current value for the new login in these two files
vim /etc/hostname
vim /etc/hosts
Open the configuration file
vim /etc/pam.d/common-password
Open the crontab config file
crontab -u root -e
Start / Stop
/etc/init.d/cron start
/etc/init.d/cron stop