Product SiteDocumentation Site

Fedora 18

System Administrator's Guide

Deployment, Configuration, and Administration of Fedora 18

Edition 1

Jaromír Hradílek

Red Hat, Inc. Engineering Content Services

Douglas Silas

Red Hat, Inc. Engineering Content Services

Martin Prpič

Red Hat, Inc. Engineering Content Services

Stephen Wadeley

Red Hat, Inc. Engineering Content Services

Eliška Slobodová

Red Hat, Inc. Engineering Content Services

Tomáš Čapek

Red Hat, Inc. Engineering Content Services

Petr Kovář

Red Hat, Inc. Engineering Content Services

Miroslav Svoboda

Red Hat, Inc. Engineering Content Services

John Ha

Red Hat, Inc. Engineering Content Services

David O'Brien

Red Hat, Inc. Engineering Content Services

Michael Hideo

Red Hat, Inc. Engineering Content Services

Don Domingo

Red Hat, Inc. Engineering Content Services

Legal Notice

Copyright © 2013 Red Hat, Inc. and others.
The text of and illustrations in this document are licensed by Red Hat under a Creative Commons Attribution–Share Alike 3.0 Unported license ("CC-BY-SA"). An explanation of CC-BY-SA is available at http://creativecommons.org/licenses/by-sa/3.0/. The original authors of this document, and Red Hat, designate the Fedora Project as the "Attribution Party" for purposes of CC-BY-SA. In accordance with CC-BY-SA, if you distribute this document or an adaptation of it, you must provide the URL for the original version.
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.
For guidelines on the permitted uses of the Fedora trademarks, refer to https://fedoraproject.org/wiki/Legal:Trademark_guidelines.
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.
All other trademarks are the property of their respective owners.
Abstract
The System Administrator's Guide documents relevant information regarding the deployment, configuration, and administration of Fedora 18. It is oriented towards system administrators with a basic understanding of the system.

