B2BR Evaluation Flashcards

(39 cards)

1
Q

how to retreive the signature?

A

shasum filename.vdi

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

How does a virtual machine work ?

A

A VM provides a virtual environment for running applications, offering flexibility and isolation.

  1. Imagine a computer within a computer: This is the core concept of a VM.
  2. Each VM has its own operating system: Like a separate computer.

3.A hypervisor manages the VMs: It controls resource allocation and ensures they run smoothly.

  1. Hypervisor Types:
    Type 1 (bare-metal): Directly installed on hardware.
    Type 2 (hosted): Runs within another operating system.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Why did I choose Debian over Rocky?

A

Larger community: More resources and support available for beginners.

User-friendly package management: APT is intuitive and easy to use.

Extensive documentation: Many guides and tutorials available.

Stability: Known for its reliability and security. Longer release cycle. (new feautres intro gradually > less bugs)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the difference between Rocky and Debian?

A

Rocky Linux is a community-driven Linux distribution based on Red Hat Enterprise Linux (RHEL). It’s a good choice for those familiar with RHEL’s ecosystem and looking for a free alternative.

Debian is another popular Linux distribution known for its stability, security, and large package repository. It’s a great option for beginners due to its user-friendly approach and extensive documentation.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What is the purpose of virtual machine?

A

Flexibility: Diff OS can be run on same computer

Isolation: Each VM run independant of each other and the host.

Efficiency: VMs can improve resource utilization by consolidating multiple workload into single physical machine.

Testing & Development: 1 App, tested on different environment (IOS, Andorid, Windows)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

The difference between aptitude and apt

A

apt

Basic command-line interface: Provides essential commands for installing, removing, and updating packages.

Simpler syntax: Generally easier to use for basic package management tasks.

Suitable for most users: Adequately handles most package management needs.

aptitude

Advanced command-line interface: Offers more features and flexibility for complex package management scenarios.

Interactive mode: Allows users to resolve dependency conflicts interactively.

Better dependency handling: Can handle complex dependency issues more effectively.

Suitable for experienced users: More suited for users who require advanced package management capabilities.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What is APParmor?

A

Security framework (Mandatory Access Control), that restricts application permissions, preventing unauthorized access and improving system security. It’s often used in environments where data security is critical.

Mandatory because, restrictions are enforced at kernal level. So apps cant by-pass the controls.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Check AppArmor status

A

sudo aa-status

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How to check if OS is Debian or Rocky?

A

cat /etc/os-release

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q
  1. How do you check if the UFW service is started?
  2. How do you check if the ssh service is started?
A
  1. sudo systemctl status ufw
  2. sudo systemctl status ssh
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Verify UFW is installed

Verify that is functioning correctly

A

dpkg -l | grep ufw

sudo ufw status verbose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is ufw?

A

It stands for uncomplicated firewall and is an easy to use program to manage a netfilter firewall. It can control incoming and outgoing network traffic.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Why is ufw useful?

A

UFW abstracts the underlying complexity of iptables, allowing for faster setup and easier rule management, which helps users implement effective firewall policies with minimal effort and reduced risk of errors.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

List active rules for UFW

A

sudo ufw status numbered

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

Add new rule to UFW (add port 8080)

Verify added to list

A

sudo ufw allow 8080

sudo ufw status verbose

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Delete new rule from UFW (remove port 8080)

A

sudo ufw delete allow 8080

17
Q

Check user exist

Check if they belong to sudo and user42 groups

A

getent passwd kilangov

groups kilangov

18
Q
  1. How do you create a new user?
  2. How do you set their password?
A
  1. sudo useradd newusername
  2. sudo passwd newusername
19
Q

How do you check the password policy?

How do you check Password status?

A

For password requirement:
sudo nano /etc/pam.d/common-password

Password expiration:
sudo nano /etc/login.defs

Password status:
sudo chage -l username

20
Q

Explain your password policy implementation

A

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

21
Q
  1. How to set up a new group called “evaluating”?
  2. How do you assign a user to this group?
  3. How do you check if the user is part of the group?
A
  1. sudo groupadd evaluating
  2. usermod -aG evaluating username
  3. sudo groups username OR getent group sudo
22
Q

How to check that the hostname of the machine is correctly formatted as follows: login42 (login of the student being evaluated)

23
Q

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)

A
  1. su
  2. hostnamectl set-hostname newname
  3. nano /etc/hosts
  4. reboot
24
Q

How do you show the partitions on the machine?

25
Explain how LVM works
1. Physical Disk allocates storage (sda) for VM through hypervisor. 2. Physical disk of VM (sda) is partitioned into sda1 and sda2. Max 3 PP and 1 EP 3. sda2 is the extended partition, used by LVM. sda2 becomes physical volume. and used to create the Volume Group. 4. Logical volume is created from the Volume Group. 5. Logical volume is mounted onto a file system.
26
Why is LVM beneficial?
Flexibility in Storage Management: 1. Dynamic Resizing: Unlike traditional partitions, which have fixed sizes, LVM allows you to resize logical volumes (LVs) on the fly. You can increase or decrease the size of a volume without needing to unmount it or reboot the system, making it easy to adjust to changing storage needs. 2. Combine Multiple Disks: LVM enables you to combine multiple physical disks into a single volume group (VG), creating a large pool of storage that can be allocated as needed. This means you’re not limited by the size of a single physical disk.
27
How do you check if the sudo program is properly installed?
dpkg -l | grep sudo sudo -l
28
Assign new user to "sudo" group
sudo usermod -aG sudo newusername
29
What is sudo?
sudo stands for "superuser do." It is a command in Unix-like operating systems that allows a permitted user to execute a command as the superuser (root) or another user, as specified by the security policy. It's used to perform tasks that require higher privileges, such as installing software, modifying system settings, or managing other users.
30
How does sudo work?
When a user runs a command with sudo, the system checks the /etc/sudoers file to determine whether the user has the necessary permissions to run that command. If authorized, the command is executed with elevated privileges.
31
Where did you configure the sudo rules from the subject?
sudo nano /etc/sudoers OR sudo visudo
32
1. Verify that the SSH Service is Installed 2. Verify that the SSH Service is Functioning Correctly
1. dpkg -l | grep openssh-server 2. sudo systemctl status ssh
33
Basic Explanation of SSH
What SSH Is: SSH (Secure Shell) is a protocol that allows users to securely access and manage a remote server or computer over an unsecured network. It encrypts the connection, ensuring that data sent between the client and server is secure. Why SSH Is Important: SSH is important because it provides a secure method for remote login and command execution, protecting sensitive data from being intercepted by attackers. It is widely used for system administration, file transfers, and secure communication between devices.
34
Verify that SSH Uses Only Port 4242
sudo nano /etc/ssh/sshd_config
35
Help to Use SSH to Connect with the New User Ensure ssh cannot be used with root user
ssh -p 4242 newusername@ nano /etc/ssh/sshd_config ---> PermitRootLogin no
36
Show how the script runs every 10 minutes
sudo crontab -u root -e crontab is the file, for (-u) user root, -e = edit
37
What is cron?
A job scheduler, used to execute a command to an operating system or server for a job at a specified time.
38
,How does the monitoring script work?
/home/kilangov/monitoring.sh
39
How to stop the cronjob without editing the crontab file?
sudo systemctl stop cron (temp) sudo systemctl disable cron (perm)