Red Hat: The Complete Reference Enterprise & Fedora Edition

Richard Petersen

McGraw-Hill/Osborne New York Chicago San Francisco

UlnLjo n Lisbon London Madrid Mexico City Milan NewDelhi San uan mmm* Se°ul Sinsapore Sydney Toront' ° Contents

Acknowledgments i xxvii Introduction xxix

Parti Getting Started 1 Introduction to Linux 3 Red Hat and Fedora Linux 5 The Fedora Project 6 Red Hat Enterprise Linux 6 Red Hat Documentation 7 Fedora Core 8 Operating Systems and Linux 10 History of Linux and Unix 10 Unix 11 Linux .." 11 Linux Overview 12 Open Source Software 13 Linux Software 14 Linux Office and Database Software 15 Internet Servers 15 Development Resources ; 16 Online Information Sources 18 Documentation 19 2 Installing Red Hat and Fedora Core Linux ;. 21 Hardware, Software, and Information Requirements .'•. 22 Hardware Requirements '. 22 Hard Drive Configuration > 23 Information Requirements I 23 Creating the Boot Disks 25 VJ Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Installing Linux 27 Starting the Installation Program 27 Partitions, RAID, and Logical Volumes 28 Boot Loaders 30 Network Configuration 30 System Configuration 31 Software Installation 31 X System Configuration (Red Hat only) 32 Finishing Installation 33 Setup 33 Login and Logout 34 Boot Disks 35 3 Interface Basics 37 User Accounts 37 Accessing Your Linux System 38 The Display Manager: GDM 38 Accessing Linux from the Command Line Interface 39 Bluecurve: The GNOME and KDE Desktops 41 GNOME 41 KDE 42 Window Managers for Linux 43 Command Line Interface 43 Help 44 4 Red Hat System Configuration 47 Red Hat Administrative Tools 47 Configuring Users 48 Printer Configuration 50 X Window System Configuration: redhat-config-xfree86 52 Updating Red Hat and Fedora Linux with RHN, Yum and APT ... 52 Installing Software Packages 54 Installing Packages with redhat-config-packages 55 Installing Packages with the rpm Command 57 Package Security Check 58 Installing Source Code Applications 59 Security Configuration 60 Security Services 60 Authentication Configuration 63 Unsupported Drivers 63 Bluetooth 64 Bluetooth Configuration 65 Personal Area Networks: PAN 65 Contents VM

5 Red Hat Network Configuration 67 Network Information: Dynamic and Static 68 Network Configuration with Red Hat Network Tools 69 redhat-config-network 69 Network Device Control 73 The Internet Configuration Wizard 73 Virtual Private Networks 75 Interface Configuration Scripts: /etc/sysconfig/network-scripts 75 Command Line PPP Access: wvdial 76 Wireless Tools 78 iwconfig 78 iwpriv 79 iwspy 80 iwlist 80 linux-wlan 80 Setting Up Your Firewall: redhat-config-securitylevel 81 Configuring a Local Area Network 82 Physical Configuration 83 IP Addressing 83 Assigning IP Addresses: static and dynamic 84 Squid Proxy Server 86 Implementing a DNS Server 86 Configuring the DNS Server with redhat-config-bind 88

Part II Environments 6 GNOME 95 GNOME Enhancements 96 GTK+ 97 The GNOME Interface 97 GNOME Components 98 Start Here Window 99 Quitting GNOME 99 GNOME Help 99 The GNOME Desktop 100 Drag and Drop 100 Application Links 100 Desktop Drive Icons 101 Desktop Menu 101 Window Manager 102 The GNOME File Manager: Nautilus 102 Nautilus Window 102 Nautilus Sidebar: Tree, History, and Notes 103 VJii Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Nautilus Views 103 Nautilus Menu 104 Navigating Directories 104 Managing Files 105 File and Directory Properties 106 Nautilus Preferences 107 Nautilus as a Web Browser 107 The GNOME Panel 108 Panel Properties 108 Displaying Panels 109 Adding Panels 109 Panel Objects 109 Special Panel Objects Ill GNOME Applets Ill Workspace Switcher 112 GNOME Tasklist 112 GNOME Configuration 112 GNOME Directories and Files 113 GNOME User Directories 114 GConf 114 7 The K Desktop Environment: KDE 115 Qt Library 117 KDE Desktop 117 KDE Menus 118 Quitting KDE 118 KDE Desktop Operations 119 Configuring Your Desktop 119 Desktop Files 120 KDE Windows 121 Virtual Desktops: The KDE Desktop Pager 122 KDE Panel: Kicker 123 The KDE Help Center 124 Applications 124 Application Standard Links 124 Application Desktop Links 125 Mounting CD-ROMs and Floppy Disks from the Desktop 125 KDE File Manager and Internet Client: Konqueror 126 Konqueror Window 126 Navigation Panel 127 Search 128 Navigating Directories 128 Copy, Move, Delete, Rename, and Link Operations 129 Web and FTP Access 130 Contents ix

