# Module 22.0 Lab ## Goodluck!
### Information The password of the user root and greater must be greater A repository has been made available at: http://10.0.1.5/ **All changes must persist after a reboot!!** |Network Settings|| |:-|:-| |DEVICE|eth1| |IP4.METHOD:|Manual| |IP4.ADDRESS[1]:|192.168.121.200/24| |IP4.GATEWAY:|192.168.121.1| |IP4.DNS[1]:|8.8.8.8| The connection must be setup on **eth1** ### Lab Questions #### 1: Create required users and Group members Create the following users, groups, and group memberships on machine vm: - A group named sysusers - A user andrew who belongs to sysusers as a secondary group - A user susan who also belongs to sysusers as a secondary group - A user brad who does not have access to an interactive shell on the system, and who is not a member of sysusers - natasha, susan, and brad should all have the password of password #### 2: Create a collaborative directory Create a collaborative directory ```/shared/sysusers``` with the following characteristics on server vm: - Group ownership of ```/shared/sysusers``` is sysusers - The directory should be readable, writable, and accessible to members of sysusers, but not to any other user. (It is understood that root has access to all files and directories on the system.) - Files created in ```/shared/sysusers``` automatically have group ownership set to the sysusers group #### 3: Create a user Create a user alice with uid 4332 and should automatically get interactive shell #### 4: Set file access control lists Copy the file ```/etc/fstab``` to ```/var/tmp```. Configure the permissions of ```/var/tmp/fstab``` so that: - The file ```/var/tmp/fstab``` is owned by the root user - The file ```/var/tmp/fstab``` belongs to the group root - The file ```/var/tmp/fstab``` should not be executable by anyone - The user andrew is able to read and write ```/var/tmp/fstab``` - The user susan can neither write nor read ```/var/tmp/fstab``` - All other users (current or future) have the ability to read ```/var/tmp/fstab``` #### 5. Create collaborative directory with set space Create and mount directory with access for the sysusers this must persist after reboot - ```/mnt/homework``` with a space of 3000Mb and an XFS filesystem #### 6: Enable SELinux Selinux must be on enforcing #### 7. Create a SWAP partition Create a swap partition of 1000 MB your created partition should auto mount after next boot #### 8: Install the kernel update Update the Kernel of your VM The updated kernel is the default kernel when the system is rebooted
The original kernel remains available and bootable on the system
Create your own repository for this #### 9: Configure some work locations for users Create and mount the following new locations please note these must persist after a reboot: - ```/mnt/cats``` with a space of 300Mb ext4 - ```/mnt/dogs``` with a space of 500Mb xfs - ```/mnt/notporn``` with a space of 5000Mb xfs #### 10. Configure cron The user andrew must configure a cron job that runs daily at 14:23 local time and executes: - ```/bin/echo hello``` #### 11: Configure NTP Configure your VM so that it is an NTP client of 10.0.1.5 and that’s it is in the timezone Amsterdam. #### 12: Change the hostname Set the hostname of your VM to mymachine[student number].greateracademy.local #### 13. Implement a webserver a webserver has been configured on your VM. Open port 8300 for this webserver to show to external visitors: - The server must be reaschable via port ```8300``` #### 14. Resize Logical Volume Extend the logical volume ```root``` to 130GB #### 15: Extract the string and redirect On your vm machine find the string “chapter” in file ```/media/onthegenealogyofmorality``` and redirect the output into ```/root/found/words.txt```. #### 16: Find the file and redirect On your vm machine search the files owned by user nietzche named file* and redirect it to ```/root/found``` #### 17. Compressing On your VM Nietzche has had a mental breakdown and needs to be reminded of what he has worked on.
Please compress the ```/root/found``` directory as a bzip and move the compressed file to his home directory and name it ```found.tar.gz``` #### 18. Podman Create a persistant container with httpd on port 8080, with the hello file from ftp://server as the index.html file. #### 19. System Tuning Tune your vm to the profile virtual-host. Put in the file **/root/recomended** the profile tuned-adm is recomending to use. #### 20. AutoFS Configure NFS autofs as a multi-mount to mount on ```/mnt/users```: - **server** (NFS) is exporting /mnt/users