----------------------- Lab #07 for NET2003 due March 11, 2008 (Week 9) ----------------------- Remember - knowing how to find out an answer is more important than memorizing the answer. Learn to fish! RTFM! (Read The Fine Manual) Global weight: 4% of your total mark this term. Due date: before 14h00 (2pm) Tuesday March 11, 2008 (Week 9) The deliverables for this lab exercise are to be submitted online on the Course Linux Server using the "netsubmit" method described in the lab exercise description, below. No paper; no email; no FTP. Late-submission date: I will accept without penalty lab exercises that are submitted late but before 14h00 (2pm) on Wednesday, March 12. After that late-submission date, the lab exercise is worth zero marks. Lab exercises submitted by the *due date* will be marked online and your marks will be sent to you by email after the late-submission date. Lab Synopsis: Update your Ubuntu system. Display some system information. Install and configure five xinetd services. Decode a mystery file. NOTE: For full marks, keep your lines shorter than 80 columns in this course. Short lines allow for easy printing and side-by-side comparison of files on a screen. Where to work: your Ubuntu caddy (you need root permissions) Easy access to Course Notes: See previous labs. Part I - Ubuntu maintenance ------ 1. Make sure you have run the Update Manager and installed all current updates to your Ubuntu 7.10 (Gutsy) system. Earlier labs tell you how to make sure you have *all* the updates. Part II - lab07script.sh - a shell script ------------------------ 2. Follow the commented script format given in earlier labs. Precede each script output with the Question number, as you have always done. Scripts without your added comments will not be marked. 3. Display the list of devices connected to your PCI bus. 4. Display the list of devices connected to your USB bus. 5. Display the list of modules loaded into your kernel. 6. Display the line that shows into which file mail warnings (only warnings) are logged by the system logger. (Use grep to get the correct configuration line from the system logger configuration file.) 7. Display the last five lines of the kernel messages ring buffer. 8. Display the udev rule that assigns the name "eth0" to a particular MAC address network card. (Use grep to extract the line from the udev configuration file.) 9. Display the ARP table for your machine. (If your machine hasn't done any new network access recently, the table may be empty.) 10. Display the network configuration lines for the "lo" interface. (Use grep to display the lines from the main Debian network config file.) 11. If the directory /etc/xinetd.d does not exist, install the xinetd super-server using the Debian command line installer. (You need a working shell IF statement to do this correctly.) At this point, run your script as root (e.g. via sudo) and make sure the xinetd program is fetched and installed correctly. Re-run the script again and make sure that the IF statement skips installing the program a second time. 12. Display all the lines containing the string "xinetd" in the system log file into which xinetd logged its start-up messages. (About 17 lines are logged on startup.) 13. Display just the log file line that contains the string "available services". Zero services should be listed. Manually (not via script) use an editor to enable these five xinetd services: chargen daytime discard echo time You will need to run the "inetd" System V start-up script to tell xinetd to "reload" these changed configuration files. You can try connecting to the "echo" service and typing lines that will echo back to you: $ nc -v localhost echo type something here and push RETURN type something here and push RETURN ^C 14. Display just the system log file line that contains the string "Reconfigured:" logged by xinetd. (You should see that xinetd now has 5 available services.) 15. Look for the string "daytime" in the Unix config file that contains a list of major service port numbers. (This text file is a subset - only about 557 lines - of the huge master IANA port list.) 16. Use "netcat" to display the time via the new xinetd service "daytime": nc -v localhost daytime 17. Use "netcat" to display just the first 20 lines of output from connectiong to the xinetd service "chargen". 18. Use "netcat" to echo back the date by piping the date into the xinetd "echo" service. 19. Write a set of commands that will fetch from the web and decode and display the contents of the Course Notes file: data.bin Hint1: You need a command that tells you the type of a file, i.e. what kind of data is in a file. Hint2: Some files will be in pieces that require you to concatenate them all back into one piece again before you can process them. You will eventually need to find out the name of a command that displays an image. (Hint3: Find and copy an image to your Ubuntu Desktop and find out what command Ubuntu selects to view it; or, install a package that you know contains an image viewer.) Scripts without your added comments will not be marked. NOTE: For full marks, keep your lines shorter than 80 columns in this course! Submission ---------- Submission Standards: See Lab #1 for details. A. Make sure all submitted files contain an Exterior Assignment Submission label. For full marks, lines must be shorter than 80 columns. Scripts without your added comments will not be marked. B. Submit your files for marking as Lab 07 using the following *single* netsubmit command line exactly as given here: $ netsubmit 07 lab07script.sh Always submit *all* files at the same time for every submission. Files submitted under the wrong names are worth zero marks. Scripts without your added comments will not be marked. P.S. Did you spell all the assignment label fields and file names correctly?