Evaluation Flashcards
How does a virtual machine work?
A virtual machine is a software-based virtual version of a computer with dedicated ammounts of CPU, memory and storage “borrowed from a physical host computer. The virtual machine is partitioned from the rest of the system, meaning that software inside a vm can’t interfere with the hosts primary operating system.
ELIM5: Normally to run an operating system, like MacOS or windows, you need a real world device like a laptop or a computer. These will usually only run one operating system. An operating system makes sure a computer is useable by regular humans and makes sure you can run other programs like spotify for instance.
When you have a virtual machine program, you can simulate another operating system. It’s like having a computer in a computer. It will work using some of your real computers hardware, which will be set apart and can’t reach the operating system of the real computer. This means you have a safe space to test things you would normally not want to test on your actual computer.
Wat is the purpose of a virtual machine
- Test applications on different operating systems (what works on a MacOS might not work on Windows)
- Try out different operating systems (when you’re not sure what to buy for instance)
- Get more out of the hardware
- Handle potential Malware more safely. You can see what a virus does to an operating system without it affecting your main operating system. You can test theories that might break your computer.
- To run old incompatible software. You can start up windows xp for instance.
- Being able to take snapshots or clone the machine. You can easily create a vm and copy it to another machine or go back to a previous version of your vm.
How do you check the password policy?
For password requirement:
sudo nano /etc/pam.d/common-password
Password expiration:
sudo nano /etc/login.defs
Explain your password policy implementation
If you get this you can aslo just look at the subject and match them with the rules:
retry=3 : only 3 retries
minlen=10 : at least be 10 char
ucredit=-1 : at least one uppercase
lcredit=-1 : at least one lowercase
dcredit=-1 : at least one digit
maxrepeat=3 : no more than 3 consecutive characters
usercheck=0 : can’t have the username
enforce_for_root : make sure the root also needs to comform to the rules
difok=7 at least 7 char not from the former password
How do you check the password policy?
For password requirement:
sudo nano /etc/pam.d/common-password
Password expiration:
sudo nano /etc/login.defs
Explain your password policy implementation
If you get this you can aslo just look at the subject and match them with the rules:
retry=3 : only 3 retries
minlen=10 : at least be 10 char
ucredit=-1 : at least one uppercase
lcredit=-1 : at least one lowercase
dcredit=-1 : at least one digit
maxrepeat=3 : no more than 3 consecutive characters
usercheck=0 : can’t have the username
enforce_for_root : make sure the root also needs to comform to the rules
difok=7 at least 7 char not from the former password
How to set up a new group called “evaluating”? How do you assign a user to this group? How do you check if the user is part of the group?
- sudo groupadd evaluating
- usermod -aG evaluating username
- sudo groups username or getent group sudo
How do you create a new user? And how do you set their password?
- sudo useradd newusername
2. sudo passwd newusername
Explain the advantages of the password policy. Explain the advantages/ disadvantages of the implementation
Advantages
- Creates a bigger and more varied password, which should make it harder to guess for other humans
Disadvatanges:
- Easy to get wrong for the user.
- Easy to see what is missing for people trying to hack you. it will tell you if you are missing a digit. or special character for instance. And most people just use first letter as upper case and add a single digit to the end, so that narrows down the ammount of passwds
How to check that the hostname of the machine is correctly formatted as follows: login42 (login of the student being evaluated)
hostnamectl
How do you modify the host name?
you should also be able to restore the machine with the original hostname/ or just rename it again
- su
- hostnamectl set-hostname newname
- nano /etc/hosts
- edit the name to the newname (to prevent errors)
- reboot
How do you check if the UFW service is started?
sudo systemctl status ufw
How do you check if the ssh service is started?
sudo systemctl status ssh
How do you check what operating system you’re running
hostnamectl | grep Operating
What are the basic differences between CentOS and Debian
- Debian has more packages
- Debian is updated more frequently, every 2 years there is a big update, CentOS has an update cycle of 10 years
- There for CentOS is more difficult to upgrade, but only requires system administrators to look at upgrading every 10 years, which makes it nice for big enterprises
- CentOs is supported by a specific community called Red hat. Debian is suported by individuals