Red Hat Enterprise Linux 4

Reference Guide

For Red Hat Enterprise Linux 4

Edition 4

Logo

Legal Notice

Copyright © 2008, 2011 Red Hat, Inc.
This document is licensed by Red Hat under the Creative Commons Attribution-ShareAlike 3.0 Unported License. If you distribute this document, or a modified version of it, you must provide attribution to Red Hat, Inc. and provide a link to the original. If the document is modified, all Red Hat trademarks must be removed.
Red Hat, as the licensor of this document, waives the right to enforce, and agrees not to assert, Section 4d of CC-BY-SA to the fullest extent permitted by applicable law.
Red Hat, Red Hat Enterprise Linux, the Shadowman logo, JBoss, MetaMatrix, Fedora, the Infinity Logo, and RHCE are trademarks of Red Hat, Inc., registered in the United States and other countries.
Linux® is the registered trademark of Linus Torvalds in the United States and other countries.
Java® is a registered trademark of Oracle and/or its affiliates.
XFS® is a trademark of Silicon Graphics International Corp. or its subsidiaries in the United States and/or other countries.
MySQL® is a registered trademark of MySQL AB in the United States, the European Union and other countries.
Node.js® is an official trademark of Joyent. Red Hat Software Collections is not formally related to or endorsed by the official Joyent Node.js open source or commercial project.
The OpenStack® Word Mark and OpenStack Logo are either registered trademarks/service marks or trademarks/service marks of the OpenStack Foundation, in the United States and other countries and are used with the OpenStack Foundation's permission. We are not affiliated with, endorsed or sponsored by the OpenStack Foundation, or the OpenStack community.
All other trademarks are the property of their respective owners.

Abstract

