UNIX System Administrator's Interactive Workbook with CD-ROM
Authors: Joe Kaplenk
Venue:  (1998)

From the Book: Introduction The only way to really learn administration is to get your feet wet and your hands burnt. -Joe It is difficult to learn UNIX or any computer operating system without being an administrator. I have not yet found a book that can satisfactorily teach UNIX in an academic or commercial training environment. That is the reason for this book. Being a UNIX administrator is something that is learned by hands-on experience and by fixing problems. Some of the assignments and programs in this book will not work properly. Most of this is intentional. Some errors are accidental. It is up to the student to find any problems and fix them. The only way to really learn is get your feet wet and your hands burnt. However, if you really think something is an error, please let me know. This text emphasizes generic UNIX as much as possible. Much effort has been made at helping you to think like a UNIX administrator. So some exercises will be entirely academic and not something that you can directly apply to your work. Other exercises will be directly applicable to your work or future work. There will be some exercises that will be run in Solaris, and there will be others that run in Linux. Whenever differences between running UNIX on the various versions are known, they will be pointed out. Every attempt will be made to run on other versions of UNIX. If there are some versions that need a variant of what is in this text, please let me know and I will consider including it in the next version of this text. LINUX, a fully-functional freeware version of UNIX, gives the student the ability to administer a UNIX system in a relativelyinexpensive manner. Linux can be installed in many environments and can coexist on the same PC as DOS/Windows/NT. By merely doing a dual or multiple boot, the student can run each of the operating systems at separate times. In one of the Appendixes in this book, you will see how to set up a dual/multiple boot environment. In a commercial or industrial training environment, PCs or UNIX systems can be dedicated to training. After a class is finished, the system can be wiped out and rebuilt. These classes are usually limited to a week or less in duration. In an academic environment, the student is generally limited to doing assignments on the UNIX system. There, an attempt is being made to emulate acting as an administrator. This is because colleges do not have the resources to dedicate a PC to UNIX for a term and cannot dedicate a UNIX system to a single user. This would be necessary for a student to really have control of the learning process and control of the system. So, because many-dare I say most-students have their own PCs, it should not be difficult to have the students run all of their assignments off their own PCs. They can have total control of the box and of what they do. Some colleges could and do require this as a prerequisite for some classes. Besides running Linux off the hard disk. There are ways to run it off a CD-ROM. Yggdrasil LINUX, 1995 and earlier version, can be run entirely off the CD-ROM and files can be saved or executed off of diskette and from RAM. This allows you to get around some of the restrictions present in an academic environment. Appendix C discusses how you can do this. Assignments have been designed or modified with this in mind. Further discussion of these issues are in the pages that follow for the student and for the instructor. Much emphasis is placed on using the man pages and other online help. The man pages are a very important tool for students and administrators. This book tries to include information you can't find online or in the required textbooks. It also tries to avoid duplicating information that would be in your texts. Good luck, and I hope you have an excellent learning experience. -Joe Notes to the Student The main focus of education is the student. However, there are many kinds of students and perhaps just as many ways of learning. -Joe Each chapter is this interactive workbook is divided into a number of sections. Each chapter section is designed to stand alone as much as possible. There are answers and hints that are available for the looking. Much emphasis has been placed on using standard UNIX tools such as man and help. I have tried to avoid rewriting the man pages, but assume you have access to them. There is some duplication from one section to another in order to emphasize the concepts learned up to that point. This is an attempt to repeat something from a different angle that might be harder to learn or may have given a number of people problems. If you are learning UNIX on your own, it is essential that you have a system that you can totally control. In the traditional UNIX corporate or education environment, it is difficult to find a box that it is totally free. A version of UNIX, called Linux, allows you to do such a thing. It runs on your PC and does not affect the current software on your disk. You will see in one of the chapters in the Appendix how you can use Linux to share your PC and disks with other operating systems. You can even run Linux totally off a CD-ROM if necessary. If you are in an academic environment with an instructor, you usually cannot have system administrative access to a UNIX system. There are too many concerns about security in such an environment. So usually you have access to a UNIX box as a regular user only. Fortunately, UNIX is a very open environment. Things are not hidden unless it is absolutely essential. So you can look at most of the system files and even copy them and edit them as a regular user. You just can't modify the critical system files in their original location, or copy your modified files back. Therefore, there is also an emphasis in this text to you looking at files, modifying them, and then seeing if the changes would give the desired effect if they were implemented. If you are in a commercial training environment, this is perhaps the best possibility for learning administration. You generally have a system that is totally under your control. At worst, you will be sharing the box with one or two others. When you start the class, the system will usually have been totally rebuilt from scratch. This is like have a blank canvas ready to be painted on. So now you can change the system, install software, remove software, make mistakes, and so forth, and all without having to worry about the long-term effects. Still, learning administration is very much as self-directed activity. It requires persistence, courage, and sometimes a bit of abandon to try new ideas and see the effects. This book is broken down into various topics that try to highlight certain aspects of administration. There is no way that all the topics needed can be covered in detail. So emphasis is placed on developing a way of thinking that can be used as a basis to develop your skills. As a result, each chapter is divided into the following sections: Chapter Objectives. Introduction to the chapter, with general discussion. Labs related to the chapter topic. This is broken down into sections, as explained next. Test Your Thinking, which are projects that are designed to have you utilize all of the skills you should have learned in the chapter. Answers to these projects are available on this book's Companion Web Site, located at: http://www.phptr.com/phptrinteractive. Each Lab is then divided into five parts, as follows: Lab Objectives Lab Introduction (with examples) Exercises Exercise Answers (with discussion) Self-Review Questions You are encouraged to submit questions, answers, and any ideas that you may have to the contacts listed at the Companion Web Site. Notes to the Instructor The challenge for the instructor is to teach in the quickest and most effective way. Different teachers have different approaches, but each must work within constraints that are often outside of their control. -Joe This book has been written for the teacher that is often faced with constraints that are placed by budget, security, time, or politics. Teaching system administration is not one of those traditional topics that come immediately to mind when we think of an academic environment. Yet there are many colleges, community colleges, technical institutes, corporate, and commercial training environments where system administration is a very important part of the curriculum. There are a number of different training environments in which you may be involved. But they fall into two basic categories, with variations in each: An academic credit course - This usually runs for a full term, is assigned credit, and the student is given a grade. A commercial, corporate, or non-credit college training program - This is short-term, usually several days to a week, and does not involve college credit or grades and the student's attention is wholly focused on the class. Each one of these approaches has their own particular concerns. An Academic Credit Environment This is a college, university, or community college where the class is set up so that college credit is granted to students taking the class. These classes typically run for a full term or more. Their environment usually has PCs set up to access a network. Only the fortunate ones will actually have dedicated UNIX boxes. The PCs are typically Microsoft Windows-based PCs. Many times they don't have a hard drive at all, but boot entirely off the network. However, as Windows software has become more demanding, the PCs often do have disk drives. The concerns in such an environment focus around two issues: Computer Integrity and Network Integrity. Computer Integrity In such an environment, there are many concerns about security. Students often download software with viruses - sometimes accidentally, sometimes otherwise. Such PCs often get other software accidentally or intentionally loaded onto them. Therefore anything, such as a live full-blown UNIX operating system on a PC that the students can fully administer, gives nightmares to the administrators of the network and PCs. Even doing a dual boot system still leaves the PC open to abuse. Some of the solutions include: Running Linux off a CD-ROM, as is possible with Yggrasil Linux. Having two hard drives on a system and making one write-protected via hardware configuration or jumpers and the other writable and easy to rebuild via the network and a boot disk. Having a separate computer lab for UNIX. This is often difficult to achieve and may not make the most use of the available systems. In many cases, the PCs are used for Windows applications and classroom space is sometimes at a premium. However, if the school is upgrading their 486, or even 386, PCs to new Pentiums, they can find new life as Linux boxes because Linux can run very happily with a single user on a 386 box. A 486 in this case would be a luxury. There are also a number of vendors, such as Sun and SCO, that make UNIX versions that happily run on a 486 PC with 16 MB of memory. Network Integrity There is a concern that if a student can have root access on such a system, they can perhaps compromise the network. This is because the root user in UNIX has access to many network tools that are not present on the Windows PC. A student may accidentally or intentionally do something that can bring down the network. There are a number of solutions to the network security problem. The classroom or user area where UNIX is being run can be easily isolated from the rest of the network. A router blocks TCP/IP traffic - except traffic that meets certain criteria. It can block indiscriminate packets from getting through and damaging the network integrity. An even better way of isolating the network would be to use a firewall, which would protect the campus network's integrity even further. A firewall does add additional processing over what a router would do, so performance needs should be looked at also. Fortunately, UNIX and particularly Linux, provide router and firewall capabilities either with the operating system or just a click away on the Internet. Another option would be to totally isolate the network used to teach system administration from the rest of the campus network. Thus, putting together a system that can be administered in an academic environment may require many special steps. However, the concerns outlined here may not be an important enough issue in some academic situations, so your mileage may vary. A Short-term Non-Credit Training Environment Putting together a UNIX training environment for a commercial or short-term non-credit academic program is a lot simpler. These are classes that usually run for several days to a week. The systems are dedicated to the current training process. Students either have a system that is all theirs or they share it with one or two other students. The boxes are usually reloaded with software whenever a new class is started. Thus, system integrity is not a major concern. Also, network integrity is not as much of an issue, because each classroom can be totally isolated from the others if needed. Because the focus is on UNIX, any UNIX servers can be put totally on that network or can have a separate access point or network interface card to other more central servers that may be needed. This way everyone else can be isolated from that network. The students need not see any other networks. If the classroom is needed for a different type of class afterwards, cables can be easily moved in a wiring closet to put the classroom on a new network. This method of teaching UNIX is a lot simpler to manage because of its dedicated function of doing one thing at a time. Further Discussion for the Instructor You will note in the student's discussion area that each chapter is broken down into sections. In addition, all questions and projects have the answers readily available. This text is designed to supplement whatever other training materials you may be using. Therefore, you should choose those materials with this in mind. Visit the Web companion to this book, at http://www.phptr.com/phptrinteractive, for further areas of discussion that might help make your teaching easier. Some of the exercises can be done by a regular user, while others require root access. Whenever possible, exercises are designed to be done by a regular user. This is book is not an exhaustive treatment of UNIX, but is designed to get a student's mental juices flowing. Any comments, ideas, or suggestions would be greatly appreciated. ACKNOWLEDGMENTS Many thanks go to Ralph Moore, the development editor, who has been very helpful in reviewing the text for technical, grammatical, spelling, and various other issues. He has been very instrumental in helping develop the format you see in this book. I'd like to thank Jeff Gitlin, the technical reviewer, for keeping me honest. I'd also like to thank my wife, Ramona, for her patience and her assistance in reviewing much of the text for grammatical errors. Many thanks go to the College of Dupage in Glen Ellyn, IL, for their assistance in allowing me to develop the previous versions of the workbook. They have allowed me the flexibility to explore new methods of teaching UNIX administration. This is a topic that is hard to teach in an academic environment. Finally, thanks go to Mark Taub, the managing editor at Prentice-Hall, for giving me the opportunity to write this book and guiding me through the many steps necessary to get this book to print. ABOUT THE WEB COMPANION This book has a companion Web site, located at: http://www.phptr.com/phptrinteractive The Web companion is designed to provide an interactive online environment that will enhance your learning experience. You'll find answers to the Test Your Thinking projects from the book, additional Self-Review Questions to challenge your understanding of chapter discussions, a virtual study lounge in which to mingle with other Interactive Workbook students, and an Author's Corner, where I will provide you with discussion that I think will be of interest to you. Visit the Web site periodically to share and discuss your answers. The ACM Portal is published by the Association for Computing Machinery. Copyright © 2010 ACM, Inc. Terms of Usage Privacy Policy Code of Ethics Contact Us Useful downloads: Adobe Acrobat QuickTime Windows Media Player Real Player