KDE Configuration: KDE Control Center 130 . and Desktop User Directories 132 MIME Types and Associated Applications 132 KDE Directories and Files 132 8 The 135 The Command Line 135 Command Line Editing 136 Command and Filename Completion 137 History 137 History Events 138 History Event Editing 140 Configuring History: HISTFILE and HISTSAVE 141 Filename Expansion: *,?,[] 141 Matching Multiple Characters 142 Matching Single Characters 143 Matching a Range of Characters 143 Matching Shell Symbols 144 Generating Patterns 144 Standard Input/Output and Redirection 145 Redirecting the Standard Output: > and » 145 The Standard Input 148 Pipes: I 148 Redirecting and Piping the Standard Error: >&, 2> 149 Jobs: Background, Kills, and Interruptions 150 Running Jobs in the Background 150 Job Notification 151 Bringing Jobs to the Foreground 152 Stopping and Suspending Jobs 152 Shell Variables 153 Definition and Evaluation of Variables: =, $, set, unset 153 Shell Scripts: User-Defined Commands 155 Executing Scripts 155 Script Arguments 155 Control Structures 156 Test Operations 157 Conditional Control Structures 158 Loop Control Structures 160 Filters and Regular Expressions 161 Searching Files: grep 162 Regular Expressions 163 9 Shell Configuration 165 Aliases 165 Aliasing Commands and Options 166 Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Aliasing Commands and Arguments 166 Aliasing Commands 167 Controlling Shell Operations 167 Environment Variables and Subshells: export 169 Configuring Your Shell with Shell System Variables 169 System Variables 170 Configuring Your Login Shell: .bash_profile 174 Configuring the Shell: .bashrc 177 The BASH Shell Logout File: .bashjogout 178 Initialization and Configuration Files 178 Configuration Directories and Files 179 10 Managing Linux Files, Directories, and Archives 181 Linux Files 182 The File Structure 184 Home Directories 185 Pathnames 185 System Directories 186 Listing, Displaying, and Printing Files: Is, cat, more, less, and lpr 187 Displaying Files: cat, less, and more 188 Printing Files: lpr, lpq, and lprm 188 Managing Directories: mkdir, rmdir, Is, cd, and pwd 189 Creating and Deleting Directories 190 Displaying Directory Contents 190 Moving Through Directories 191 Referencing the Parent Directory 191 File and Directory Operations: find, cp, mv, rm, and In 192 Searching Directories: find 192 Copying Files 193 Moving Files 195 Copying and Moving Directories 196 Erasing Files and Directories: the rm Command 196 Links: the In Command 197 - The mtools Utilities: msdos 199 Copying Files to a DOS Floppy 199 mtools Commands 200 Configuring mtools: /etc/ mtools.conf 201 Copying Files to a DOS Partition 202 Archiving and Compressing Files 202 Archiving and Compressing Files with File Roller 202 Archive Files and Devices: tar 203 File Compression: gzip, bzip2, and zip 207 Contents xi

