This Final Lab is a practical based activity covering the areas of Linux learned throughout the semester. Read each question carefully and thoroughly before executing the tasks within this lab. Remember, you have access to your course book, self-prepared notes, the internet, and the system's help, man, and info pages.
Introduction to Linux UNIX DCOM 142 Final Lab Professor Bryan Rock Overview: This Final Lab is a practical based activity covering the areas of Linux learned throughout the semester. Read each question carefully and thoroughly before executing the tasks within this lab. Remember, you have access to your course book, self-prepared notes, the internet, and the system's help, man, and info pages. ** No assistance from anybody. A couple of suggestions and things to note: · Review the entire lab, every page, before starting the lab. · Each question should be completed in order, as later questions may rely on earlier questions. · Some tasks will require elevated root access using the sudo command. · This Final Lab will assume that you are logged in as the student user, unless told otherwise. · When completed properly, you will not see any error messages from the commands. If you are seeing errors, check to make sure you are performing the task correctly. · Remember that Linux commands and file/directory names are case sensitive. Full credit will not be awarded if files or directories are spelled incorrectly. · You are responsible to verify each of your commands, that they were executed properly and answers the question being ask completely. · If you stop the lab, and shut down your virtual machine for any reason, make sure the "Restore current snapshot 'Final Lab'" is not checked or you will lose any work you have done. This option takes the virtual machine back to Lab Preparation. · If you need to start over, you can always restore your virtual machine back to the 'Final Lab' snapshot. · Review your Final Lab before you submit. What you submit is what I am grading. If it is missing anything, there will not be a second chance to re-submit after the deadline. · Screenshots should include the correct command and all results of executing the command for each question for full credit. Show all your work. See an example below. Lab Preparation: Important!!! If you answered no to any of these steps, STOP now and contact your instructor. 1. Open a Terminal Window. 2. Can you run the following command error-free? [student@server01 ~]$ sudo -v SHOW A SCREENSHOT BELOW 3. Can you run the last command (the yum ones) error-free? [student@server01 ~]$ sudo rm -f /etc/yum.repos.d/internal-repo.repo /etc/yum.repos.d/local-repo.repo [student@server01 ~]$ yum clean all && yum repolist SHOW A SCREENSHOT BELOW 4. Run the following command to start the lab. Was executing these two commands error-free? [student@server01 ~]$ history -c && history -w SHOW A SCREENSHOT BELOW 5. In the Oracle VirtualBox application, create a snapshot and name it Final Lab. Was creating a snapshot error-free? SHOW A SCREENSHOT BELOW Final Lab: 1. In the Terminal Window, create a directory called Final and subdirectory to Final called Bills, in one command. SHOW A SCREENSHOT 2. Change the permissions on the Final directory to full access for the user owner, read and executable for the group owner or no access for others. SHOW A SCREENSHOT 3. Change to the newly created Final directory. Stay in this directory for the entire lab. SHOW A SCREENSHOT 4. Search in the /var/log directory for all files that are larger than 20 KB and that have been updated in the last hour. Ensure you fix any "Permission denied" errors. Hint: run the search so you won’t get any errors. SHOW A SCREENSHOT 5. Create a symbolic link to the /var/log/secure file in your Final directory called secure.slink. SHOW A SCREENSHOT 6. Create three new groups named president, vp and congress. SHOW A SCREENSHOT 7. Create three new user accounts using the information below. Add their full names as a comment. a. George Washington named gwash and add to the president group b. John Adams named jadams c. Abraham Lincoln named alincoln SHOW A SCREENSHOT 8. Create a password for each of the three new user account, password is Pa22w0rd. The BAD PASSWORD message is a warning and can be ignore. SHOW A SCREENSHOT 9. Modify the jadams user account, adding the user to the the vp group. SHOW A SCREENSHOT 10. Change the group owner of the Bills subdirectory in your Final directory to congress. SHOW A SCREENSHOT 11. Give user gwash sudo access, identical to the student user. This will allow the user gwash to run any command, from any machine without a password. Show the command. SHOW A SCREENSHOT 12. Continuing with #11, show the file content where you made a modification. SHOW A SCREENSHOT 13. From the command line, log in as gwash user. SHOW A SCREENSHOT 14. Read the last eight lines of the /var/log/secure file, as the gwash user. SHOW A SCREENSHOT 15. Log out of the gwash user account and return to the student account. SHOW A SCREENSHOT 16. Lock the alincoln user account. SHOW A SCREENSHOT 17. Display the last 5 lines of the passwd file SHOW A SCREENSHOT BELOW 18. Display the last 5 lines of the shadow file SHOW A SCREENSHOT BELOW 19. Display the last 7 lines of the group file SHOW A SCREENSHOT BELOW · Run the following command prior to answering questions 20-22 [student@server01 Final]$ sudo cp /etc/{passwd,group,shadow} ~/Final 20. Change the user owner to jadams and the group owner to vp on the shadow file in your Final directory. SHOW A SCREENSHOT 21. Change the permission, using symbolic mode, on the shadow file in your Final directory to read and write for the user owner and read only for the group owner and others. SHOW A SCREENSHOT 22. Count the numbers of lines in the passwd, group, and shadow files in your Final directory. SHOW A SCREENSHOT 23. Set the SGID on the Bills subdirectory under the Final directory. SHOW A SCREENSHOT 24. Grant the vp group read-only permissions to the Bills subdirectory in your Final directory. The group owner is already congress and that should not change. Note: Ensure the SGID is still set on the Bills subdirectory under the Final directory. SHOW A SCREENSHOT 25. Create an empty file called Bill1.txt in the Bills subdirectory of your Final directory. SHOW A SCREENSHOT 26. Show the ip address of your system, displaying only the main Ethernet device. SHOW A SCREENSHOT 27. Install the htop package that is in the /Packages directory. SHOW A SCREENSHOT 28. Sort the /var/log/yum.log file by the fifth column. SHOW A SCREENSHOT 29. Display all of the Final directory and Bills subdirectory contents SHOW A SCREENSHOT 30. Checking ACL for the Bills subdirectory SHOW A SCREENSHOT · Close all terminal windows to complete the lab Lab Submission: 1. Open a new Terminal Window. 2. Type history -a 3. Copy your history output to history.txt (Ensure the file has content in it.) [student@server01 Final]$ history > /home/student/history.txt 4. Submission: a. Using Firefox on your Linux VM, go to Brightspace (https://ccbcmd-bb.blackboard.com) -> Learning Modules -> Finals. You’ll need to upload the history file (/home/student/history.txt). b. Using Firefox on your local desktop, go to Brightspace (https://ccbcmd-bb.blackboard.com) -> Learning Modules -> Finals. You’ll need to upload this Word document (with screenshots). Page 2 of 2