Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

WEIGHTAGE: 20% Assignment is to experience networked rpm based OS, advanced storage, bash scripting, MAC security, remote access, remote file sharing, etc., The assignment requires

WEIGHTAGE: 20%
  • Assignment is to experience networked rpm based OS, advanced storage, bash scripting, MAC security, remote access, remote file sharing, etc.,
  • The assignment requires two VMs, it can be done in CentOS 8 OR Oracle Linux 8 or both.Assignment-1 VM can be used as one of the VM or can install two new VMs
  • Download the iso file with size of about 7.4GB and more.
  • CentOS can be downloaded from http://isoredirect.centos.org/centos/8/isos/x86_64/
  • Oracle Linux can be downloaded from https://edelivery.oracle.com/, requires registration.
  • VM installation done as Virtual Machine(VM) using VMWare Workstation Pro or VMWare Workstation Player or Virtual Box.
  • Screenshots legibly pasted in Word document need to be submitted in blackboard as single document by the due date mentioned in the blackboard No full desktop screenshots.
Part-B script content and blkid command MUST be pasted as text (Q.No 13)
  • Marks are assessed and evaluated based on User's learning experience, BB collaborate demonstration and ability to answer questions based on this assignment.
  • In-person demonstration must be done in Week-13(timings are posted in blackboard) with an appointment requested through Course messages.
  • Plagiarism is reported as Academic misconduct and marked as zero.
  • Delay per day is 10% penalty upto maximum of 3 days and thereafter it is zero.
  • None of the activity should be done as root (UID zero) user, it will be awarded zero.
  • sudo command must be used only if requried.
Whenever nnnn is mentioned it is your last four digits of Humber ID that starts with nPART-A: INSTALLATION 1.Install two VMs using CentOS or Oracle Linux or one CentOS and Oracle Linux (Assignment-1 VM can be used as one of the VM for this assignment but need to create username as specified in GUI-VM1) The first VM will be GUI and the second VM as minimal installation (For minimal install it can be selected in Software Selection in INSTALLATION SUMMARY during installation) 2.The specifications for the VMS are given below
GUI VM1 Minimal Install VM2
a Language English English
b Keyboard Layout US English US English
c Time and Date Americas/Toronto Toronto time zone Americas/Toronto Toronto time zone
d Network Enabled Enabled
e Hostname guinnnn.nest207.net minnnnn.nest207.net
f Your Name yourfirstname yourlastname yourfistname yourlastname
g Username mustbe in lowercase yourfirstnamefollowedby FirstLetterOfYourLastName1 example John Smith username will be johns1 yourfirstnamefollowedby FirstLetterOfYourLastName2 example John Smith username will be johns2
if you are using Assignment-1 VM, need to create user as specified in 2g for GUI-VM1 and need to log in with that username to do this assignment-2. DO NOT USER ASSIGNMENT-1 username of GUI-VM1 PART-B: SCRIPTING (Scripts can be developed adding your own innovative design keeping it as your unique development scripts MUST be in bash shell linux commands and do not use other programming languages) SCREENSHOT output of the all the scripts in this section and the script itself must be copied and pasted as text in word document for all the script.
  1. In GUI-VM1, Create a bash script to create a user with
    1. input given for Firstname, Lastname, username, primary group, secondary group (if any) and password need to encrypted.
    2. The username need to be checked if the username with same user exists, if not available then only the username need to be created.
    3. If the same username already exist in the system, it need to loop back to get a new username and then create the user by checking again.
    4. Similarly, the group name need to be checked if it is available and if it is not available need to get confirmation to create, if not need to loop to get group input.
    5. Finally display the username and group
  1. Write a bash script which displays as shown with details given below:
    1. When the number entered it should display the output
    2. PID systemd should display PID of systemd process, likewise for PIDNetworkManager
    3. defaulttarget should display the default target
    4. rsyslogstatus should display the status of rsyslog service
    5. myfiles should display files in your home directory in long listing format
    6. messages should display the last 10 lines of the log file messages.
    7. exit should exit the script and return to command prompt.
    8. If none of the numbers shown entered, it should display Wrong entry, try again.
    9. You may add more system information as options.
  1. Write one single zenity script with following activities
    1. to enter a username in a entry dialog box,
    2. then another dialog box for file browser to select a file
    3. then question dialog box to say "Click Yes to edit and No to view only", accordinly the file content should be displayed in a dialog box,
    4. The username with the name of the file selected should be stored in a file data.txt for every file viewed or edited. The separator between username and file name should be :
    5. script should loop and stop when No is selected.
  1. Using zenity, write script that is similar to the one shown here. Graduation should display 2020, 2021, 2022 and 2023 when clicked on the drop down arrow, Programs should list NEST, CENG, BUSN, MECH, ELEC, HOSP, RECR and the inputs need to be written to a file named student.txt, with delimiter : and the entries are looped until it need to be discontinued.
PART-C: STORAGE vdo and stratis
nnnn is your last four digits of your humberid which starts with n
In MIN-VM2, add virtual hard disks to your VM as below and list the block devices a)4GB x 1 b)1GB x 2 (SCREENSHOT)
  1. Using 4GB HDD, create VDO volume named vvnnnn of logical size of 16GB with slab size of 128M.
  2. Using LVM, mount vdo volume vvnnnn as /hrdnnnn from logical volume lvvdo1 of 8GB from volume group
vgvdo and and file system is xfs.
  1. Using LVM, mount vdo volume vvnnnn as /erpnnnn from logical volume lvvdo2 of remaining size from volume group vgvdo and and file system is xfs.
  2. Using stratis with 1GB HDD and mount it as /technnnn with pool as poolnnnn and filesystem as fsnnnn,
  3. Using stratis with 1GB HDD and mount it as /sapnnnn with pool as poolznnnn and filesystem as fsznnnn,
  4. Type sudo blkid >> blkid.txt