Part 111 Applications 11 Office and Database Applications 213 Accessibility to Microsoft Office 214 OpenOffice 214 KOffice 216 KOffice Applications 216 KParts 217 GNOME Office and 217 Document Viewers (PostScript, PDF, and DVI) 219 Database Management Systems 220 SQL Databases (RDMS) 220 Xbase Databases 223 Editors 223 GNOME Editor: 224 K Desktop Editors: Kate, KEdit, and KJots 225 The Emacs Editor 225 The Vi Editor: Vim and gvim 226 12 Graphics Tools and Multimedia 231 Graphics Tools 232 KDE Graphics Tools 232 GNOME Graphics Tools 232 X Window System Graphic Programs 233 Multimedia 234 Sound Applications 234 CD Burners 235 Video Applications 236 13 and News Clients 237 Mail Clients 237 MIME 238 Evolution 239 GNOME Mail Clients: Evolution, , and Others 240 The K Desktop Mail Client: KMail 241 X Mail Clients: Mozilla and Emacs 241 Command Line Mail Clients 242 Notifications of Received Mail 245 Accessing Mail on Remote POP Mail Servers 246 Usenet News 247 News Transport Agents 250 Mailing Lists 250 Newsreaders 251 XJi Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

14 Web, FTP, and Java Clients 253 Web Clients 254 URL Addresses 254 Web Browsers 256 Creating Your Own Web Site 259 Java for Linux: Blackdown 260 The Java 2 Software Development Kit: SDK 261 FTP Clients 262 Network File Transfer: FTP 262 Web Browser-Based FTP: Mozilla 263 The K Desktop File Manager: Konqueror 263 GNOME Desktop FTP: Nautilus 264 gFTP 264 NcFTP 265 NcFTP Download Features 268 Bookmarks and Macros 269 ftp 270 Automatic Login and Macros: .netrc 274 lftp 276 15 Network Tools 277 Network Information: ping, finger, traceroute, and host 277 ping 277 finger and who 278 host 279 traceroute 279 Network Talk and Messenger Clients: ICQ, IRC, AIM, and Talk ... 280 ICQ 281 Instant Messenger 281 Telnet 282 RSH, Kerberos, and SSH Remote Access Commands 283 Remote Access Permission: .rhosts and .k51ogin 284 rlogin, slogin, rep, scp, rsh, and ssh 284

Part IV Security 16 Encryption, Integrity Checks, and Signatures: GNU Privacy Guard 289 Public Key Encryption, Integrity Checks, and Digital Signatures .. 289 Public-Key Encryption 289 Digital Signatures 290 Integrity Checks 290 Combining Encryption and Signatures 290 Contents XMJ

GNU Privacy Guard 291 GnuPG Setup:gpg 293 Using GnuPG 296 Checking Software Package Digital Signatures 298 Importing Public Keys 299 Validating Public Keys 299 Checking RPM Packages 300 Intrusion Detection: Tripwire 301 17 Internet Protocol Security: IPsec 303 IPsec Protocols 303 IPsec Modes 304 IPsec Security Databases 304 IPsec Tools 304 IPsec and IP Tables 305 Configuring IPsec with redhat-config-network 305 Configuring Connections with setkey 306 Security Associations: SA 307 Security Policy: SP 307 Receiving Hosts 308 Two-way Transmissions 308 Configuring IPsec with racoon: IKE 309 Certificates 310 Connection Configuration with racoon 310 IPsec Tunnel Mode: Virtual Private Networks 310 Crypto IP Encapsulation for Virtual Private Networks 312 18 Secure Shell and Kerberos 313 The Secure Shell: OpenSSH 313 SSH Encryption and Authentication 314 SSH Tools 315 SSH Setup 316 SSH Clients 318 Port Forwarding (Tunneling) 321 SSH Configuration 322 Kerberos 323 Kerberos Servers 323 Authentication Process 324 Kerberized Services 325 Configuring Kerberos Servers 325 19 Network Firewalls: Netfilter 327 Firewalls: iptables and NAT 328 Packet Filtering 329 Chains 329 Targets 330 XJV Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Firewall Chains 330 Adding and Changing Rules 331 iptables Options 332 Accepting and Denying Packets: DROP and ACCEPT 333 User-Defined Chains 334 ICMP Packets 335 Controlling Port Access 336 Packet States: Connection Tracking 337 Network Address Translation (NAT) 338 Adding NAT Rules 338 Nat Targets and Chains 339 Nat Redirection: Transparent Proxies 340 Packet Mangling: the Mangle Table 340 IP Tables Scripts 341 Red Hat iptables Support 341 An iptables Script Example 343 IP Masquerading 349 Masquerading Local Networks 350 Masquerading NAT Rule 350 IP Forwarding 351 Masquerading Selected Hosts 351

