Changes .) : Ssignment
Changes .) : Ssignment
Changes .) : Ssignment
Objectives:
To learn how to harden a Linux operating system during the boot process.
Question 1. Document/List, here, all steps to successfully boot in this mode. (Be specific of
changes.)
Question 2. What is the user name you are logging in onto the machine? What is the command
to check for the user name? Provide an appropriate screenshot.
Question 3. What is usually the single-user-mode boot used for?
Question 4. What is the command? Provide an appropriate screenshot of the command and its
effect.
3. Edit the /etc/sudoers file. Make sure there is the following exact line. If not, just add it.
%sudo ALL=(ALL:ALL) ALL
4. Add naivehacker1 to the sudo group.
Question 5. What is the command? Provide an appropriate screenshot of the command and its
effect.
Question 6. What is the purpose of adding a normal user to sudo group, or to sudoers file?
5. Exit single-user mode, and let the systems boot normally. Then, log in onto the machine with
the newly added user naivehacker1.
6. Try to list the contents of the most sensitive and confidential file on the system, shadow, with
the command cat /etc/shadow.
7. Now, try the previous step with the command sudo cat /etc/shadow.
Question 11. How many Linux file systems are now there, i.e., how many different etc,
home, boot, root etc. directories are there? Provide an appropriate screenshot to defend
your answer.
7. Change to the second directory inside /media, i.e., not cdrom. Then, following the directory
structure, change into the etc directory inside.
8. Edit the passwd file. The last line must be the one starting with naivehacker1. Add the
following line at the end of file:
naivehacker2:x:1010:1010:,,,:/home/naivehacker2:/bin/bash
9. Edit the shadow file. The last line must be the one starting with naivehacker1. Add the
following line at the end of file:
naivehacker2:U6aMy0wojraho:17587:0:99999:7:::
Question 12. What is the difference between the passwd and shadow files?
10. Edit the group file, and add naivehacker2 to the sudo group just after the existent
naivehacker1. (They must be separated by a comma.)
11. Following the directory structure starting from /media, change into the home directory
inside.
12. Inside, create a new directory named naivehacker2.
Question 13. What is the command? Provide an appropriate screenshot of the command and
its effect.
13. Change the permissions of this newly created directory to give full access to it to everyone.
Question 14. What is the command? Provide an appropriate screenshot of the command and
its effect.
14. Power off the machine, remove the iso image from the virtual drive, and then start the machine.
15. Log in onto the machine with the newly added user naivehacker2 supplying no
password!!! (I.e., select the user and just hit enter.)
16. Try to list the contents of the most sensitive and confidential shadow file on the system with
the command sudo cat /etc/shadow. (No password is required!!!)
Question 17. Can you boot into this new system in single-boot mode and add an arbitrary user
(as in Part I above) without supplying the correct password you used to encrypt the disk during
the installation process?
Question 18. Can you boot into this new system using a Live CD and add an arbitrary user (as
in Part II above) without supplying the correct password you used to encrypt the disk during
the installation process?
Question 19. By using disk encryption, is an operating system and its data protected against all
threats? Defend your answer.