The \Reference Guide provides reference material for Red Hat Enterprise Linux 4, and is oriented towards system administrators with a basic understanding of the system. For information regarding the deployment, configuration, and administration of this system, refer to the Red Hat Enterprise Linux 4 System Administrator's Guide.
Introduction
1. Changes To This Manual
2. Finding Appropriate Documentation
2.1. Documentation For First-Time Linux Users
2.2. For the More Experienced
2.3. Documentation for Linux Gurus
3. Document Conventions
3.1. Typographic Conventions
3.2. Pull-quote Conventions
3.3. Notes and Warnings
4. More to Come
4.1. We Need Feedback!
I. System Reference
1. Boot Process, Init, and Shutdown
1.1. The Boot Process
1.2. A Detailed Look at the Boot Process
1.2.1. The BIOS
1.2.2. The Boot Loader
1.2.3. The Kernel
1.2.4. The /sbin/init Program
1.3. Running Additional Programs at Boot Time
1.4. SysV Init Runlevels
1.4.1. Runlevels
1.4.2. Runlevel Utilities
1.5. Shutting Down
2. The GRUB Boot Loader
2.1. Boot Loaders and System Architecture
2.2. GRUB
2.2.1. GRUB and the x86 Boot Process
2.2.2. Features of GRUB
2.3. Installing GRUB
2.4. GRUB Terminology
2.4.1. Device Names
2.4.2. File Names and Blocklists
2.4.3. The Root File System and GRUB
2.5. GRUB Interfaces
2.5.1. Interfaces Load Order
2.6. GRUB Commands
2.7. GRUB Menu Configuration File
2.7.1. Configuration File Structure
2.7.2. Configuration File Directives
2.8. Changing Runlevels at Boot Time
2.9. Additional Resources
2.9.1. Installed Documentation
2.9.2. Useful Websites
2.9.3. Related Books
3. File System Structure
3.1. Why Share a Common Structure?
3.2. Overview of File System Hierarchy Standard (FHS)
3.2.1. FHS Organization
3.3. Special File Locations Under Red Hat Enterprise Linux
4. The sysconfig Directory
4.1. Files in the /etc/sysconfig/ Directory
4.1.1. /etc/sysconfig/amd
4.1.2. /etc/sysconfig/apmd
4.1.3. /etc/sysconfig/arpwatch
4.1.4. /etc/sysconfig/authconfig
4.1.5. /etc/sysconfig/autofs
4.1.6. /etc/sysconfig/clock
4.1.7. /etc/sysconfig/desktop
4.1.8. /etc/sysconfig/devlabel
4.1.9. /etc/sysconfig/dhcpd
4.1.10. /etc/sysconfig/exim
4.1.11. /etc/sysconfig/firstboot
4.1.12. /etc/sysconfig/gpm
4.1.13. /etc/sysconfig/harddisks
4.1.14. /etc/sysconfig/hwconf
4.1.15. /etc/sysconfig/i18n
4.1.16. /etc/sysconfig/init
4.1.17. /etc/sysconfig/ip6tables-config
4.1.18. /etc/sysconfig/iptables-config
4.1.19. /etc/sysconfig/irda
4.1.20. /etc/sysconfig/keyboard
4.1.21. /etc/sysconfig/kudzu
4.1.22. /etc/sysconfig/mouse
4.1.23. /etc/sysconfig/named
4.1.24. /etc/sysconfig/netdump
4.1.25. /etc/sysconfig/network
4.1.26. /etc/sysconfig/ntpd
4.1.27. /etc/sysconfig/pcmcia
4.1.28. /etc/sysconfig/radvd
4.1.29. /etc/sysconfig/rawdevices
4.1.30. /etc/sysconfig/samba
4.1.31. /etc/sysconfig/selinux
4.1.32. /etc/sysconfig/sendmail
4.1.33. /etc/sysconfig/spamassassin
4.1.34. /etc/sysconfig/squid
4.1.35. /etc/sysconfig/system-config-securitylevel
4.1.36. /etc/sysconfig/system-config-users
4.1.37. /etc/sysconfig/system-logviewer
4.1.38. /etc/sysconfig/tux
4.1.39. /etc/sysconfig/vncservers
4.1.40. /etc/sysconfig/xinetd
4.2. Directories in the /etc/sysconfig/ Directory
4.3. Additional Resources
4.3.1. Installed Documentation
5. The proc File System
5.1. A Virtual File System
5.1.1. Viewing Virtual Files
5.1.2. Changing Virtual Files
5.2. Top-level Files within the proc File System
5.2.1. /proc/apm
5.2.2. /proc/buddyinfo
5.2.3. /proc/cmdline
5.2.4. /proc/cpuinfo
5.2.5. /proc/crypto
5.2.6. /proc/devices
5.2.7. /proc/dma
5.2.8. /proc/execdomains
5.2.9. /proc/fb
5.2.10. /proc/filesystems
5.2.11. /proc/interrupts
5.2.12. /proc/iomem
5.2.13. /proc/ioports
5.2.14. /proc/kcore
5.2.15. /proc/kmsg
5.2.16. /proc/loadavg
5.2.17. /proc/locks
5.2.18. /proc/mdstat
5.2.19. /proc/meminfo
5.2.20. /proc/misc
5.2.21. /proc/modules
5.2.22. /proc/mounts
5.2.23. /proc/mtrr
5.2.24. /proc/partitions
5.2.25. /proc/pci
5.2.26. /proc/slabinfo
5.2.27. /proc/stat
5.2.28. /proc/swaps
5.2.29. /proc/sysrq-trigger
5.2.30. /proc/uptime
5.2.31. /proc/version
5.3. Directories within /proc/
5.3.1. Process Directories
5.3.2. /proc/bus/
5.3.3. /proc/driver/
5.3.4. /proc/fs
5.3.5. /proc/ide/
5.3.6. /proc/irq/
5.3.7. /proc/net/
5.3.8. /proc/scsi/
5.3.9. /proc/sys/
5.3.10. /proc/sysvipc/
5.3.11. /proc/tty/
5.4. Using the sysctl Command
5.5. Additional Resources
5.5.1. Installed Documentation
5.5.2. Useful Websites
6. Users and Groups
6.1. User and Group Management Tools
6.2. Standard Users
6.3. Standard Groups
6.4. User Private Groups
6.4.1. Group Directories
6.5. Shadow Passwords
6.6. Additional Resources
6.6.1. Installed Documentation
6.6.2. Related Books
7. The X Window System
7.1. The X11R6.8 Release
7.2. Desktop Environments and Window Managers
7.2.1. Desktop Environments
7.2.2. Window Managers
7.3. X Server Configuration Files
7.3.1. xorg.conf
7.4. Fonts
7.4.1. Fontconfig
7.4.2. Core X Font System
7.5. Runlevels and X
7.5.1. Runlevel 3
7.5.2. Runlevel 5
7.6. Additional Resources
7.6.1. Installed Documentation
7.6.2. Useful Websites
7.6.3. Related Books
II. Network Services Reference
8. Network Interfaces
8.1. Network Configuration Files
8.2. Interface Configuration Files
8.2.1. Ethernet Interfaces
8.2.2. IPsec Interfaces
8.2.3. Channel Bonding Interfaces
8.2.4. Alias and Clone Files
8.2.5. Dialup Interfaces
8.2.6. Other Interfaces
8.3. Interface Control Scripts
8.4. Network Function Files
8.5. Additional Resources
8.5.1. Installed Documentation
9. Network File System (NFS)
9.1. How It Works
9.1.1. Required Services
9.1.2. NFS and portmap
9.2. Starting and Stopping NFS
9.3. NFS Server Configuration
9.3.1. The /etc/exports Configuration File
9.3.2. The exportfs Command
9.4. NFS Client Configuration Files
9.4.1. /etc/fstab
9.4.2. autofs
9.4.3. Common NFS Mount Options
9.5. Securing NFS
9.5.1. Host Access
9.5.2. File Permissions
9.6. Additional Resources
9.6.1. Installed Documentation
9.6.2. Useful Websites
9.6.3. Related Books
10. Apache HTTP Server
10.1. Apache HTTP Server 2.0
10.1.1. Features of Apache HTTP Server 2.0
10.1.2. Packaging Changes in Apache HTTP Server 2.0
10.1.3. File System Changes in Apache HTTP Server 2.0
10.2. Migrating Apache HTTP Server 1.3 Configuration Files
10.2.1. Global Environment Configuration
10.2.2. Main Server Configuration
10.2.3. Virtual Host Configuration
10.2.4. Modules and Apache HTTP Server 2.0
10.3. After Installation
10.4. Starting and Stopping httpd
10.5. Configuration Directives in httpd.conf
10.5.1. General Configuration Tips
10.5.2. ServerRoot
10.5.3. PidFile
10.5.4. Timeout
10.5.5. KeepAlive
10.5.6. MaxKeepAliveRequests
10.5.7. KeepAliveTimeout
10.5.8. IfModule
10.5.9. MPM Specific Server-Pool Directives
10.5.10. Listen
10.5.11. Include
10.5.12. LoadModule
10.5.13. ExtendedStatus
10.5.14. IfDefine
10.5.15. SuexecUserGroup
10.5.16. User
10.5.17. Group
10.5.18. ServerAdmin
10.5.19. ServerName
10.5.20. UseCanonicalName
10.5.21. DocumentRoot
10.5.22. Directory
10.5.23. Options
10.5.24. AllowOverride
10.5.25. Order
10.5.26. Allow
10.5.27. Deny
10.5.28. UserDir
10.5.29. DirectoryIndex
10.5.30. AccessFileName
10.5.31. CacheNegotiatedDocs
10.5.32. TypesConfig
10.5.33. DefaultType
10.5.34. HostnameLookups
10.5.35. ErrorLog
10.5.36. LogLevel
10.5.37. LogFormat
10.5.38. CustomLog
10.5.39. ServerSignature
10.5.40. Alias
10.5.41. ScriptAlias
10.5.42. Redirect
10.5.43. IndexOptions
10.5.44. AddIconByEncoding
10.5.45. AddIconByType
10.5.46. AddIcon
10.5.47. DefaultIcon
10.5.48. AddDescription
10.5.49. ReadmeName
10.5.50. HeaderName
10.5.51. IndexIgnore
10.5.52. AddEncoding
10.5.53. AddLanguage
10.5.54. LanguagePriority
10.5.55. AddType
10.5.56. AddHandler
10.5.57. Action
10.5.58. ErrorDocument
10.5.59. BrowserMatch
10.5.60. Location
10.5.61. ProxyRequests
10.5.62. Proxy
10.5.63. Cache Directives
10.5.64. NameVirtualHost
10.5.65. VirtualHost
10.5.66. Configuration Directives for SSL
10.6. Default Modules
10.7. Adding Modules
10.8. Virtual Hosts
10.8.1. Setting Up Virtual Hosts
10.8.2. The Secure Web Server Virtual Host
10.9. Additional Resources
10.9.1. Useful Websites
10.9.2. Related Books
11. Email
11.1. Email Protocols
11.1.1. Mail Transport Protocols
11.1.2. Mail Access Protocols
11.2. Email Program Classifications
11.2.1. Mail Transfer Agent
11.2.2. Mail Delivery Agent
11.2.3. Mail User Agent
11.3. Mail Transport Agents
11.3.1. Sendmail
11.3.2. Postfix
11.3.3. Fetchmail
11.4. Mail Delivery Agents
11.4.1. Procmail Configuration
11.4.2. Procmail Recipes
11.5. Mail User Agents
11.5.1. Securing Communication
11.6. Additional Resources
11.6.1. Installed Documentation
11.6.2. Useful Websites
11.6.3. Related Books
12. Berkeley Internet Name Domain (BIND)
12.1. Introduction to DNS
12.1.1. Nameserver Zones
12.1.2. Nameserver Types
12.1.3. BIND as a Nameserver
12.2. /etc/named.conf
12.2.1. Common Statement Types
12.2.2. Other Statement Types
12.2.3. Comment Tags
12.3. Zone Files
12.3.1. Zone File Directives
12.3.2. Zone File Resource Records
12.3.3. Example Zone File
12.3.4. Reverse Name Resolution Zone Files
12.4. Using rndc
12.4.1. Configuring /etc/named.conf
12.4.2. Configuring /etc/rndc.conf
12.4.3. Command Line Options
12.5. Advanced Features of BIND
12.5.1. DNS Protocol Enhancements
12.5.2. Multiple Views
12.5.3. Security
12.5.4. IP version 6
12.6. Common Mistakes to Avoid
12.7. Additional Resources
12.7.1. Installed Documentation
12.7.2. Useful Websites
12.7.3. Related Books
13. Lightweight Directory Access Protocol (LDAP)
13.1. Why Use LDAP?
13.1.1. OpenLDAP Features
13.2. LDAP Terminology
13.3. OpenLDAP Daemons and Utilities
13.3.1. NSS, PAM, and LDAP
13.3.2. PHP4, LDAP, and the Apache HTTP Server
13.3.3. LDAP Client Applications
13.4. OpenLDAP Configuration Files
13.5. The /etc/openldap/schema/ Directory
13.6. OpenLDAP Setup Overview
13.6.1. Editing /etc/openldap/slapd.conf
13.7. Configuring a System to Authenticate Using OpenLDAP
13.7.1. PAM and LDAP
13.7.2. Migrating Old Authentication Information to LDAP Format
13.8. Migrating Directories from Earlier Releases
13.9. Additional Resources
13.9.1. Installed Documentation
13.9.2. Useful Websites
13.9.3. Related Books
14. Samba
14.1. Introduction to Samba
14.1.1. Samba Features
14.2. Samba Daemons and Related Services
14.2.1. Daemon Overview
14.2.2. Starting and Stopping Samba
14.3. Samba Server Types and the smb.conf File
14.3.1. Stand-alone Server
14.3.2. Domain Member Server
14.3.3. Domain Controller
14.4. Samba Security Modes
14.4.1. User-Level Security
14.4.2. Share-Level Security
14.4.3. Domain Security Mode (User-Level Security)
14.4.4. Active Directory Security Mode (User-Level Security)
14.4.5. Server Security Mode (User-Level Security)
14.5. Samba Account Information Databases
14.5.1. Backward Compatible Backends
14.5.2. New Backends
14.6. Samba Network Browsing
14.6.1. Workgroup Browsing
14.6.2. Domain Browsing
14.6.3. WINS (Windows Internetworking Name Server)
14.7. Samba with CUPS Printing Support
14.7.1. Simple smb.conf Settings
14.8. Samba Distribution Programs
14.8.1. findsmb
14.8.2. make_smbcodepage
14.8.3. make_unicodemap
14.8.4. net
14.8.5. nmblookup
14.8.6. pdbedit
14.8.7. rpcclient
14.8.8. smbcacls
14.8.9. smbclient
14.8.10. smbcontrol
14.8.11. smbgroupedit
14.8.12. smbmount
14.8.13. smbpasswd
14.8.14. smbspool
14.8.15. smbstatus
14.8.16. smbtar
14.8.17. testparm
14.8.18. testprns
14.8.19. wbinfo
14.9. Additional Resources
14.9.1. Installed Documentation
14.9.2. Red Hat Documentation
14.9.3. Related Books
14.9.4. Useful Websites
15. FTP
15.1. The File Transport Protocol
15.1.1. Multiple Ports, Multiple Modes
15.2. FTP Servers
15.2.1. vsftpd
15.3. Files Installed with vsftpd
15.4. Starting and Stopping vsftpd
15.4.1. Starting Multiple Copies of vsftpd
15.5. vsftpd Configuration Options
15.5.1. Daemon Options
15.5.2. Log In Options and Access Controls
15.5.3. Anonymous User Options
15.5.4. Local User Options
15.5.5. Directory Options
15.5.6. File Transfer Options
15.5.7. Logging Options
15.5.8. Network Options
15.6. Additional Resources
15.6.1. Installed Documentation
15.6.2. Useful Websites
15.6.3. Related Books
III. Security Reference
16. Pluggable Authentication Modules (PAM)
16.1. Advantages of PAM
16.2. PAM Configuration Files
16.2.1. PAM Service Files
16.3. PAM Configuration File Format
16.3.1. Module Interface
16.3.2. Control Flag
16.3.3. Module Name
16.3.4. Module Arguments
16.4. Sample PAM Configuration Files
16.5. Creating PAM Modules
16.6. PAM and Administrative Credential Caching
16.6.1. Removing the Timestamp File
16.6.2. Common pam_timestamp Directives
16.7. PAM and Device Ownership
16.7.1. Device Ownership
16.7.2. Application Access
16.8. Additional Resources
16.8.1. Installed Documentation
16.8.2. Useful Websites
17. TCP Wrappers and xinetd
17.1. TCP Wrappers
17.1.1. Advantages of TCP Wrappers
17.2. TCP Wrappers Configuration Files
17.2.1. Formatting Access Rules
17.2.2. Option Fields
17.3. xinetd
17.4. xinetd Configuration Files
17.4.1. The /etc/xinetd.conf File
17.4.2. The /etc/xinetd.d/ Directory
17.4.3. Altering xinetd Configuration Files
17.5. Additional Resources
17.5.1. Installed Documentation
17.5.2. Useful Websites
17.5.3. Related Books
18. iptables
18.1. Packet Filtering
18.2. Differences between iptables and ipchains
18.3. Options Used within iptables Commands
18.3.1. Structure of iptables Options
18.3.2. Command Options
18.3.3. iptables Parameter Options
18.3.4. iptables Match Options
18.3.5. Target Options
18.3.6. Listing Options
18.4. Saving iptables Rules
18.5. iptables Control Scripts
18.5.1. iptables Control Scripts Configuration File
18.6. ip6tables and IPv6
18.7. Additional Resources
18.7.1. Installed Documentation
18.7.2. Useful Websites
19. Kerberos
19.1. What is Kerberos?
19.1.1. Advantages of Kerberos
19.1.2. Disadvantages of Kerberos
19.2. Kerberos Terminology
19.3. How Kerberos Works
19.4. Kerberos and PAM
19.5. Configuring a Kerberos 5 Server
19.6. Configuring a Kerberos 5 Client
19.7. Additional Resources
19.7.1. Installed Documentation
19.7.2. Useful Websites
20. SSH Protocol
20.1. Features of SSH
20.1.1. Why Use SSH?
20.2. SSH Protocol Versions
20.3. Event Sequence of an SSH Connection
20.3.1. Transport Layer
20.3.2. Authentication
20.3.3. Channels
20.4. OpenSSH Configuration Files
20.5. More Than a Secure Shell
20.5.1. X11 Forwarding
20.5.2. Port Forwarding
20.6. Requiring SSH for Remote Connections
20.7. Additional Resources
20.7.1. Installed Documentation
20.7.2. Useful Websites
20.7.3. Related Books
21. SELinux
21.1. Introduction to SELinux
21.2. Files Related to SELinux
21.2.1. The /selinux/ Pseudo-File System
21.2.2. SELinux Configuration Files
21.2.3. SELinux Utilities
21.3. Additional Resources
21.3.1. Installed Documentation
21.3.2. Red Hat Documentation
21.3.3. Useful Websites
IV. Appendixes
22. General Parameters and Modules
22.1. Kernel Module Utilities
22.2. Persistent Module Loading
22.3. Specifying Module Parameters
22.4. Storage parameters
22.5. Ethernet Parameters
22.5.1. Using Multiple Ethernet Cards
22.5.2. The Channel Bonding Module
22.6. Additional Resources
22.6.1. Installed Documentation
22.6.2. Useful Websites
A. Revision History
Index