Part V Red Hat Servers 20 Server Management 355 System Startup Files: /etc/red and /etc/sysconfig 355 /etc/rc.d/rc.sysinit 355 /etc/rc.d/init.d 355 SysV Init: init.d Scripts 357 Starting Servers: Standalone and xinetd 359 Starting Services Directly 359 Starting and Stopping Services with Startup Scripts 359 Starting Services Automatically 359 Service Management Tools: chkeonfig and redhat-config-serivces ... 360 redhat-config-services 361 chkeonfig 362 Service Scripts: /etc/init.d 365 Service Script Functions 365 Service Script Tags 366 Service Script Example 367 Installing Service Scripts 368 Extended Internet Services Daemon (xinetd) 368 Starting and Stopping xinetd Services 369 xinetd Configuration: xinetd.conf 369 Contents XV

xinetd Attributes 369 Disabling and Enabling xinetd Services 372 Logging xinetd Services 373 xinetd Network Security 374 xinetd Defaults and Internal Services 374 Service Files in xinetd.d Directory 374 TCP Wrappers 375 21 FTP Servers 377 FTP Servers 377 Available Servers 378 Red Hat FTP Server Directories 378 FTP Users . ...; 379 Anonymous FTP: vsftpd 379 The FTP User Account: anonymous 380 FTP Group 380 Creating New FTP Users 380 Anonymous FTP Server Directories 381 Anonymous FTP Files 381 The Very Secure FTP Server 382 Running vsftpd 382 Configuring vsftpd 383 vsftpd Access Controls 386 vsftpd Virtual Hosts 388 vsftpd Virtual Users 388 Professional FTP Daemon: ProFTPD 389 install and startup 389 proftpd.config and .ftpaccess 390 Authentication 392 Anonymous Access 392 Virtual FTP Servers 395 The Washington University FTP Daemon: WU-FTPD 398 ProFTPD and WU-FTPD Server Tools 399 ftpshut 399 ftpwho and ftpcount 400 22 Web Servers: Apache 401 Tux 401 Apache Web Server 402 Java: Apache Jakarta Project 403 Linux Apache Installations 403 Apache Web Server 2.0 405 Starting and Stopping the Web Server 406 Apache Configuration Files 408 XVi Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Apache Configuration and Directives 408 Server Configuration 410 Directory-Level Configuration: .htaccess and ... 413 Access Control 415 URL Pathnames 417 MIME Types 417 CGI Files 418 Automatic Directory Indexing 419 Authentication 420 Log Files 422 Virtual Hosting on Apache 425 IP Address-Based Virtual Hosts 425 Name-Based Virtual Hosts 426 Dynamic Virtual Hosting 427 Server-Side Includes 430 PHP 431 Apache GUI Configuration Tools 431 Web Server Security: SSL 433

23 Proxy Servers: Squid 437 Configuring Client Browsers 438 squid.conf 439 Security 440 Caches 443 Logs 443 Web Server Acceleration: Reverse Proxy Cache 443 24 Mail Servers: SMTP, POP, and IMAP 445 Mail Servers 446 Received Mail: MX Records 447 Postfix 448 Postfix Commands 448 Postfix Configuration: main.cf 448 Security: UCM 451 Sendmail 452 Aliases and LDAP 455 Sendmail Configuration 456 Sendmail Masquerading 460 Configuring Mail Servers and Mail Clients 462 Configuring Sendmail for a Simple Network Configuration ... 462 Configuring Sendmail for a Centralized Mail Server 463 Configuring a Workstation with Direct ISP Connection .... 463 The Mailer Table 464 Security 464 Contents XVN

POP Servers 467 Washington POP Server 468 Qpopper 468 IMAP 469 25 Print Servers 471 CUPS and LPRng 471 Printer Devices and Configuration 471 Printer Device Files 472 Spool Directories 472 Managing Printers with CUPS 472 Installing Printers with CUPS 473 Configuring Remote Printers on CUPS 474 CUPS Printer Classes 475 CUPS Configuration 475 CUPS Command Line Print Clients 476 CUPS Administrative Tools 478 The Line Printer Server: LPRng 480 LPRng Print Clients 481 printcap File 481 Configuring lpd 481 LPRng Print Clients 483 26 News and Search Servers 485 News Servers: INN 485 INN Configuration Files 485 inn.conf 486 INN Implementation 487 Dig Server 487 Dig Searches 488 Dig Configuration 488 Dig Tools 488

