BD350             Linux Assignment 1                                      Due date:  Tuesday, Feb 18, 2002

This assignment is to be done on your Linux server.  Your IP was issued to you in class.  I will be grading all your assignments by logging in with my account and invoking my “su” status.

                                   

1.      Login to your server as “root” and CHANGE YOUR PASSWORD!

2.      Create an account called “bd350” that does not have root privileges and give it a good password.  Look in the man pages for useradd, passwd (and perhaps userdel).

3.      Using this account, create a subdirectory called “assignmentOne”.  Perform numbers 4 and 5 in that account.  Make sure that your scripts are well documented and clean up after themselves, i.e. delete any temporary files.

4.      FTP anonymously to my server (10.10.102.23) and download the file ebay.dat.  Write a shell script called highbid to search this file to find the highest bid for a user parameter AuctionID.  The user passes this AuctionID to the script – the script does not prompt the user for it.

5.      Write a shell script called netdata that executes ping and traceroute on a set of web sites (http://www.speedofheat.com/, www.colostate.edu)

a)     Run the script and record the information for each of the performance tests (below) in a data file called net.dat.  You will probably need to understand how to use “cut” and “head” or “tail” (read the man pages).

i)        Record the average RTT, by destination and by date and time

ii)      Record the number of hops, by destination and by date and time

Remember, the information above should be recorded in the net.dat file.

6.      Using your root account, configure tcp_wrappers by editing your /etc/hosts.allow and /etc/hosts.deny.  Please take care to edit your hosts.allow file first (correctly) or you may be locked out of your server.  It might take several days for us to fix this for you.

a)     Sample hosts.allow:

# hosts.allow  This file describes the names of the hosts which are

#                      allowed to use the local INET services, as decided

#                      by the '/usr/sbin/tcpd' server.

ALL:.colostate.edu

ALL:10.10.102.

b)     Sample hosts.deny:

# hosts.deny  This file describes the names of the hosts which are

#                      *not* allowed to use the local INET services, as decided

#                      by the '/usr/sbin/tcpd' server.

ALL:ALL

7.      Using your root account, edit the /etc/inetd.conf file to lock down the box (as we discussed in class).  When editing this file with “pico”, please take care to turn OFF word wrapping so as not to kill your internet services (“pico –w filename”).