summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormo khan <mo@mokhan.ca>2019-09-03 19:58:36 -0600
committermo khan <mo@mokhan.ca>2019-09-03 19:58:36 -0600
commit4d359f8637ff6f62687fce4a2136af9cf54b183b (patch)
tree897bb2b44b919f37563ad76e94f399d7598d0d60
parent06f00df9ab806b61f33868d3b20302114e2aed61 (diff)
add Assignment 3
-rw-r--r--README.md154
1 files changed, 75 insertions, 79 deletions
diff --git a/README.md b/README.md
index 043c52e..7772c7f 100644
--- a/README.md
+++ b/README.md
@@ -1,91 +1,87 @@
-# COMP-325 Assignment 2 - mo khan (3431709)
+# COMP-325 Assignment 3 - System Administration - mo khan (3431709)
-> Write shell scripts specified in problem 6 at the end of Chapter 16.
-> Write shell scripts specified in problem 7 at the end of Chapter 16.
-> shell scripts specified in problem 13 at the end of Chapter 16.
+## Lab 1
-I have placed the Bourne shell scripts in the `bin` directory. I have
-also included tests for these scripts in the `test` directory. I have
-bundled a copy of [bats](https://github.com/sstephenson/bats) to make it
-easier to run the tests.
+1. Research several Linux distributions (CentOS, Debian, Fedora, Gentoo, Mandriva, OpenSUSE, RedHat, Slackware, TurboLinux, Ubuntu, and so on) and recommend a distribution for each of the following applications. Explain your choice.
+ a. A single user working in a home office
+ b. A university computer science lab
+ c. A corporate web server
+2. What is the current status of Linux kernel development? What are the hot issues? Who are some of the key players? How is the project managed?
+3. Draw a dependency graph that shows which daemons must be started before other daemons on your Linux system.
-```bash
-$ sh ./bin/test
-1..10
-ok 1 testing
-ok 2 invoke with a single integer
-ok 3 invoke with multiple integers
-ok 4 invoke with single non-numeric
-ok 5 invoke with multiple non-numeric
-ok 6 invoke with mixed numeric and non-numeric
-ok 7 invoke with a host on the network
-ok 8 invoke with a host not on the network
-ok 9 invoke without a hostname argument
-ok 10 invoke with multiple hostnames
-```
+## Lab 2
-All source code related to this assigment is stored in a private git
-repository hosted on GitHub. Access is available upon request.
+Linux installation can happen smoothly and automatically, but sometimes there are problems to be solved.
+Write a professional report on the installation process of Linux/UNIX on your system.
+Include as much of the following as is relevant to your installation.
+There may be many other issues not listed below that you had to deal with.
+Include those as well.
+Your report should include advice to other people attempting to do the same.
-## Chapter 16
+1. List required hardware and the hardware provided by your system. In particular, the a. CPU
+ b. floppy disk drive
+ c. bootable CD drive
+ d. RAM
+ e. space allocated on the hard disk drive
+2. Indicate software requirements according to the system you have used: a. Windows
+ b. stand-alone Linux
+ c. separate partition
+ d. dedicated hard disk
+ e. resized Windows partition
+3. Provide details of CD ROM, hard disk, and mouse information: a. SCSI CD-ROM
+ b. swap partition
+ c. mouse model
+ d. time zone
+ e. the port that the mouse uses
+4. Provide video and monitor details:
+ a. monitor manufacturer and model b. X-windows configuration
+ c. chipset used by the video
+ d. the vertical refresh rate
+5. Include network configuration: a. DHCP server
+ b. computer name
+ c. domain name
+ d. IP address
+ e. the netmask
+ f. the broadcast address g. the NIS domain
+ h. the Samba server
-### Problem 6
+## Lab 3
-Write a Bourne shell script that takes a list of integers as the command line argument and displays a list of their squares and the sum of the numbers in the list of squares.
+1. Study the system configuration files and answer the following questions:
+ a. What startup style does your system most resemble, BSD or AT&T?
+ b. Why? Give at least two reasons for your answer above. (Examples would be presence or absence of /etc/inittab, init.d scripts, etc.)
+ c. Which directory contains the rc.d (or similar file)? Explain the contents of the rc.d (or the file/s) that does the same in your setup.
+ d. What is stored in rc0.d? Execute the ls command while in rc0.d, and say what is common among all the files stored there.
+ e. What is the function of files stored in init.d and the /etc/inittab?
+ f. How do you enable/disable the CTRL-ALT-DELETE as an alternative to shutdown?
+2. Read the main page for the shutdown command.
+ a. How do you shut down the system to a single-user mode? Try it and present results.
+ b. What’s difference between single-user mode and how the system normally runs?
+ c. Explain options in the command “shutdown -t 100 +3 -h”.
+ d. How do you boot into single-user mode?
+ e. What, if anything, do you notice that is different about booting into single-user mode compared to shutting down to single-user mode?
+ f. Shut the system down; then boot it normally. Look in the file /var/log/messages (often /var/adm/messages on some systems). How does the information in the “messages” file compare with what appears on the screen during boot?
+3. Linux Startup
+ a. Run the dmesg command, and list which devices are assigned to each of CD-ROM, HD, and floppy disk.
+ b. What do you think the following (or a similar line) in dmesg output means?
+ Linux version 2.6.5-1.358 (bhcompile@bugs.build.redhat.com) (gcc version 3.3.3 20040412 (Red Hat Linux 3.3.3-7)) #1 Sat May 8 09:04:50 DT 2004
+ c. Is there an Ethernet card detected on the system?
-```bash
-$ sh bin/problem-6.sh 1 2 3 4 5
-squares: 1 4 9 16 25
-sum: 15
-```
+## Lab 4
-### Problem 7
+Rootly Powers and Processes
-Write a Bourne shell script that takes a machine name as an argument and displays a message informing you whether the host is on the local network.
+1. Use the find command with the -perm option to locate five setuid files on your system. For each file, explain why the setuid mechanism is necessary for the command to function properly.
+2. Enumerate a sequence of commands that let you modify someone’s password entry, and show how you could cover your tracks. Assume you had only sudo power (all commands allowed, but not shells or su).
+3. Create two entries for the sudoers configuration file:
+ a. One entry that allows users Matt, Adam, and Drew to service the printer, to unjam the printer, and to restart printer daemons on the machine printerserver.
+ b. One entry that allows Drew, Smihgr, and Jim Lane to kill jobs and then reboot the machine.
-```bash
-$ sh bin/problem-7.sh localhost
-localhost is on the network
-$ sh bin/problem-7.sh invalid
-invalid is NOT on the network
-```
+## Lab 5
-### Problem 13
-
-Write a Bourne shell script for Problem 16 in Chapter 15, but use functions to implement the service code for various options.
-Modify the script in the `case_demo` file in Section 15.6.6 so that it allows you to try any number of options and quits only when you use the q option.
-
-```bash
-$ sh bin/problem-13.sh
-Use one of the following options:
- d: To display today's date and present time
- l: To see the listing of files in your present working directory
- w: To see who's logged in
- q: To quit this program
-Enter your option and hit <Enter>:
-d
-Sat May 25 19:52:41 MDT 2019
-Use one of the following options:
- d: To display today's date and present time
- l: To see the listing of files in your present working directory
- w: To see who's logged in
- q: To quit this program
-Enter your option and hit <Enter>:
-l
-bin Gemfile Gemfile.lock node_modules package.json pkg Rakefile README.md README.pdf test tmp vendor yarn.lock
-Use one of the following options:
- d: To display today's date and present time
- l: To see the listing of files in your present working directory
- w: To see who's logged in
- q: To quit this program
-Enter your option and hit <Enter>:
-w
-mokha tty2 2019-05-21 20:12 (tty2)
-Use one of the following options:
- d: To display today's date and present time
- l: To see the listing of files in your present working directory
- w: To see who's logged in
- q: To quit this program
-Enter your option and hit <Enter>:
-q
-```
+1. Write a shell script to help monitor the health of your /etc/passwd file.
+ a. Find entries that have UID 0.
+ b. Find entries that have that have no password (needs /etc/shadow).
+ c. Find any sets of entries that have duplicate UIDs.
+ d. Find entries that have duplicate login names.
+ e. Find entries that have no expiration date (needs /etc/shadow).