Part VI System Administration 27 Basic System Administration 491 Superuser Control: the Root User 491 Root User Password 492 Root User Access: su 492 System Time and Date 494 Using the redhat-config-date Utility 494 Using the date Command 495 Scheduling Tasks: cron 495 The crond Service 495 crontab Entries 495 XViii Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

cron Environment Variables 496 cron.d Directory 496 crontab Command 497 cron Editing 497 Organizing Scheduled Tasks 497 Running cron Directory Scripts 498 cron Directory Names 499 Anacron 499 System Runlevels: telinit, initab, and shutdown 499 Runlevels 499 initab Runlevels 501 Changing Runlevels with telinit 501 runlevel Command 501 Shutdown 501 Managing Services 503 _ chkeonfig 503 service Command 503 redhat-config-services 503 Red Hat Administration Tools 504 System Directories 504 Program Directories 505 Configuration Directories and Files 505 Configuration Files: /etc 506 /etc/sysconfig 506 System Logs: /var/log and syslogd 508 redhat-logviewer 508 syslogd and syslog.conf 508 syslogd.conf Entries 508 Priorities 510 Actions and Users 510 /etc/syslog.conf Example 511 Performance Analysis Tools and Processes 512 ps Command 512 vmstat, free, top, iostat, Xload, and sar 513 Procman System Manager 513 GNOME System Manager (GTop) 514 KDE Process Manager (kpm) 514 KDE Task Manager and Performance Monitor (KSysguard) ... 514 Grand Unified Bootloader (GRUB) 515 Backups 516 Amanda 516 Backups with dump and restore 517 28 Managing Users 523 User Configuration Files 523 Contents XIX

The Password Files - 524 /etc/passwd 524 /etc/shadow and /etc/gshadow 525 Password Tools 525 Managing User Environments 526 Profile Scripts 526 /etc/skel 526 /etc/login.defs 527 /etc/login.access 527 Controlling User Passwords 527 Adding and Removing Users with useradd, usermod, and userdel 529 useradd 529 usermod 530 userdel 530 Managing Groups 531 /etc/group and /etc/gshadow .' 531 User Private Groups 531 Group Directories 531 Managing Groups with the Red Hat User Manager 532 Managing Groups Using groupadd, groupmod, and groupdel 532 Controlling Access to Directories and Files: chmod 533 Permissions 533 chmod 534 Ownership 534 Changing a File's Owner or Group: chown and chgrp 536 Setting Permissions: Permission Symbols 537 Absolute Permissions: Binary Masks 538 Directory Permissions 539 Ownership Permissions 540 Sticky Bit Permissions 541 Permission Defaults: umask 541 Disk Quotas 542 Quota Tools 542 edquota 542 quotacheck, quotaon, and quotaoff 543 repquota and quota 543 Lightweight Directory Access Protocol 544 LDAP Clients and Servers 544 LDAP Configuration Files 545 LDAP Tools 545 LDAP and PAM 545 LDAP and the Name Service Switch Service 546 XX Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Pluggable Authentication Modules 546 PAM Configuration Files 546 PAM Modules 547 29 Software Management 549 Software Repositories 549 Software Package Types 550 Red Hat Package Manager (RPM) 551 RPM Tools 551 RPM Packages 552 Installing from the Desktop: redhat-config-packages 552 Updating Software 552 Command Line Installation: rpm 553 Installing Software from RPM Source Code Files: SRPMs 559 Source Code RPM Directories 560 Building the Source Code 560 Installing Software from Compressed Archives: .tar.gz 560 Decompressing and Extracting Software in One Step 560 Decompressing Software 561 Selecting an Install Directory 561 Extracting Software 562 Compiling Software 562 Command and Program Directories: PATH 565 The Concurrent Versions System: CVS 566 Packaging Your Software with RPM 567 30 File System Management 569 File Systems 570 Filesystem Hierarchy Standard 570 Root Directory: / 570 System Directories 571 The /usr Directory 573 The /mnt Directory 573 The /home Directory 573 The /var Directory 573 The /proc File System 574 Device Files: /dev 575 Mounting File Systems 577 File System Information 578 Journaling 579 ext3 Journaling 580 ReiserFS 580 Mounting File Systems Automatically: / etc/fstab 580 Auto Mounts 581 mount Options 582 Contents XXJ

