Waiting for answer This question has not been answered yet. You can hire a professional tutor to get the answer.

QUESTION

Linux Administration Coursework #1 (Handed In on the 03th-May-2016) This CW covers Linux basics (filesystem, users and permissions, processes, etc.

Linux Administration

Coursework #1

(Handed In on the 03th-May-2016)

This CW covers Linux basics (filesystem, users and permissions, processes, etc.), Bash basics, key commands, installation and booting issues, system configuration, SSH, and su/sudo.

Review the slides, handouts, and relevant chapters of the text as you research. Questions about commands here always refer to CLI commands not the use of GUI tools. Note that some of the questions require you to use a Linux machine and run particular commands.

Key Commands, Linux Basics, Bash Basics, and ACLs:

1. Suppose that the CWD is /lib/modules, give a command using a relative pathname and a command using an absolute pathname, that would print out the contents of the regular file /lib/security/pam-access.so using the cat command.

2. What is the standard command to determine the pathname of the mv command/program?

3. What is the purpose of the /sbin subdirectory? (I.e., what is normally stored there?)

4. Explain the difference between "the root directory" and "root's directory".

5. Explain what the term "search path" means in the context of a shell (like Bash).

6. What are two commands that could be used to display your current search path?

7. Suppose your current search path is: /usr/bin:/bin:/usr/local/bin. Explain what the shell does when you type the command "foo" at a prompt (and type return).

8. Logged in as a non-root user, is /sbin in your search path? Explain why it is or is not there.

9. Suppose you have created a shell script named foo and have made it executable, but when you type it as a command ("foo"), Bash says: "command not found". What is wrong and what must you do to run the command?

10. Explain why the Linux does not have drive letters like Windows does.

11. What is the contents of a file ~/song.mp3?

12. What command would show all lines containing the string "brace expansion" (ignoring case) in the man pages for Bash? (Hint: requires piping and filter.)

13. What command would delete some files from the directory /tmp, where the relevant filenames have this pattern: they begin with "A" or "B", contain the string "406", and have a (final) extension of ".txt" or ".text".

14. Suppose that the command ls -l test produces this output:

-rwxrw-r-- 2 carver faculty 1732 Jan 23 20:39 test

(a) Who is the files's owner and what are his/her access permissions?

(b) What is the group associated with the file and what are its access permissions?

(c) What users have only read permissions for test? (Be precise.)

(d) What size is the file? (Be sure to specify the units!)

(e) What does the Jan 23 20:39 mean?

(f) What does the 2 before carver mean?

15. What are hidden files in Linux/UNIX, why are they called that, and what are they commonly used for?

16. What command would list all files (except . and ..) in the current working directory?

17. What is the simplest command for adding execute permission to file ~/foo, for all users (without changing any other permissions)?

18. Explain what execute permission means/allows when it is associated with a directory.

19. Suppose that you wanted all users on the machine to be able to see the contents of the file ~/public/software/instructions.text. Explain the minimum set of permissions for files and directories needed to allow this, and any security issues that arise.

20. Suppose that you want to allow (only) other users bob and chuck to be able to access the above file. Explain what you would have to do differently from what you described above. (You are not allowed to consider the use of ACLs.)

21. How would your answer to the previous problem change if you were to use ACLs (access control lists)?

22. What are set UID (SUID) files, and when are they typically used?

23. Find one SUID file on a Linux system, and show its "long listing" (permissions, owner, etc.).

24. Why are SUID root files considered a security issue?

25. What command would be used to set a file foo to be SUID, and how exactly would it be done?

26. What command could determine the process ID (PID) of a running SSH server (sshd)?

27. What command would best identify which process is using excessive CPU resources?

28. What command that should definitely terminate the process identified above?

29. What file contains the list of valid user ID's (UID's) and their associated usernames?

30. What file contains passwords on a Linux system (if that system is using local authentication rather than NIS, etc.)?

31. List the steps (including commands) required to be able to view and modify files on a Windows OS partition from a Linux install on the same machine. (Assuming the Linux installer did not make Windows available.)

32. Suppose you have purchased an external USB harddrive, formatted with NTFS, but you want to be able to backup large files from your Linux machine onto it with an ext4 filesystem. List the steps (including any commands) required to get the drive ready so you could copy files onto it.

Installation and Configuration:

33. What is an extended partition (on a PC harddrive)?

34. Why is it advantageous to install Linux into logical partitions?

35. Why is it common to use a separate partition for the /var subdirectory?

36. Give the filesystem pathname for the second SATA harddrive.

37. Give the filesystem pathname for the first logical partition on the third SATA harddrive.

38. Suppose you want to partition your machine with one swap partition and six partitions that could be used for Linux installs. Compare how you would using MBR partitioning vs. GPT partitioning.

39. Explain the differences between installing a boot loader into "the master boot record"

(MBR) vs. "the root partition."

40. What are the default configuration files for the GRUB Legacy bootloader and the GRUB2 bootloader? (Give absolute paths.)

41. What configuration file contains the list of disk partitions and removable devices along with their associated mount points?

42. What command(s) will tell you the listening servers on a system?

43. Suppose you try to ssh to a remote machine but you get a "no route to host" message, what command(s) should you use to start diagnosing the problem and why?

44. How can you check that your Ethernet card (NIC) has been properly set up? (What command(s) would you use and what would you look for in its output?)

init, startup, runlevels:

45. What two runlevels do "Redhat Family" Linux systems commonly boot to, and how do they differ?

46. How is the default runlevel for a Linux system determined? I.e., what file specifies it and how is it specified? (Assume standard init based system.)

47. What command can be used to change runlevels to some runlevel i? (Assume standard init based system.)

SSH and su/sudo:

48. What is the main configuration file for the SSH server?

49. What are the two main generic access control files for servers? (Hint: they originated with what is commonly called "tcpwrappers.")

50. What are the three best methods you could use to try to prevent "brute force" password attacks against an SSH server from the Internet? (This means using elements of SSH not additional apps!)

Show more
LEARN MORE EFFECTIVELY AND GET BETTER GRADES!
Ask a Question