LPI Linux Certification in a Nutshell, 2nd Edition By Jeff Dean, Bruno Gomes Pessanha, Nicolai Langfeldt, Steven Pritchard, James Stanger Publisher: O'Reilly Pub Date: July 2006 Print ISBN-10: 0-596-00528-8 Print ISBN-13: 978-0-59-600528-3 Pages: 978 Table of Contents | Index LPI Linux Certification in a Nutshell, Second Edition is an invaluable resource for determining what you need to practice to pass the Linux Professional Institute exams This book will help you determine when you're ready to take the exams, which are technically challenging and designed to reflect the skills that administrators need in real working environments As more corporations adopt Linux as the networking backbone for their IT systems, the demand for certified technicians will become even greater Passing the LPI exams will broaden your career options because the LPIC is the most widely known and respected Linux certification program in the world Linux Journal recognized the LPI as the best Training and Certification Program The exams were developed by the Linux Professional Institute, an international, volunteer-driven organization with affiliates in a dozen countries The core LPI exams cover two levels Level 1 tests a basic knowledge of Linux installation, configuration, and command-line skills Level 2 goes into much more depth regarding system troubleshooting and network services such as email and the Web The second edition of LPI Linux Certification in a Nutshell is a thoroughly researched reference to these exams The book is divided into four parts, one for each of the LPI exams Each part features not only a summary of the core skills you need, but sample exercises and test questions, along with helpful hints to let you focus your energies Major topics include: GNU and Unix commands Linux installation and package management Devices, filesystems, and kernel configuration Text editing, processing, and printing The X Window System Networking fundamentals and troubleshooting Security, including intrusion detection, SSH, Kerberos, and more DNS, DHCP, file sharing, and other networking infrastructure Email, FTP, and Web services Praise for the first edition: "Although O'Reilly's Nutshell series are intended as 'Desktop Reference' manuals, I have to recommend this one as a good all-round read; not only as a primer for LPI certification, but as an excellent introductory text on GNU/Linux In all, this is a valuable addition to O'Reilly's already packed stable of Linux titles and I look forward to more from the author." First Monday LPI Linux Certification in a Nutshell, 2nd Edition By Jeff Dean, Bruno Gomes Pessanha, Nicolai Langfeldt, Steven Pritchard, James Stanger Publisher: O'Reilly Pub Date: July 2006 Print ISBN-10: 0-596-00528-8 Print ISBN-13: 978-0-59-600528-3 Pages: 978 Table of Contents | Index Copyright Preface Part I: General Linux Exam 101 Chapter 1 LPI Exams Section 1.1 Exam 101 Overview Chapter 2 Exam 101 Study Guide Section 2.1 Exam Preparation Chapter 2 Hardware and Architecture (Topic 1.101) Section 3.1 Objective 1: Configure Fundamental BIOS Settings Section 3.2 Objective 3: Configure Modems and Sound Cards Section 3.3 Objective 4: Set Up Non-IDE Devices Section 3.4 Objective 5: Set Up Different PC Expansion Cards Section 3.5 Objective 6: Configure Communications Devices Section 3.6 Objective 7: Configure USB Devices Chapter 4 Linux Installation and Package Management (Topic 1.102) Section 4.1 Objective 1: Design a Hard Disk Layout Section 4.2 Objective 2: Install a Boot Manager Section 4.3 Objective 3: Make and Install Programs from Source Section 4.4 Objective 4: Manage Shared Libraries Section 4.5 Objective 5: Use Debian Package Management Section 4.6 Objective 6: Use Red Hat Package Manager (RPM) Chapter 5 GNU and Unix Commands (Topic 1.103) Section 5.1 Objective 1: Work on the Command Line Section 5.2 Objective 2: Process Text Streams Using Filters Section 5.4 Objective 3: Perform Basic File Management Section 5.5 Objective 4: Use Streams, Pipes, and Redirects Section 5.6 Objective 5: Create, Monitor, and Kill Processes Section 5.7 Objective 6: Modify Process Execution Priorities Section 5.8 Objective 7: Search Text Files Using Regular Expressions Section 5.9 Objective 8: Perform Basic File Editing Operations Using vi Chapter 6 Devices, Linux Filesystems, and the Filesystem Hierarchy Standard (Topic 1.104) Section 6.1 Objective 1: Create Partitions and Filesystems Section 6.2 Objective 2: Maintain the Integrity of Filesystems Section 6.3 Objective 3: Control Filesystem Mounting and Unmounting Section 6.4 Objective 4: Set and View Disk Quotas Section 6.5 Objective 5: Use File Permissions to Control Access to Files Section 6.6 Setting Up a Workgroup Directory Section 6.7 Objective 6: Manage File Ownership Section 6.8 Objective 7: Create and Change Hard and Symbolic Links Section 6.9 Objective 8: Find System Files and Place Files in the Correct Location Chapter 7 The X Window System (Topic 1.1.10) Section 7.1 An Overview of X Section 7.2 Objective 1: Install and Configure X11 Section 7.3 Objective 2: Set Up a Display Manager Section 7.4 Objective 4: Install and Customize a Window Manager Environment Chapter 8 Exam 101 Review Questions and Exercises Section 8.1 Hardware and Architecture (Topic 1.101) Section 8.2 Linux Installation and Package Management (Topic 1.102) Section 8.3 GNU and Unix Commands (Topic 1.103) Section 8.4 Devices, Linux Filesystems, and the Filesystem Hierarchy Standard (Topic 1.104) Section 8.5 The X Window System (Topic 1.110) Chapter 9 Exam 101 Practice Test Section 9.1 Questions Section 9.2 Answers Chapter 10 Exam 101 Highlighter's Index Section 10.1 Hardware and Architecture Section 10.2 Linux Installation and Package Management Section 10.3 GNU and Unix Commands Section 10.4 Devices, Linux Filesystems, and the Filesystem Hierarchy Standard Section 10.5 The X Window System Part II: General Linux Exam 102 Chapter 11 Exam 102 Overview Chapter 12 Exam 102 Study Guide Section 12.1 Exam Preparation Chapter 13 Kernel (Topic 1.105) Section 13.1 Objective 1: Manage/Query Kernel and Kernel Modules at Runtime Section 13.2 Objective 2: Reconfigure, Build, and Install a Custom Kernel and Kernel Modules Chapter 14 Boot, Initialization, Shutdown, and Runlevels (Topic 1.106) Section 14.1 Objective 1: Boot the System Section 14.2 Objective 2: Change Runlevels and Shut Down or Reboot System Chapter 15 Printing (Topic 1.107) Section 15.1 An Overview of Printing Section 15.2 Objective 2: Manage Printers and Print Queues Section 15.3 Objective 3: Print Files Section 15.4 Objective 4: Install and Configure Local and Remote Printers Chapter 16 Documentation (Topic 1.108) Section 16.1 Objective 1: Use and Manage Local System Documentation Section 16.2 Objective 2: Find Linux Documentation on the Internet Section 16.3 Objective 5: Notify Users on System-related Issues Chapter 17 Shells, Scripting, Programming, and Compiling (Topic 1.109) Section 17.1 Objective 1: Customize and Use the Shell Environment Section 17.2 Objective 2: Customize or Write Simple Scripts Chapter 18 Administrative Tasks (Topic 1.111) Section 18.1 Objective 1: Manage Users and Group Accounts and Related System Files Section 18.2 Objective 2: Tune the User Environment and System Environment Variables Section 18.3 Objective 3: Configure and Use System Log Files to Meet Administrative and Security Needs Section 18.4 Objective 4: Automate System Administration Tasks by Scheduling Jobs to Run in the Future Section 18.5 Objective 5: Maintain an Effective Data Backup Strategy Section 18.6 Objective 6: Maintain System Time Chapter 19 Networking Fundamentals (Topic 1.112) Section 19.1 Objective 1: Fundamentals of TCP/IP Section 19.2 Objective 3: TCP/IP Configuration and Troubleshooting Section 19.3 Objective 4: Configure Linux as a PPP Client Chapter 20 Networking Services (Topic 1.113) Section 20.1 Objective 1: Configure and Manage inetd, xinetd, and Related Services Section 20.2 Objective 2: Operate and Perform Basic Configuration of Mail Transfer Agent (MTA) Section 20.3 Objective 3: Operate and Perform Basic Configuration of Apache Section 20.4 Objective 4: Properly Manage the NFS and Samba Daemons Section 20.5 Objective 5: Set Up and Configure Basic DNS Services Section 20.6 Objective 7: Set Up Secure Shell (OpenSSH) Chapter 21 Security (Topic 1.114) Section 21.1 Objective 1: Perform Security Administration Tasks Section 21.2 Objective 2: Set Up Host Security Section 21.3 Objective 3: Set Up User-level Security Chapter 22 Exam 102 Review Questions and Exercises Section 22.1 Kernel (Topic 1.105) Section 22.2 Boot, Initialization, Shutdown, and Runlevels (Topic 1.106) Section 22.3 Printing (Topic 1.107) Section 22.4 Documentation (Topic 1.108) Section 22.5 Shells, Scripting, Programming, and Compiling (Topic 1.109) Section 22.6 Administrative Tasks (Topic 1.111) Section 22.7 Networking Fundamentals (Topic 1.112) Section 22.8 Networking Services (Topic 1.113) Section 22.9 Security (Topic 1.114) Chapter 23 Exam 102 Practice Test Section 23.1 Questions Section 23.2 Answers Chapter 24 Exam 102 Highlighter's Index Section 24.1 Kernel (Topic 1.105) Section 24.2 Boot, Initialization, Shutdown, and Runlevels (Topic 1.106) Section 24.3 Printing (Topic 1.107) Section 24.4 Documentation (Topic 1.108) Section 24.5 Shells, Scripting, Programming, and Compiling Section 24.6 Administrative Tasks (Topic 1.111) Section 24.7 Networking Fundamentals (Topic 1.112) Section 24.8 Networking Services (Topic 1.113) Section 24.9 Security (Topic 1.114) Part III: General Linux Exam 201 Chapter 25 Linux Kernel Section 25.1 Objective 1: Kernel Components Section 25.2 Objective 2: Compiling a Kernel Section 25.3 Objective 3: Patching a Kernel Section 25.4 Objective 4: Customizing a Kernel Chapter 26 System Startup Section 26.1 Objective 1: Customizing System Startup and Boot Processes Section 26.2 Objective 2: System Recovery Chapter 27 Filesystem Section 27.1 Objective 1: Operating the Linux Filesystem Section 27.2 Objective 2: Maintaining a Linux Filesystem Section 27.3 Objective 3: Creating and Configuring Filesystem Options Chapter 28 Hardware (Topic 2.204) Section 28.1 Objective 1: Configuring RAID Section 28.2 Objective 2: Adding New Hardware Section 28.3 Objective 3: Software and Kernel Configuration Section 28.4 Objective 4: Configuring PCMCIA Devices Chapter 29 File and Service Sharing (Topic 2.209) Section 29.1 Objective 1: Configuring a Samba Server Section 29.2 Objective 2: Configuring an NFS Server Chapter 30 System Maintenance (Topic 2.211) Section 30.1 Objective 1: System Logging Section 30.2 Objective 2: Packaging Software Section 30.3 Objective 3: Backup Operations Chapter 31 System Customization and Automation (Topic 2.213) Section 31.1 Objective 1: Automating Tasks Using Scripts Chapter 32 Troubleshooting (Topic 2.214) Section 32.1 Objective 1: Creating Recovery Disks Section 32.2 Objective 2: Identifying Boot Stages Section 32.3 Objective 3: Troubleshooting Boot Loaders Section 32.4 Objective 4: General Troubleshooting Section 32.5 Objective 5: Troubleshooting System Resources Section 32.6 Objective 6: Troubleshooting Environment Configurations Chapter 33 LPI Exam 201 Review Questions and Exercises Section 33.1 Linux Kernel (Topic 2.201) Section 33.2 System Startup (Topic 2.202) Section 33.3 Filesystem (Topic 2.203) Section 33.4 Hardware (Topic 2.204) Section 33.5 File and Service Sharing (Topic 2.209) Section 33.6 System Maintenance (Topic 2.211) Section 33.7 System Customization and Automation (Topic 2.213) Section 33.8 Troubleshooting (Topic 2.214) Chapter 34 Exam 201 Practice Test Section 34.1 Questions Section 34.2 Answers Part IV: General Linux Exam 202 Chapter 35 Networking Configuration (Topic 2.205) Section 35.1 Objective 1: Basic Networking Configuration Section 35.2 Objective 2: Advanced Network Configuration and Troubleshooting Chapter 36 Mail and News (Topic 2.206) Section 36.1 Objective 2: Using Sendmail Section 36.2 Objective 3: Managing Mail Traffic Section 36.3 Objective 1: Configuring Mailing Lists Section 36.4 Objective 4: Serving News Section 36.5 Conclusion Chapter 37 DNS (Topic 2.207) Section 37.1 Objective 1: Basic DNS Server Configuration Section 37.2 Objective 2: Create and Maintain DNS Zones Section 37.3 Objective 3: Securing a DNS Server Chapter 38 Web Services (Apache and Squid, Topic 2.208) Section 38.1 Installing Apache Section 38.2 Configuring Apache Section 38.3 Squid: History and Overview Section 38.4 Squid Authentication Section 38.5 Squid as Web Accelerator Chapter 39 Network Client Management (Topic 2.210) Section 39.1 Objective 1: DHCP Configuration Section 39.2 Objective 2: NIS Configuration Section 39.3 Objective 3: LDAP Configuration Section 39.4 Objective 4: PAM Authentication Chapter 40 System Security (Topic 2.212) Section 40.1 Objective 2: Configuring a Router Section 40.2 Objective 3: Securing FTP Servers Section 40.3 Objective 4: Secure Shell (SSH) Section 40.4 Objective 5: TCP Wrappers Section 40.5 Objective 6: Security Tasks Chapter 41 Network Troubleshooting (Topic 214) Section 41.1 Network Troubleshooting Essentials Section 41.2 Common Troubleshooting Commands Section 41.3 Hardware Problems Section 41.4 Network Device Configuration Files Section 41.5 DNS Errors Section 41.6 Determining the Cause of Inaccessible Services Section 41.7 Conclusion Chapter 42 Exam 202 Review Questions and Exercises Section 42.1 Networking Configuration (Topic 2.205) Section 42.2 Mail and News (Topic 2.206) Section 42.3 DNS (Topic 2.207) Section 42.4 Web Services (Topic 2.208) Section 42.5 Answers Section 42.6 Network Client Management (Topic 2.210) Section 42.7 System Security (Topic 2.212) Section 42.8 Network Troubleshooting (Topic 2.214) Chapter 43 Exam 202 Practice Test Section 43.1 Questions Section 43.2 Answers About the Authors Colophon Index LPI Linux Certification in a Nutshell, Second Edition by Steven Pritchard, Bruno Gomes Pessanha, Nicolai Langfeldt, James Stanger, and Jeff Dean Copyright © 2006 O'Reilly Media, Inc All rights reserved Printed in the United States of America Published by O'Reilly Media, Inc., 1005 Gravenstein Highway North, Sebastopol, CA 95472 O'Reilly books may be purchased for educational, business, or sales promotional use Online editions are also available for most titles (safari.oreilly.com) For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com Editor: Tim O'Reilly Developmental Editor: Andy Oram Production Editor: Philip Dangler Copyeditor: Norma Emory Indexer: Ellen Troutman Cover Designer: Karen Montgomery Interior Designer: David Futato Illustrators: Robert Romano and Jessamyn Read telnet command 2nd temporary files, security risks TERM terminal emulators 2nd terminals (X) 2nd 3rd terminating processes terminators (SCSI bus) test command 2nd testparm program tethereal utility Texinfo text editors Emacs vi 2nd 3rd text files Linux documentation searching with regular expressions 2nd 3rd text matching operators text streams processing with filters 2nd 3rd Thomson Prometric threads threats (classifications), for disaster and recovery planning timeout directive /tmp directory 2nd 3rd /tmp partition guidelines for size of top command 2nd aliasing touch command 2nd tr command 2nd traceroute command 2nd 3rd 4th translation, print data Tripwire overview policy files tripwire commands twadmin command troubleshooting boot loaders boot stages environment configurations general networks tcpdump, using Telnet, using recovery disks, creating system resources editors environment variables and shells kernel parameters shell environment trusted network, defining TSIGs (transaction signatures) tune2fs command 2nd tune2fswas command twm window manager Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] Ubuntu Linux, network configuration tool UDP (User Datagram Protocol) 2nd system logging, security and UHCI (Universal Host Controller Interface) UID (user ID) 2nd ulimit command 2nd umask command umount command 2nd 3rd 4th uncompress program unexpand command uninstall mode, rpm uniq command Universal Host Controller Interface (UHCI) Unix BSD versus SysV printing Unix98, ps command options unprivileged ports until command until loops UPD (User Datagram Protocol) listing UDP-based connections update-modules command update-rc.d command updatedb command 2nd upgrade mode, rpm upstream clients (INN) USB devices configuring 2nd 3rd classes of USB devices controllers hotplug topology USB drivers finding assigned device file usbview command Usenet newsgroups 2nd archives contributing to user access mode user accounts 2nd environment, tuning password file and review questions and exercises setting home directory shadow passwords user ID (UID) 2nd user prompt ($) user variables in shell scripts useradd command 2nd userdel command 2nd usermod command 2nd username USERNAME environment variable users classes of, in access modes crontabs file access FTP acccess monitoring 2nd notifying of system issues quota limits security, setting up /usr filesystem 2nd 3rd 4th /doc /local dirctory /man /sbin/sendmail /share/doc /share/man /src/linux-kernel-version contents subdirectories /usr partition guidelines for size of Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] /var directory 2nd 3rd 4th /lib/dpkg /log directory /log/dmesg /log/messages 2nd 3rd named configuration rotation /log/wtmp file, rotation /named/ /spool/cron/crontabs /spool/lpd subdirectories /var partition guidelines for size of variable data variables cron environment environment variables inheritance in shell environment queried with mod_rewrite shell 2nd shell scripts verify mode, rpm versions, kernel vertical refresh frequency (monitors) Very Secure FTP Daemon (vsftpd) vfat filesystem 2nd vg* commands vgchange command vgdisplay command 2nd vgscan command vi editor 2nd commands troubleshooting VI Improved video kernel subdirectories XFree86 hardware virtual consoles virtual hosts defining default settings for requests not matching virtual interfaces, configuring with ifconfig virtual memory partition Virtual Private Network (VPN), configured with ifconfig virtual users checking reversing accounts VirtualHost container (Apache) access control SSL connections, handling virtusertable file (Sendmail) 2nd 3rd volume groups adding disks creating displaying properties listing with pvscan removing removing hard disks VPN (Virtual Private Network), tunnel end-points configured with ifconfig vsftpd (Very Secure FTP Daemon) Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] w command wc command 2nd web accelerator, Squid as web logs, fetching and processing with Perl web services Apache configuring installing Exam 202 review Squid web site for this book web sites, Linux-related well-known ports WEP (Wireless Equivalent Privacy) whatis command 2nd which command 2nd while command while loops who command whois fwhois command wildcards file-naming 2nd window managers 2nd 3rd 4th 5th default, starting security X libraries Windows systems creating boot floppy FAT filesystems 2nd Group Policy Editor remote printer, configuring 2nd winmodems WINS (Windows Internet Name Service) 2nd browsing shared resources wireless card, configuring Wireless Equivalent Privacy (WEP) word boundaries, matching with regular expressions workgroup directory, setting up workgroups, SGID 2nd write permission 2nd wvdial command wvdial.conf file (examples) wvdialconf command examples of successful execution Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] X clients X fonts X libraries X Servers selecting and configuring X terminals xdm for X Window System 2nd controlling applications with Xresources display manager, setting up installing and configuring X11 2nd make xconfig (kernel configuration) make xconfig tool overview of X review questions and exercises SSH session window manager, installing and customizing 2nd X terminals Xaccess file, configuring access to xdm xargs command Xconfigurator tool xdm 2nd configuring basic customization configuration files, listed running automatically running manually for X terminals XDMCP (xdm Control Protocol) XF86Config file 2nd automated configuration tools example for XFree86 v3.3.3 example for XFree86 v4.0 XFree86 configuration displaying version information fonts installing and configuring installing XFree86 X server starting web site xfs (X fonts server) 2nd 3rd example config file xhost command xinetd 2nd access control xinetd.conf file frequently used options modular configuration Xresources file 2nd xterm 2nd resource configuration file Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] YAST/Yast2 tools ypbind (NIS client) 2nd ypcat tool 2nd ypdomainname tool ypinit tool ypmatch tool yppasswd tool yppasswdd tool yppoll tool 2nd yppush tool 2nd ypserv tool ypwhich tool Index [SYMBOL] [A] [B] [C] [D] [E] [F] [G] [H] [I] [J] [K] [L] [M] [N] [O] [P] [Q] [R] [S] [T] [U] [V] [W] [X] [Y] [Z] Zebra, dynamic routing support zImage kernel image zombie process zone transfers zones, DNS creating and maintaining forward zones reverse DNS files tools ... Design Hard Disk Layout Install a Boot Manager Make and Install Programs from Source Manage Shared Libraries Use Debian Package Management Use Red Hat Package Manager Table 2-3 GNU and Unix commands (Topic 1.103)... devices, and configuring USB hardware Linux Installation and Package Management Objectives for this Topic include the basics of getting any LSBcompliant Linux distribution installed and installing applications Some of the basics include partitioning hard drives, installing your... Some of the basics include partitioning hard drives, installing your choice of boot managers, installing programs from source, managing shared libraries, and using package management systems such as Debian and Red Hat (RPM)