Boot and Disk Check 584 CD-ROM and Floppy Defaults 584 Partition Labels: e21abel 584 Windows Partitions 585 Linux Kernel Interfaces 585 noauto 585 Mounting File Systems Directly: mount and umount 586 The mount Command 586 The umount Command 587 Mounting Floppy Disks 588 Mounting CD-ROMs 589 Mounting Hard Drive Partitions: Linux and Windows 590 Installing IDE CD-/RW and DVD R/RW Devices 590 SCSI Emulation 591 Kernel Parameters at Boot Time 591 Grub and CD Writers 591 scanbus 592 Creating File Systems: mkfs, mke2fs, mkswap, parted, and fdisk .. 592 fdisk 592 parted 594 mkfs 595 mkswap 596 CD-ROM and DVD ROM Recording 596 mkisofs 597 cdrecord and dvdrecord 598 dvd+rw Tools 599 31 RAID and LVM 601 Enabling RAID and LVM in the Kernel 601 Configuring RAID Devices 601 Linux Software RAID Levels 602 RAID Devices and Partitions: md and fd 604 Corresponding Hard Disk Partitions 604 Booting from a RAID Device 604 Automatic Detection: Persistent Superblocks 605 RAID Tools 606 Creating and Installing RAID Devices 606 RAID Example 610 Logical Volume Manager 611 LVM Structure 611 Creating LVMs with Disk Druid 612 LVM Tools 612 LVM Example 614 XXi'l Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

32 Devices and Modules 617 Device Files 617 Device Symbolic Links 618 Hardware Device Installation: Kudzu 618 Creating Device Files Manually 619 Device Information: /proc and /etc/sysconfig/hwconf 620 Installing and Managing Terminals and Modems 621 Serial Ports 621 mingetty, mgetty, and agetty 621 termcap and inittab Files 622 tset 622 Input Devices 622 PCMCIADevices 623 Installing Sound, Network, and Other Cards 624 Sound Devices 625 Video, TV, and DVD Devices 626 Modules 626 Kernel Module Tools 626 Module Files and Directories 627 Managing Modules with /etc/modules.conf 628 Installing New Modules for the Kernel 630 33 Kernel Administration 633 Kernel Versions 633 Kernel Tuning: Kernel Runtime Parameters 634 Installing a New Kernel Version 635 Red Hat Kernel Packages 636 CPU Kernel Packages 636 Support Packages 637 Installing Kernel Packages: /boot 637 Precautionary Steps for Modifying a Kernel of the Same Version 638 Boot Loader 639 Boot Disk 640 Compiling the Kernel from Source Code 640 Installing Kernel Sources: Kernel Archives and Patches .... 640 Configuring the Kernel 641 Important Kernel Configuration Features 644 Compiling and Installing the Kernel 646 Installing the Kernel Image Manually 647 Kernel Boot Disks 648 Boot Loader Configurations 649 GRUB Configurations 649 Module RAM Disks 649 Contents XXJM

Part VII Network Administration 34 Domain Name System 653 DNS Address Translations 653 Fully Qualified Domain Names 653 IPv4 Addresses 654 IPv6 Addressing 654 Manual Translations: /etc/hosts 654 DNS Servers 654 DNS Operation .' 655 DNS Clients: Resolvers 656 Local Area Network Addressing 656 IPv4 Private Networks 656 IPv6 Private Networks 658 BIND 658 Alternative DNS Servers 658 DNS Documentation 659 BIND Servers and Tools 659 Starting and Stopping the BIND Server 660 Domain Name Service Configuration 660 DNS Zones 660 DNS Server Types 661 named.conf 662 zone Statement 663 Configuration Statements 664 options Statement 665 directory Option 666 forwarders Option 666 notify Option 666 named.conf Example 666 IPv6 named.conf Version 667 Caching-Only Server 668 Resource Records 669 Resource Record Types 669 Start of Authority: SOA 670 Name Server: NS 671 Address Record: A and A6 671 Mail Exchanger: MX 672 Aliases: CNAME 673 Pointer Record: PTR 673 Host Information: HINFO, RP, MINFO, and TXT 674 Zone Files 674 Zone Files for Internet Zones 674 IPv6 Zone File 678 XXJV Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

