Lab #8 - Printing, Network Utilities, and Log Rotation

Lab Steps:
I.

Stanislav

Adding a Fake Printer Using the CUPS Web Interface A. Open Firefox and type on the address bar http://localhost:631 and press Enter. B. Click the Administration tab. C. Click Add a Printer. D. Enter the name dummylab and include relevant description and location information. E. Click Continue. If you are presented with a security warning, click Continue in the dialog box. F. Select Internet Printing Protocol (ipp) from the drop-down list and click Continue. G. Enter ipp://dummy/printers/nosuchprinter in the dialog box and click Continue. H. Select Okidata from the manufacturer list and click Continue. I. Select Okidata Microline 600CL Foomatic/ml600 from the model list and click Add Printer. J. Provide your root user name and password and then click OK. K. When the page refreshes, click the Printers tab. L. Locate the printer you just created and stop the printing by clicking the Stop Printer button. Managing the Printer Queue A. Print the .viminfo file using lpr -P dummylab .viminfo from your home directory. B. Use the lpq -P dummylab to confirm that the print job is in the queue. C. Click the Jobs tab in the CUPS Administration web site to verify the print job is there. D. Use Cancel and the job number to cancel the job. E. Use the Terminal to check the printer queue again and verify the job is gone. F. Click the Printers tab inside the CUPS Administration site again and click the Delete Printer button for dummylab. G. Confirm the deletion by clicking Delete Printer on the next page. H. Close Firefox.

II.

III. Network Configuration Information with the Network Configuration Tool A. Select System > Administration > Network and enter your root password if prompted. B. Double-click on the Ethernet device on the Devices tab. C. Review the various information that can be seen through this interface. D. Click OK when you are done checking the configuration tabs. E. Click the DNS tab and see what your DNS information is set to for this network. F. Close the Network Configuration dialog. Donʼt save changes if prompted. IV. Network Configuration Information with ifconfig, hostname, route A. Open Terminal if it already isnʼt. B. Execute /sbin/ifconfig -a to view all network interfaces currently available and their settings. C. Type hostname to see the currently configured system hostname. D. Type /sbin/route -v to view the network routing information of the system.

V. Using ping and traceroute to Test Your Network Connectivity A. Type ping -c 5 www.google.com to send five packets to test your Internet connection. B. Type traceroute www.google.com to identify the network hops between you and the Google server you end up connecting to. The number of hops will be shown on the left side of the output. VI. Using nslookup and dig to Find Domain Information A. Type nslookup www.google.com to see the resolution of the hostname. B. Type dig -t mx google.com to find out what Googleʼs incoming mailservers are. C. Type dig -t ns google.com to find out what Googleʼs DNS nameservers are.

VII. Edit the logrotate Configuration File A. Open the /etc/logrotate.conf file in vim as root. B. Change the file to rotate on a daily basis rather than weekly. C. Keep 6 rotations worth of logs rather than 4. D. Have logrotate compress rotated logs. E. Save the changes to your /etc/logrotate.conf file and close vim. F. To force a log rotation to occur now, type /usr/sbin/logrotate -f /etc/logrotate.conf G. Display a listing of files in /var/log and look for log files that end in .gz (gzip compressed). VIII. Uncompress a Rotated Log File and View It A. Change your working directory to /var/log. B. Type ls messages* to list all files that begin with “messages”. C. Choose one “messages” log file with a timestamp attached to a gzip compressed file, -- e.g., messages.2.gz and uncompress it using gunzip as you have in earlier labs. D. View the uncompressed file using vim, tail, less, more, or any other command youʼve learned. E. Type grep “ntpd” <filename> -- e.g., grep “ntpd” messages.2 to view all log file entries that contain the text “ntpd”. These results are related to your Network Time Protocol synchronization service running that we enabled during installation.

Master your semester with Scribd & The New York Times

Special offer for students: Only $4.99/month.

Master your semester with Scribd & The New York Times

Cancel anytime.