SCREENSHOT: a) df -Th /hrdnnnn /erpnnnn /technnnn /sapnnnn b)sudo pvs c)sudo vgs d)sudo lvs e) sudo vdostats --hu f)sudo vdo list g)sudo stratis pool list h)sudo stratis filesystem list i) cat blkid.txt Refer to chapter 13,14 of course book, https://www.tecmint.com/create-a-vdo-volume-on-a-storage-device-on-rhel-8/ PART-D: LOGGING
  1. In MIN-VM2, make atleast 3 entries in messages log file as below:
    1. Message-1 from Assignment2 by yourname and yourHumberID on dateandtime of entry
    2. Message-2 from Assignment2, hostname is hostname_of_system and kernel version is kernelversion
    3. Message-3 from Assignment2, PID of systemd is pid and service sshd is enabled_or_disabled. (SCREENSHOT of these messages from messages log file)
  2. Show journalctl alerts of sshd, sssd, crond,tuned and NetworkManager (SCREENSHOT)
  3. List available tuning profiles (SCREENSHOT)
  4. List active tuning profiles (SCREENSHOT)
  5. Display the status of journalctl's and tuned-adm's service(SCREENSHOT)
PART-E: SCHEDULING & NETWORKING
  1. In MIN-VM2, Schedule a backup to be taken at 11.59pm from Monday to Friday /etc directory and the backup file need to be archived and compressed, the backup file name should be the date and time the backup was taken. These backups need to be stored in /backup directory owned by your username and group. No sudo should be used for this backup. file name format YYYYMMDD-HHMMSS-etc.tgz SCREENSHOT : a) atleast 3 backups to confirm your scheduling is working b) crontab -l c)ls -l /backup d)ls -ld /backup e)cat scriptcreated
  2. Display (SCREENSHOT) both VMs Network interface, IP Address, Gateway and Netmask.
  3. Ping from VM1 to VM2 and VM2 to VM1 using IP address.(SCREENSHOT)
PART-F: SELINUX
  1. In MIN-VM2, create a user seuser1 and map the seuser1 to selinux user user_u. This should be done while creating the user (SCREENSHOT: a)command and output b)display that seuser1 is mapped to user_u)
  2. Create user seuser2. After creating the user map the user to selinux user staff_u. (SCREENSHOT: a)commands and output b)display that seuser2 is mapped to staff_u)
  3. List the selinux users using seinfo and semanage command (SCREENSHOT)
PART-G: SSH
  1. Being logged in MIN-VM2, login securely to GUI-VM1 using ip address (SCREENSHOT). Type exit
  2. Login securely to GUI-VM1 using short hostname (SCREENSHOT). Type exit
  3. Being logged in GUI-VM1, login securely to MIN-VM2 using RSA key authentication (SCREENSHOT).
28.Type cat .ssh/authorized_keys, (SCREENSHOT) Type exit, Type cat .ssh/id_rsa.pub (SCREENSHOT)
  1. Securely copy file blkid.txt from MIN-VM2 (SCREENSHOT)
  2. Type cat blkid.txt and copy it as text to the word document (DO NOT TAKE Screenshot)
  3. Type hostnamectl and copy it as text to the word document (DO NOT TAKE Screenshot)
32.SCREENSHOT: In GUI-VM1 a)ls -l ~/.ssh b)In MIN-VM1 ls -l ~/.ssh PART-H: NFS
  1. Configure MIN-VM2 as NFS Server, where folders /nfsdocs, /nfsbak, /records and /policies are NFS shares to GUI-VM1. (SCREENSHOT a) exportfs -avr b)cat /etc/exports c)firewall-cmd --list-services
    1. /nfsdocs owned by your username and group & Create non-zero files ndoc1, ndoc2 and ndoc3 in
/nfsdocs
  1. /nfsbak owned by root user and group & Create non-zero files nbak1, nbak2 and nbak3 in /nfsbak
  2. /records owned by your username and group & Create non-zero files nrec1, nrec2 and nrec3 in
/records
  1. /policies owned by root user and group & Create non-zero files npol1, npol2 and npol3 in /policies
  2. /nfsdocs and /records should be exported with options rw and sync
  3. /nfsbak and /policies should be exported with options ro and sync
  1. Configure GUI-VM1 as NFS Client, and mount as following
    1. Mount nfs share /nfsdocs as /nfsshares
    2. Mount nfs share /nfsbak as /nfsbakc
    3. Auto Mount nfs share /records as /nfsrecords using Direct Map autofs
    4. Auto Mount nfs share /policies as /misc/nfspolicies using Indirect Map autofs
(SCREENSHOT: GUI-VM2: a)df -Th /nfsshares /nfsbakc /nfsrecords /misc/nfspolicies b)cat /etc/auto.direct c)cat /etc/auto.misc d)auto.master e)systemctl status autofs ==============END OF ASSIGNMENT-2 if demonstrated by 10th December 2020=================== PART-I: SAMBA (This section is required if demonstration is done on 11th December 2020)
  1. Configure MIN-VM2 as Samba server and share /samba1 with share name smbshare1. Create non-zero files smb1, smb2, smb3 in /samba1. (SCREENSHOT: a) testparm b)share section of smb.conf c)smbclient output
  2. Configure GUI-VM1 as Samba client and mount smbshare1 as /smbmount and list it (SCREENSHOT)
  3. Samba share smbshare1 to your windows or mac machine file explorer (SCREENSHOT)
======================================

Attachments:

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Students also viewed these Programming questions

Question

answer this immediately

Answered: 1 week ago