Midterm Exam
Advanced Linux System Administration
NCNU CSIE

Date: May 18th, 2010
Time: 18:10-20:30
You may access your Linux host to check on-line manuals, but you are not allowed to chat with others.
Email your answer in plaintext to solomon@2010.ipv6.club.tw.

  1. (20%) Write a shell script to print out a 9x9 multiplication table.
    1. Restriction: You cannot use the "for" command.
    2. Hint: You may use the "while" command. For expression calculation, use "expr" in Bourne Shell or "$(( ))" in Bourne Again Shell.
  2. (20%) Write a shell script which will rename all the files with suffix ".CPP" to ".cpp" under current directory.
  3. (20%) When you try to use PuTTY to connect to LUG.ipv6.club.tw, it will ask you to verify that its fingerprint of the server's public key is 03:26:c3:e1:f2:41:47:bc:74:a6:3f:c1:60:10:66:4c. What statement on the server should you run to show the fingerprint of the server's RSA2 public key?

    Fingerprint

  4. (5%) What does DNS stand for?
    (10%) Describe the steps and the commands which you use to find out the IP addresses of the name servers of National I-lan University (niu.edu.tw).
  5. (5%) What does NFS stand for?
    (5%) Describe a scenario that this service is important to users who have accounts on multiple hosts.
  6. (5%) Consider the two password files passwd2 and passwd3. What's their difference when they are compared by the "diff" command?
    (10%) Write down a statement to merge these two passwd files to a single one. Note that you should not have duplicate entries in the merged file.
    Hint: You may use the command "cat", "uniq", "sort", or even the "merge" command. The merged file should have 14 entries.