Preface
1. Target Audience
2. How to Read this Book
3. Document Conventions
3.1. Typographic Conventions
3.2. Pull-quote Conventions
3.3. Notes and Warnings
4. We Need Feedback!
5. Acknowledgments
I. Basic System Configuration
1. Configuring the Language and Keyboard
1.1. Changing the Language
1.2. Changing the Date, Time, and Numeric Format
1.3. Changing the Keyboard Layout
1.4. Viewing the Current Configuration
2. Configuring the Date and Time
2.1. Using the Date and Time Configuration Tool
2.2. Using the Command Line Tools
2.2.1. Changing the Date
2.3. Additional Resources
2.3.1. Installed Documentation
3. Configuring NTP Using the chrony Suite
3.1. Introduction to the chrony Suite
3.1.1. Differences Between ntpd and chronyd
3.1.2. Choosing Between NTP Daemons
3.2. Understanding chrony and Its Configuration
3.2.1. Understanding chronyd
3.2.2. Understanding chronyc
3.2.3. Understanding the chrony Configuration Commands
3.2.4. Security with chronyc
3.3. Using chrony
3.3.1. Checking if chrony is Installed
3.3.2. Installing chrony
3.3.3. Checking the Status of chronyd
3.3.4. Starting chronyd
3.3.5. Stopping chronyd
3.3.6. Checking if chrony is Synchronized
3.3.7. Manualy Adjusting the System Clock
3.4. Setting Up chrony for Different Environments
3.4.1. Setting Up chrony for a System Which is Infrequently Connected
3.4.2. Setting Up chrony for a System in an Isolated Network
3.5. Using chronyc
3.5.1. Using chronyc to Control cronyd
3.5.2. Using chronyc for Remote Administration
3.6. Additional Resources
3.6.1. Installed Documentation
3.6.2. Useful Websites
4. Managing Users and Groups
4.1. Introduction to Users and Groups
4.1.1. User Private Groups
4.1.2. Shadow Passwords
4.2. Using the User Accounts Tool
4.2.1. Configuring an Account
4.2.2. Adding a New User
4.2.3. Removing a User
4.3. Using the User Manager Tool
4.3.1. Viewing Users and Groups
4.3.2. Adding a New User
4.3.3. Adding a New Group
4.3.4. Modifying User Properties
4.3.5. Modifying Group Properties
4.4. Using Command Line Tools
4.4.1. Adding a New User
4.4.2. Adding a New Group
4.4.3. Enabling Password Aging
4.4.4. Enabling Automatic Logouts
4.4.5. Creating Group Directories
4.5. Additional Resources
4.5.1. Installed Documentation
II. Package Management
5. Yum
5.1. Checking For and Updating Packages
5.1.1. Checking For Updates
5.1.2. Updating Packages
5.1.3. Preserving Configuration File Changes
5.2. Packages and Package Groups
5.2.1. Searching Packages
5.2.2. Listing Packages
5.2.3. Displaying Package Information
5.2.4. Installing Packages
5.2.5. Removing Packages
5.2.6. Working with Transaction History
5.3. Configuring Yum and Yum Repositories
5.3.1. Setting [main] Options
5.3.2. Setting [repository] Options
5.3.3. Using Yum Variables
5.3.4. Viewing the Current Configuration
5.3.5. Adding, Enabling, and Disabling a Yum Repository
5.3.6. Creating a Yum Repository
5.4. Yum Plug-ins
5.4.1. Enabling, Configuring, and Disabling Yum Plug-ins
5.4.2. Installing Additional Yum Plug-ins
5.4.3. Plug-in Descriptions
5.5. Additional Resources
6. PackageKit
6.1. Updating Packages with Software Update
6.1.1. Setting the Update-Checking Interval
6.1.2. Setting the Software Sources
6.2. Using Add/Remove Software
6.2.1. Refreshing Software Sources (Yum Repositories)
6.2.2. Finding Packages with Filters
6.2.3. Installing and Removing Packages (and Dependencies)
6.2.4. Installing and Removing Package Groups
6.2.5. Viewing the Transaction Log
6.3. PackageKit Architecture
6.4. Additional Resources
III. Networking
7. NetworkManager
7.1. The NetworkManager Daemon
7.2. Interacting with NetworkManager
7.2.1. Connecting to a Network
7.2.2. Configuring New and Editing Existing Connections
7.2.3. Connecting to a Network Automatically
7.2.4. User and System Connections
7.3. Establishing Connections
7.3.1. Establishing a Wired (Ethernet) Connection
7.3.2. Establishing a Wireless Connection
7.3.3. Establishing a Mobile Broadband Connection
7.3.4. Establishing a VPN Connection
7.3.5. Establishing a DSL Connection
7.4. Configuring Connection Settings
7.4.1. Configuring 802.1x Security
7.4.2. Configuring Wireless Security
7.4.3. Configuring PPP (Point-to-Point) Settings
7.4.4. Configuring IPv4 Settings
7.4.5. Configuring IPv6 Settings
7.4.6. Configuring Routes
7.5. NetworkManager Architecture
8. Network Interfaces
8.1. Network Configuration Files
8.2. Interface Configuration Files
8.2.1. Ethernet Interfaces
8.2.2. Ethtool
8.2.3. Channel Bonding Interfaces
8.2.4. Network Bridge
8.2.5. Setting Up 802.1q VLAN Tagging
8.2.6. Alias and Clone Files
8.2.7. Dialup Interfaces
8.2.8. Other Interfaces
8.3. Interface Control Scripts
8.4. Using Hostnamectl
8.4.1. View all the Hostnames
8.4.2. Set All The Hostnames
8.4.3. Set A Particular Hostname
8.4.4. Clear A Particular Hostname
8.4.5. Changing Host Names Remotely
8.4.6. Additional Resources
8.5. Static Routes and the Default Gateway
8.6. Network Function Files
8.7. Additional Resources
8.7.1. Installed Documentation
8.7.2. Useful Websites
IV. Infrastructure Services
9. Services and Daemons
9.1. Configuring Services
9.1.1. Enabling the Service
9.1.2. Disabling the Service
9.2. Running Services
9.2.1. Checking the Service Status
9.2.2. Running the Service
9.2.3. Stopping the Service
9.2.4. Restarting the Service
9.3. Additional Resources
9.3.1. Installed Documentation
9.3.2. Related Books
10. Configuring Authentication
10.1. Configuring System Authentication
10.1.1. Launching the Authentication Configuration Tool UI
10.1.2. Selecting the Identity Store for Authentication
10.1.3. Configuring Alternative Authentication Features
10.1.4. Configuring Authentication from the Command Line
10.1.5. Using Custom Home Directories
10.2. Using and Caching Credentials with SSSD
10.2.1. About the sssd.conf File
10.2.2. Starting and Stopping SSSD
10.2.3. Configuring SSSD to Work with System Services
10.2.4. Creating Domains
10.2.5. Configuring Access Control for SSSD Domains
10.2.6. Configuring Domain Failover
10.2.7. Managing the SSSD Cache
10.2.8. Configuring OpenSSH to Check SSSD for Cached Keys (TECH PREVIEW)
10.2.9. Using NSCD with SSSD
10.2.10. Troubleshooting SSSD
11. OpenSSH
11.1. The SSH Protocol
11.1.1. Why Use SSH?
11.1.2. Main Features
11.1.3. Protocol Versions
11.1.4. Event Sequence of an SSH Connection
11.2. An OpenSSH Configuration
11.2.1. Configuration Files
11.2.2. Starting an OpenSSH Server
11.2.3. Requiring SSH for Remote Connections
11.2.4. Using a Key-Based Authentication
11.3. OpenSSH Clients
11.3.1. Using the ssh Utility
11.3.2. Using the scp Utility
11.3.3. Using the sftp Utility
11.4. More Than a Secure Shell
11.4.1. X11 Forwarding
11.4.2. Port Forwarding
11.5. Additional Resources
11.5.1. Installed Documentation
11.5.2. Useful Websites
V. Servers
12. DHCP Servers
12.1. Why Use DHCP?
12.2. Configuring a DHCP Server
12.2.1. Configuration File
12.2.2. Lease Database
12.2.3. Starting and Stopping the Server
12.2.4. DHCP Relay Agent
12.3. Configuring a DHCP Client
12.4. Configuring a Multihomed DHCP Server
12.4.1. Host Configuration
12.5. DHCP for IPv6 (DHCPv6)
12.6. Additional Resources
12.6.1. Installed Documentation
13. DNS Servers
13.1. Introduction to DNS
13.1.1. Nameserver Zones
13.1.2. Nameserver Types
13.1.3. BIND as a Nameserver
13.2. BIND
13.2.1. Configuring the named Service
13.2.2. Editing Zone Files
13.2.3. Using the rndc Utility
13.2.4. Using the dig Utility
13.2.5. Advanced Features of BIND
13.2.6. Common Mistakes to Avoid
13.2.7. Additional Resources
14. Web Servers
14.1. The Apache HTTP Server
14.1.1. New Features
14.1.2. Notable Changes
14.1.3. Updating the Configuration
14.1.4. Running the httpd Service
14.1.5. Editing the Configuration Files
14.1.6. Working with Modules
14.1.7. Setting Up Virtual Hosts
14.1.8. Setting Up an SSL Server
14.1.9. Additional Resources
15. Mail Servers
15.1. Email Protocols
15.1.1. Mail Transport Protocols
15.1.2. Mail Access Protocols
15.2. Email Program Classifications
15.2.1. Mail Transport Agent
15.2.2. Mail Delivery Agent
15.2.3. Mail User Agent
15.3. Mail Transport Agents
15.3.1. Postfix
15.3.2. Sendmail
15.3.3. Fetchmail
15.3.4. Mail Transport Agent (MTA) Configuration
15.4. Mail Delivery Agents
15.4.1. Procmail Configuration
15.4.2. Procmail Recipes
15.5. Mail User Agents
15.5.1. Securing Communication
15.6. Additional Resources
15.6.1. Installed Documentation
15.6.2. Useful Websites
15.6.3. Related Books
16. Directory Servers
16.1. OpenLDAP
16.1.1. Introduction to LDAP
16.1.2. Installing the OpenLDAP Suite
16.1.3. Configuring an OpenLDAP Server
16.1.4. Running an OpenLDAP Server
16.1.5. Configuring a System to Authenticate Using OpenLDAP
16.1.6. Additional Resources
17. File and Print Servers
17.1. Samba
17.1.1. Introduction to Samba
17.1.2. Samba Daemons and Related Services
17.1.3. Connecting to a Samba Share
17.1.4. Configuring a Samba Server
17.1.5. Starting and Stopping Samba
17.1.6. Samba Server Types and the smb.conf File
17.1.7. Samba Security Modes
17.1.8. Samba Account Information Databases
17.1.9. Samba Network Browsing
17.1.10. Samba with CUPS Printing Support
17.1.11. Samba Distribution Programs
17.1.12. Additional Resources
17.2. FTP
17.2.1. The File Transfer Protocol
17.2.2. FTP Servers
17.2.3. Files Installed with vsftpd
17.2.4. Starting and Stopping vsftpd
17.2.5. vsftpd Configuration Options
17.2.6. Additional Resources
17.3. Printer Configuration
17.3.1. Starting the Printer Configuration Tool
17.3.2. Starting Printer Setup
17.3.3. Adding a Local Printer
17.3.4. Adding an AppSocket/HP JetDirect printer
17.3.5. Adding an IPP Printer
17.3.6. Adding an LPD/LPR Host or Printer
17.3.7. Adding a Samba (SMB) printer
17.3.8. Selecting the Printer Model and Finishing
17.3.9. Printing a test page
17.3.10. Modifying Existing Printers
17.3.11. Additional Resources
VI. Monitoring and Automation
18. System Monitoring Tools
18.1. Viewing System Processes
18.1.1. Using the ps Command
18.1.2. Using the top Command
18.1.3. Using the System Monitor Tool
18.2. Viewing Memory Usage
18.2.1. Using the free Command
18.2.2. Using the System Monitor Tool
18.3. Viewing CPU Usage
18.3.1. Using the System Monitor Tool
18.4. Viewing Block Devices and File Systems
18.4.1. Using the lsblk Command
18.4.2. Using the blkid Command
18.4.3. Using the partx Command
18.4.4. Using the findmnt Command
18.4.5. Using the df Command
18.4.6. Using the du Command
18.4.7. Using the System Monitor Tool
18.5. Viewing Hardware Information
18.5.1. Using the lspci Command
18.5.2. Using the lsusb Command
18.5.3. Using the lspcmcia Command
18.5.4. Using the lscpu Command
18.6. Monitoring Performance with Net-SNMP
18.6.1. Installing Net-SNMP
18.6.2. Running the Net-SNMP Daemon
18.6.3. Configuring Net-SNMP
18.6.4. Retrieving Performance Data over SNMP
18.6.5. Extending Net-SNMP
18.7. Additional Resources
18.7.1. Installed Documentation
19. Viewing and Managing Log Files
19.1. Configuring rsyslog
19.1.1. Global Directives
19.1.2. Modules
19.1.3. Rules
19.1.4. rsyslog Command Line Configuration
19.2. Locating Log Files
19.2.1. Configuring logrotate
19.3. Viewing Log Files
19.4. Adding a Log File
19.5. Monitoring Log Files
19.6. Additional Resources
19.6.1. Installed Documentation
19.6.2. Useful Websites
20. Automating System Tasks
20.1. Cron and Anacron
20.1.1. Starting and Stopping the Service
20.1.2. Configuring Anacron Jobs
20.1.3. Configuring Cron Jobs
20.1.4. Controlling Access to Cron
20.1.5. Black/White Listing of Cron Jobs
20.2. At and Batch
20.2.1. Configuring At Jobs
20.2.2. Configuring Batch Jobs
20.2.3. Viewing Pending Jobs
20.2.4. Additional Command Line Options
20.2.5. Controlling Access to At and Batch
20.2.6. Starting and Stopping the Service
20.3. Additional Resources
20.3.1. Installed Documentation
21. Automatic Bug Reporting Tool (ABRT)
21.1. Overview
21.2. Installing ABRT and Starting its Services
21.3. Running ABRT
21.3.1. Using the Graphical User Interface
21.3.2. Using the Command Line Interface
21.4. Configuring ABRT
21.4.1. ABRT Events
21.4.2. Standard ABRT Installation Supported Events
21.4.3. Event Configuration in ABRT GUI
21.4.4. ABRT Specific Configuration
21.4.5. Configuring Automatic Reporting
21.4.6. Uploading and reporting using a proxy server
21.5. Configuring Centralized Crash Collection
21.5.1. Configuration Steps Required on a Dedicated System
21.5.2. Configuration Steps Required on a Client System
21.5.3. Saving Package Information
21.5.4. Testing ABRT's Crash Detection
22. OProfile
22.1. Overview of Tools
22.2. Configuring OProfile
22.2.1. Specifying the Kernel
22.2.2. Setting Events to Monitor
22.2.3. Separating Kernel and User-space Profiles
22.3. Starting and Stopping OProfile
22.4. Saving Data
22.5. Analyzing the Data
22.5.1. Using opreport
22.5.2. Using opreport on a Single Executable
22.5.3. Getting more detailed output on the modules
22.5.4. Using opannotate
22.6. Understanding /dev/oprofile/
22.7. Example Usage
22.8. OProfile Support for Java
22.8.1. Profiling Java Code
22.9. Graphical Interface
22.10. OProfile and SystemTap
22.11. Additional Resources
22.11.1. Installed Docs
22.11.2. Useful Websites
VII. Kernel, Module and Driver Configuration
23. Manually Upgrading the Kernel
23.1. Overview of Kernel Packages
23.2. Preparing to Upgrade
23.3. Downloading the Upgraded Kernel
23.4. Performing the Upgrade
23.5. Verifying the Initial RAM Disk Image
23.6. Verifying the Boot Loader
23.6.1. Configuring the GRUB 2 Boot Loader
23.6.2. Configuring the OS/400 Boot Loader
23.6.3. Configuring the YABOOT Boot Loader
24. Working with Kernel Modules
24.1. Listing Currently-Loaded Modules
24.2. Displaying Information About a Module
24.3. Loading a Module
24.4. Unloading a Module
24.5. Setting Module Parameters
24.6. Persistent Module Loading
24.7. Specific Kernel Module Capabilities
24.7.1. Using Multiple Ethernet Cards
24.7.2. Using Channel Bonding
24.8. Additional Resources
24.8.1. Installed Documentation
24.8.2. Useful Websites
25. The kdump Crash Recovery Service
25.1. Installing the kdump Service
25.2. Configuring the kdump Service
25.2.1. Configuring the kdump at First Boot
25.2.2. Using the Kernel Dump Configuration Utility
25.2.3. Configuring kdump on the Command Line
25.2.4. Testing the Configuration
25.3. Analyzing the Core Dump
25.3.1. Running the crash Utility
25.3.2. Displaying the Message Buffer
25.3.3. Displaying a Backtrace
25.3.4. Displaying a Process Status
25.3.5. Displaying Virtual Memory Information
25.3.6. Displaying Open Files
25.3.7. Exiting the Utility
25.4. Additional Resources
25.4.1. Installed Documentation
25.4.2. Useful Websites
A. Consistent Network Device Naming
A.1. System Requirements
A.2. Enabling and Disabling the Feature
A.3. Notes for Administrators
B. RPM
B.1. RPM Design Goals
B.2. Using RPM
B.2.1. Finding RPM Packages
B.2.2. Installing and Upgrading
B.2.3. Configuration File Changes
B.2.4. Uninstalling
B.2.5. Freshening
B.2.6. Querying
B.2.7. Verifying
B.3. Checking a Package's Signature
B.3.1. Importing Keys
B.3.2. Verifying Signature of Packages
B.4. Practical and Common Examples of RPM Usage
B.5. Additional Resources
B.5.1. Installed Documentation
B.5.2. Useful Websites
B.5.3. Related Books
C. The X Window System
C.1. The X Server
C.2. Desktop Environments and Window Managers
C.2.1. Desktop Environments
C.2.2. Window Managers
C.3. X Server Configuration Files
C.3.1. The Structure of the Configuration
C.3.2. The xorg.conf.d Directory
C.3.3. The xorg.conf File
C.4. Fonts
C.4.1. Adding Fonts to Fontconfig
C.5. Runlevels and X
C.5.1. Runlevel 3
C.5.2. Runlevel 5
C.6. Additional Resources
C.6.1. Installed Documentation
C.6.2. Useful Websites
D. The sysconfig Directory
D.1. Files in the /etc/sysconfig/ Directory
D.1.1. /etc/sysconfig/arpwatch
D.1.2. /etc/sysconfig/authconfig
D.1.3. /etc/sysconfig/autofs
D.1.4. /etc/sysconfig/clock
D.1.5. /etc/sysconfig/dhcpd
D.1.6. /etc/sysconfig/firstboot
D.1.7. /etc/sysconfig/i18n
D.1.8. /etc/sysconfig/init
D.1.9. /etc/sysconfig/ip6tables-config
D.1.10. /etc/sysconfig/keyboard
D.1.11. /etc/sysconfig/ldap
D.1.12. /etc/sysconfig/named
D.1.13. /etc/sysconfig/network
D.1.14. /etc/sysconfig/quagga
D.1.15. /etc/sysconfig/radvd
D.1.16. /etc/sysconfig/samba
D.1.17. /etc/sysconfig/selinux
D.1.18. /etc/sysconfig/sendmail
D.1.19. /etc/sysconfig/spamassassin
D.1.20. /etc/sysconfig/squid
D.1.21. /etc/sysconfig/system-config-users
D.1.22. /etc/sysconfig/vncservers
D.1.23. /etc/sysconfig/xinetd
D.2. Directories in the /etc/sysconfig/ Directory
D.3. Additional Resources
D.3.1. Installed Documentation
E. The proc File System
E.1. A Virtual File System
E.1.1. Viewing Virtual Files
E.1.2. Changing Virtual Files
E.2. Top-level Files within the proc File System
E.2.1. /proc/buddyinfo
E.2.2. /proc/cmdline
E.2.3. /proc/cpuinfo
E.2.4. /proc/crypto
E.2.5. /proc/devices
E.2.6. /proc/dma
E.2.7. /proc/execdomains
E.2.8. /proc/fb
E.2.9. /proc/filesystems
E.2.10. /proc/interrupts
E.2.11. /proc/iomem
E.2.12. /proc/ioports
E.2.13. /proc/kcore
E.2.14. /proc/kmsg
E.2.15. /proc/loadavg
E.2.16. /proc/locks
E.2.17. /proc/mdstat
E.2.18. /proc/meminfo
E.2.19. /proc/misc
E.2.20. /proc/modules
E.2.21. /proc/mounts
E.2.22. /proc/mtrr
E.2.23. /proc/partitions
E.2.24. /proc/slabinfo
E.2.25. /proc/stat
E.2.26. /proc/swaps
E.2.27. /proc/sysrq-trigger
E.2.28. /proc/uptime
E.2.29. /proc/version
E.3. Directories within /proc/
E.3.1. Process Directories
E.3.2. /proc/bus/
E.3.3. /proc/bus/pci
E.3.4. /proc/driver/
E.3.5. /proc/fs
E.3.6. /proc/irq/
E.3.7. /proc/net/
E.3.8. /proc/scsi/
E.3.9. /proc/sys/
E.3.10. /proc/sysvipc/
E.3.11. /proc/tty/
E.3.12. /proc/PID/
E.4. Using the sysctl Command
E.5. References
F. Revision History
Index