Reverse Mapping File 678 Localhost Reverse Mapping 681 Subdomains and Slaves 682 Subdomain Zones 682 Subdomain Records 682 Slave Servers 683 IP Virtual Domains 684 Cache File ' 685 Dynamic Update: DHCP and Journal Files 686 TSIG Signatures and Updates 686 Manual Updates: nsupdate 687 DNS Security: Access Control Lists, TSIG, and DNSSEC 687 Access Control Lists 687 Secret Keys 688 DNSSEC 689 TSIG Keys 691 Split DNS: Views 692 Internal and External Views 692 Configuring Views 693 Split View Example 693 35 DHCP Server 695 Configuring DHCP Client Hosts 696 Configuring the DHCP Server 696 Dynamic Addresses 698 Dynamic DNS Updates 700 Subnetworks 702 Fixed Addresses 703 36 NFSandNIS 707 Network File Systems: NFS and /etc/exports 707 NFS Daemons 707 Starting and Stopping NFS 708 NFS Analytical Tools 708 Configuring NFS with the Red Hat NFS Configuration Tool 708 NFS Configuration: /etc/exports 710 NFS Security: /etc/hosts.allow and /etc/hosts.deny 713 Mounting NFS File Systems: NFS Clients 714 Network Information Service: NIS 717 NIS Servers 718 Netgroups 721 NIS Clients 721 Contents XXV

37 Samba 725 Samba Documentation 725 Samba Applications 726 Starting Up Samba 728 Accessing Samba from Linux 728 Accessing Samba from Windows 728 Samba Configuration File and Tools 728 Passwords 729 Samba Encrypted Passwords: smbpasswd 729 Configuring the Samba with redhat-config-samba 731 Server Configuration with redhat-config-samba 731 Adding Samba Users with redhat-config-samba 732 Specifying Samba Shares with redhat-config-samba 732 The Samba smb.conf Configuration File 732 SWAT and smb.conf 734 Activating SWAT 735 Accessing SWAT 736 SWAT Configuration Pages 736 Creating a New Share with SWAT 737 A SWAT-Generated smb.conf Example 738 Global Section 739 Passwords 742 Homes Section 742 Printer Section 742 Shares 743 Printers 744 Variable Substitutions 745 Testing the Samba Configuration 746 Domain Logons 746 Accessing Samba Services with Clients 747 smbclient 747 smbmount 749 Sharing Windows Directories and Printers with Samba Clients 750 Windows Clients 752 38 Administering TCP/IP Networks 753 TCP/IP Protocol Suite 753 IPv4 and IPv6 756 TCP/IP Network Addresses 756 IPv4 Network Addresses 757 Class-Based IP Addressing 757 Netmask 758 Classless Interdomain Routing (CIDR) 759 XXVi Red Hat: The Complete Reference Enterprise Linux & Fedora Edition

-Obtaining an IP Address 762 Broadcast Addresses 764 Gateway Addresses 764 Name Server Addresses 764 IPv6 Addressing 765 IPv6 Address Format 765 IPv6 Interface Identifiers 766 IPv6 Address Types 766 TCP/IP Configuration Files 768 Identifying Hostnames: /etc/hosts 768 /etc/resolv.conf 768 /etc/sysconfig/network-scripts 769 /etc/sysconfig/networking 769 /etc/services 769 /etc/protocols 769 /etc/sysconfig/network 769 Domain Name Service (DNS) 769 host.conf 771 /etc/nsswitch.conf: Name Service Switch 772 Network Interfaces and Routes: ifconfig and route 774 Network Startup Script: /etc/rc.d/init.d/network 774 Interface Configuration Scripts: /etc/sysconfig/network-scripts 774 ifconfig 775 Routing 777 Monitoring Your Network: ping, netstat, tcpdump, and Ethereal 779 Ethereal 779 tcpdump 781 netstat 781 IP Aliasing 782 A About the DVD-ROM 783

Index 785