Copyright

Linux is a trademark of Linus Torvalds RedHat is a trademark of RedHat Software Inc.

Windows and DOS are trademarks of Microsoft Corp.

Sound Blaster is a trademark of Creative Labs

PostScript is a trademark of Adobe

File System Structure

Why Share a Common Structure?
Overview of File System Hierarchy Standard (FHS)
FHS Organization
Special File Locations Under Community Enterprise Linux

The ext3 File System

Features of ext3
Creating an ext3 File System
Converting to an ext3 File System
Reverting to an ext2 File System

The default file system is the journaling ext3 file system.

Redundant Array of Independent Disks (RAID)

What is RAID?
Who Should Use RAID?
Hardware RAID versus Software RAID
RAID Levels and Linear Support
Configuring Software RAID
Creating the RAID Partitions
Creating the RAID Devices and Mount Points
Managing Software RAID
Reviewing RAID Configuration
Creating a New RAID Device
Replacing a Faulty Device
Extending a RAID Device
Removing a RAID Device
Preserving the Configuration
Additional Resources
Installed Documentation

The basic idea behind RAID is to combine multiple small, inexpensive disk drives into an array to accomplish performance or redundancy goals not attainable with one large and expensive drive. This array of drives appears to the computer as a single logical storage unit or drive.

Swap Space

What is Swap Space?
Adding Swap Space
Extending Swap on an LVM2 Logical Volume
Creating an LVM2 Logical Volume for Swap
Creating a Swap File
Removing Swap Space
Reducing Swap on an LVM2 Logical Volume
Removing an LVM2 Logical Volume for Swap
Removing a Swap File
Moving Swap Space

Managing Disk Storage

Standard Partitions using parted
Viewing the Partition Table
Creating a Partition
Removing a Partition
Resizing a Partition
LVM Partition Management

Implementing Disk Quotas

Configuring Disk Quotas
Enabling Quotas
Remounting the File Systems
Creating the Quota Database Files
Assigning Quotas per User
Assigning Quotas per Group
Setting the Grace Period for Soft Limits
Managing Disk Quotas
Enabling and Disabling
Reporting on Disk Quotas
Keeping Quotas Accurate
Additional Resources
Installed Documentation
Related Books

Disk space can be restricted by implementing disk quotas which alert a system administrator before a user consumes too much disk space or a partition becomes full.

Disk quotas can be configured for individual users as well as user groups. This makes it possible to manage the space allocated for user-specific files (such as email) separately from the space allocated to the projects a user works on (assuming the projects are given their own groups).

In addition, quotas can be set not just to control the number of disk blocks consumed but to control the number of inodes (data structures that contain information about files in UNIX file systems). Because inodes are used to contain file-related information, this allows control over the number of files that can be created.

The quota RPM must be installed to implement disk quotas.

Note

For more information on installing RPM packages, refer to Part II, "Package Management".

Access Control Lists

Mounting File Systems
NFS
Setting Access ACLs
Setting Default ACLs
Retrieving ACLs
Archiving File Systems With ACLs
Compatibility with Older Systems
Additional Resources
Installed Documentation
Useful Websites

Files and directories have permission sets for the owner of the file, the group associated with the file, and all other users for the system. However, these permission sets have limitations. For example, different permissions cannot be configured for different users. Thus, Access Control Lists (ACLs) were implemented.

The Community Enterprise Operating System kernel provides ACL support for the ext3 file system and NFS-exported file systems. ACLs are also recognized on ext3 file systems accessed via Samba.

Along with support in the kernel, the acl package is required to implement ACLs. It contains the utilities used to add, modify, remove, and retrieve ACL information.

The cp and mv commands copy or move any ACLs associated with files and directories.

LVM (Logical Volume Manager)

What is LVM?
What is LVM2?
LVM Configuration
Automatic Partitioning
Manual LVM Partitioning
Creating the /boot Partition
Creating the LVM Physical Volumes
Creating the LVM Volume Groups
Creating the LVM Logical Volumes
Using the LVM utility system-config-lvm
Utilizing uninitialized entities
Adding Unallocated Volumes to a volume group
Migrating extents
Adding a new hard disk using LVM
Adding a new volume group
Extending a volume group
Editing a Logical Volume
Additional Resources
Installed Documentation
Useful Websites

Package Management with RPM

RPM Design Goals
Using RPM
Finding RPM Packages
Installing
Uninstalling
Upgrading
Freshening
Querying
Verifying
Checking a Package's Signature
Importing Keys
Verifying Signature of Packages
Practical and Common Examples of RPM Usage
Additional Resources
Installed Documentation
Useful Websites
Related Books

The RPM Package Manager (RPM) is an open packaging system, which runs on Community Enterprise Linux as well as other Linux and UNIX systems. CentOS, Inc. encourages other vendors to use RPM for their own products. RPM is distributed under the terms of the GPL.

The utility works only with packages built for processing by the rpm package. For the end user, RPM makes system updates easy. Installing, uninstalling, and upgrading RPM packages can be accomplished with short commands. RPM maintains a database of installed packages and their files, so you can invoke powerful queries and verifications on your system. If you prefer a graphical interface, you can use the Package Management Tool to perform many RPM commands. Refer to Chapter 12, Package Management Tool for details.

Important

When installing a package, please ensure it is compatible with your operating system and architecture. This can usually be determined by checking the package name.

During upgrades, RPM handles configuration files carefully, so that you never lose your customizations - something that you cannot accomplish with regular .tar.gz files.

For the developer, RPM allows you to take software source code and package it into source and binary packages for end users. This process is quite simple and is driven from a single file and optional patches that you create. This clear delineation between pristine sources and your patches along with build instructions eases the maintenance of the package as new versions of the software are released.

Note

Because RPM makes changes to your system, you must be logged in as root to install, remove, or upgrade an RPM package.

YUM (Yellowdog Updater Modified)

Setting Up a Yum Repository
yum Commands
yum Options
Configuring yum
[main] Options
[repository] Options
Useful yum Variables

Yellowdog Update, Modified (YUM) is a package manager that was developed by Duke University to improve the installation of RPMs. yum searches numerous repositories for packages and their dependencies so they may be installed together in an effort to alleviate dependency issues. Community Enterprise Operating System.8 uses yum to fetch packages and install RPMs.

up2date is now deprecated in favor of yum (Yellowdog Updater Modified). The entire stack of tools which installs and updates software in Community Enterprise Operating System.8 is now based on yum. This includes everything, from the initial installation via Anaconda to host software management tools like pirut.

yum also allows system administrators to configure a local (i.e. available over a local network) repository to supplement packages provided by CentOS. This is useful for user groups that use applications and packages that are not officially supported by CentOS.

Aside from being able to supplement available packages for local users, using a local yum repository also saves bandwidth for the entire network. Further, clients that use local yum repositories do not need to be registered individually to install or update the latest packages from CentOS Network.

Product Subscriptions and Entitlements

An Overview of Managing Subscriptions and Content
The Purpose of Subscription Management
Defining Subscriptions, Entitlements, and Products
Subscription Management Tools
Subscription and Content Architecture
Advanced Content Management: Extended Update Support
RHN Classic v. Certificate-based CentOS Network
Using CentOS Subscription Manager Tools
Launching CentOS Subscription Manager
About subscription-manager
Looking at RHN Subscription Management
Looking at Subscription Asset Manager
Managing Special Deployment Scenarios
Local Subscription Services, Local Content Providers, and Multi-Tenant Organizations
Virtual Guests and Hosts
Domains
Registering, Unregistering, and Reregistering a System
Registering Consumers in the Hosted Environment
Registering Consumers to a Local Organization
Registering an Offline Consumer
Registering from the Command Line
Unregistering
Restoring a Registration
Migrating Systems from RHN Classic to Certificate-based CentOS Network
Installing the Migration Tools
Migrating from RHN Classic to Certificate-based CentOS Network
Unregistering from RHN Classic Only
Migrating a Disconnected System
Looking at Channel and Certificate Mappings
Handling Subscriptions
Subscribing and Unsubscribing through the CentOS Subscription Manager GUI
Handling Subscriptions through the Command Line
Stacking Subscriptions
Manually Adding a New Subscription
Redeeming Subscriptions on a Machine
Redeeming Subscriptions through the GUI
Redeeming Subscriptions on a Machine through the Command Line
Viewing Available and Used Subscriptions
Viewing Subscriptions in the GUI
Listing Subscriptions with the Command Line
Viewing Subscriptions Used in Both RHN Classic and Certificate-based CentOS Network
Working with Subscription yum Repos
Responding to Subscription Notifications
Healing Subscriptions
Enabling Healing
Changing the Healing Check Frequency
Working with Subscription Asset Manager
Configuring Subscription Manager to Work with Subscription Asset Manager
Viewing Organization Information
Updating Entitlements Certificates
Updating Entitlement Certificates
Updating Subscription Information
Configuring the Subscription Service
CentOS Subscription Manager Configuration Files
Using the config Command
Using an HTTP Proxy
Changing the Subscription Server
Configuring CentOS Subscription Manager to Use a Local Content Provider
Managing Secure Connections to the Subscription Server
Starting and Stopping the Subscription Service
Checking Logs
Showing and Hiding Incompatible Subscriptions
Checking and Adding System Facts
Regenerating Identity Certificates
Getting the System UUID
Viewing Package Profiles
Retrieving the Consumer ID, Registration Tokens, and Other Information
About Certificates and Managing Entitlements
The Structure of Identity Certificates
The Structure of Entitlement Certificates
The Structure of Product Certificates
Anatomy of Satellite Certificates

Effective asset management requires a mechanism to handle the software inventory - both the type of products and the number of systems that the software is installed on. The subscription service provides that mechanism and gives transparency into both global allocations of subscriptions for an entire organization and the specific subscriptions assigned to a single system.

CentOS Subscription Manager works with yum to unit content delivery with subscription management. The Subscription Manager handles only the subscription-system associations. yum or other package management tools handle the actual content delivery. Chapter 13, YUM (Yellowdog Updater Modified) describes how to use yum.

This chapter provides an overview of subscription management in Community Enterprise Linux and the CentOS Subscription Manager tools which are available.

Network Interfaces

Network Configuration Files
Interface Configuration Files
Ethernet Interfaces
IPsec Interfaces
Channel Bonding Interfaces
Alias and Clone Files
Dialup Interfaces
Other Interfaces
Interface Control Scripts
Configuring Static Routes
Network Function Files
Additional Resources
Installed Documentation

Under Community Enterprise Linux, all network communications occur between configured software interfaces and physical networking devices connected to the system.

The configuration files for network interfaces are located in the /etc/sysconfig/network-scripts/ directory. The scripts used to activate and deactivate these network interfaces are also located here. Although the number and type of interface files can differ from system to system, there are three categories of files that exist in this directory:

  1. Interface configuration files

It can also be used to configure IPsec connections, manage DNS settings, and manage the /etc/hosts file used to store additional hostnames and IP address combinations.

To use the Network Administration Tool, you must have root privileges. To start the application, go to the Applications (the main menu on the panel) > System Settings > Network, or type the command system-config-network at a shell prompt (for example, in an XTerm or a GNOME terminal). If you type the command, the graphical version is displayed if X is running; otherwise, the text-based version is displayed.

To use the command line version, execute the command system-config-network-cmd --help as root to view all of the options.

Network Administration Tool

Main Window

Figure 16.1. Network Administration Tool

Tip

Use the CentOS Hardware Compatibility List (http://hardware.redhat.com/hcl/) to determine if Community Enterprise Linux supports your hardware device.

Controlling Access to Services

Runlevels
TCP Wrappers
xinetd
Services Configuration Tool
ntsysv
chkconfig
Additional Resources
Installed Documentation
Useful Websites

Maintaining security on your system is extremely important, and one approach for this task is to manage access to system services carefully. Your system may need to provide open access to particular services (for example, httpd if you are running a Web server). However, if you do not need to provide a service, you should turn it off to minimize your exposure to possible bug exploits.

There are several different methods for managing access to system services. Choose which method of management to use based on the service, your system's configuration, and your level of Linux expertise.

The easiest way to deny access to a service is to turn it off. Both the services managed by xinetd and the services in the /etc/rc.d/init.d hierarchy (also known as SysV services) can be configured to start or stop using three different applications:

Services Configuration Tool

This is a graphical application that displays a description of each service, displays whether each service is started at boot time (for runlevels 3, 4, and 5), and allows services to be started, stopped, and restarted.

ntsysv

This is a text-based application that allows you to configure which services are started at boot time for each runlevel. Non-xinetd services can not be started, stopped, or restarted using this program.

chkconfig

This is a command line utility that allows you to turn services on and off for the different runlevels. Non-xinetd services can not be started, stopped, or restarted using this utility.

You may find that these tools are easier to use than the alternatives - editing the numerous symbolic links located in the directories below /etc/rc.d by hand or editing the xinetd configuration files in /etc/xinetd.d.

Another way to manage access to system services is by using iptables to configure an IP firewall. If you are a new Linux user, note that iptables may not be the best solution for you. Setting up iptables can be complicated, and is best tackled by experienced Linux system administrators.

On the other hand, the benefit of using iptables is flexibility. For example, if you need a customized solution which provides certain hosts access to certain services, iptables can provide it for you. Refer to Section 46.8.1, "Netfilter and IPTables" and Section 46.8.3, "Using IPTables" for more information about iptables.

Alternatively, if you are looking for a utility to set general access rules for your home machine, and/or if you are new to Linux, try the Security Level Configuration Tool (system-config-securitylevel), which allows you to select the security level for your system, similar to the Firewall Configuration screen in the installation program.

Refer to Section 46.8, "Firewalls" for more information.

Important

When you allow access for new services, always remember that both the firewall and SELinux need to be configured as well. One of the most common mistakes committed when configuring a new service is neglecting to implement the necessary firewall configuration and SELinux policies to allow access for it. Refer to Section 46.8.2, "Basic Firewall Configuration" for more information.

Berkeley Internet Name Domain (BIND)

Introduction to DNS
Nameserver Zones
Nameserver Types
BIND as a Nameserver
/etc/named.conf
Common Statement Types
Other Statement Types
Comment Tags
Zone Files
Zone File Directives
Zone File Resource Records
Example Zone File
Reverse Name Resolution Zone Files
Using rndc
Configuring /etc/named.conf
Configuring /etc/rndc.conf
Command Line Options
Advanced Features of BIND
DNS Protocol Enhancements
Multiple Views
Security
IP version 6
Common Mistakes to Avoid
Additional Resources
Installed Documentation
Useful Websites
Related Books

On most modern networks, including the Internet, users locate other computers by name. This frees users from the daunting task of remembering the numerical network address of network resources. The most effective way to configure a network to allow such name-based connections is to set up a Domain Name Service (DNS) or a nameserver, which resolves hostnames on the network to numerical addresses and vice versa.

This chapter reviews the nameserver included in Community Enterprise Linux and the Berkeley Internet Name Domain (BIND) DNS server, with an emphasis on the structure of its configuration files and how it may be administered both locally and remotely.

Note

BIND is also known as the service named in Community Enterprise Linux. You can manage it via the Services Configuration Tool (system-config-service).

OpenSSH

Features of SSH
Why Use SSH?
SSH Protocol Versions
Event Sequence of an SSH Connection
Transport Layer
Authentication
Channels
Configuring an OpenSSH Server
Requiring SSH for Remote Connections
OpenSSH Configuration Files
Configuring an OpenSSH Client
Using the ssh Command
Using the scp Command
Using the sftp Command
More Than a Secure Shell
X11 Forwarding
Port Forwarding
Generating Key Pairs
Additional Resources
Installed Documentation
Useful Websites

SSH™ (or Secure SHell) is a protocol which facilitates secure communications between two systems using a client/server architecture and allows users to log into server host systems remotely. Unlike other remote communication protocols, such as FTP or Telnet, SSH encrypts the login session, rendering the connection difficult for intruders to collect unencrypted passwords.

SSH is designed to replace older, less secure terminal applications used to log into remote hosts, such as telnet or rsh. A related program called scp replaces older programs designed to copy files between hosts, such as rcp. Because these older applications do not encrypt passwords transmitted between the client and the server, avoid them whenever possible. Using secure methods to log into remote systems decreases the risks for both the client system and the remote host.

Network File System (NFS)

How It Works
Required Services
NFS Client Configuration
Mounting NFS File Systems using /etc/fstab
autofs
What's new in autofs version 5?
autofs Configuration
autofs Common Tasks
Common NFS Mount Options
Starting and Stopping NFS
NFS Server Configuration
Exporting or Sharing NFS File Systems
Command Line Configuration
Running NFS Behind a Firewall
Hostname Formats
The /etc/exports Configuration File
The exportfs Command
Securing NFS
Host Access
File Permissions
NFS and portmap
Troubleshooting NFS and portmap
Using NFS over TCP
Additional Resources
Installed Documentation
Useful Websites
Related Books

A Network File System (NFS) allows remote hosts to mount file systems over a network and interact with those file systems as though they are mounted locally. This enables system administrators to consolidate resources onto centralized servers on the network.

This chapter focuses on fundamental NFS concepts and supplemental information.

Samba

Introduction to Samba
Samba Features
Samba Daemons and Related Services
Samba Daemons
Connecting to a Samba Share
Command Line
Mounting the Share
Configuring a Samba Server
Graphical Configuration
Command Line Configuration
Encrypted Passwords
Starting and Stopping Samba
Samba Server Types and the smb.conf File
Stand-alone Server
Domain Member Server
Domain Controller
Samba Security Modes
User-Level Security
Share-Level Security
Samba Account Information Databases
Samba Network Browsing
Domain Browsing
WINS (Windows Internetworking Name Server)
Samba with CUPS Printing Support
Simple smb.conf Settings
Samba Distribution Programs
Additional Resources
Installed Documentation
Related Books
Useful Websites

Samba is an open source implementation of the Server Message Block (SMB) protocol. It allows the networking of Microsoft Windows, Linux, UNIX, and other operating systems together, enabling access to Windows-based file and printer shares. Samba's use of SMB allows it to appear as a Windows server to Windows clients.

Dynamic Host Configuration Protocol (DHCP)

Why Use DHCP?
Configuring a DHCP Server
Configuration File
Lease Database
Starting and Stopping the Server
DHCP Relay Agent
Configuring a DHCP Client
Configuring a Multihomed DHCP Server
Host Configuration
Additional Resources
Installed Documentation

Dynamic Host Configuration Protocol (DHCP) is a network protocol that automatically assigns TCP/IP information to client machines. Each DHCP client connects to the centrally located DHCP server, which returns that client's network configuration (including the IP address, gateway, and DNS servers).

Apache HTTP Server

Apache HTTP Server 2.2
Features of Apache HTTP Server 2.2
Migrating Apache HTTP Server Configuration Files
Migrating Apache HTTP Server 2.0 Configuration Files
Migrating Apache HTTP Server 1.3 Configuration Files to 2.0
Starting and Stopping httpd
Apache HTTP Server Configuration
Basic Settings
Default Settings
Configuration Directives in httpd.conf
General Configuration Tips
Configuration Directives for SSL
MPM Specific Server-Pool Directives
Adding Modules
Virtual Hosts
Setting Up Virtual Hosts
Apache HTTP Secure Server Configuration
An Overview of Security-Related Packages
An Overview of Certificates and Security
Using Pre-Existing Keys and Certificates
Types of Certificates
Generating a Key
How to configure the server to use the new key
Additional Resources
Useful Websites

The Apache HTTP Server is a robust, commercial-grade open source Web server developed by the Apache Software Foundation (http://www.apache.org/). Community Enterprise Linux includes the Apache HTTP Server 2.2 as well as a number of server modules designed to enhance its functionality.

The default configuration file installed with the Apache HTTP Server works without alteration for most situations. This chapter outlines many of the directives found within its configuration file (/etc/httpd/conf/httpd.conf) to aid those who require a custom configuration or need to convert a configuration file from the older Apache HTTP Server 1.3 format.

Warning

If using the graphical HTTP Configuration Tool (system-config-httpd ), do not hand edit the Apache HTTP Server's configuration file as the HTTP Configuration Tool regenerates this file whenever it is used.

FTP

The File Transfer Protocol
Multiple Ports, Multiple Modes
FTP Servers
vsftpd
Files Installed with vsftpd
Starting and Stopping vsftpd
Starting Multiple Copies of vsftpd
vsftpd Configuration Options
Daemon Options
Log In Options and Access Controls
Anonymous User Options
Local User Options
Directory Options
File Transfer Options
Logging Options
Network Options
Additional Resources
Installed Documentation
Useful Websites

File Transfer Protocol (FTP) is one of the oldest and most commonly used protocols found on the Internet today. Its purpose is to reliably transfer files between computer hosts on a network without requiring the user to log directly into the remote host or have knowledge of how to use the remote system. It allows users to access files on remote systems using a standard set of simple commands.

This chapter outlines the basics of the FTP protocol, as well as configuration options for the primary FTP server shipped with Community Enterprise Linux, vsftpd.

Email

Email Protocols
Mail Transport Protocols
Mail Access Protocols
Email Program Classifications
Mail Transport Agent
Mail Delivery Agent
Mail User Agent
Mail Transport Agents
Sendmail
Postfix
Fetchmail
Mail Transport Agent (MTA) Configuration
Mail Delivery Agents
Procmail Configuration
Procmail Recipes
Mail User Agents
Securing Communication
Additional Resources
Installed Documentation
Useful Websites
Related Books

The birth of electronic mail (email) occurred in the early 1960s. The mailbox was a file in a user's home directory that was readable only by that user. Primitive mail applications appended new text messages to the bottom of the file, making the user wade through the constantly growing file to find any particular message. This system was only capable of sending messages to users on the same system.

The first network transfer of an electronic mail message file took place in 1971 when a computer engineer named Ray Tomlinson sent a test message between two machines via ARPANET - the precursor to the Internet. Communication via email soon became very popular, comprising 75 percent of ARPANET's traffic in less than two years.

Today, email systems based on standardized network protocols have evolved into some of the most widely used services on the Internet. Community Enterprise Linux offers many advanced applications to serve and access email.

This chapter reviews modern email protocols in use today and some of the programs designed to send and receive email.

Lightweight Directory Access Protocol (LDAP)

Why Use LDAP?
OpenLDAP Features
LDAP Terminology
OpenLDAP Daemons and Utilities
NSS, PAM, and LDAP
PHP4, LDAP, and the Apache HTTP Server
LDAP Client Applications
OpenLDAP Configuration Files
The /etc/openldap/schema/ Directory
OpenLDAP Setup Overview
Editing /etc/openldap/slapd.conf
Configuring a System to Authenticate Using OpenLDAP
PAM and LDAP
Migrating Old Authentication Information to LDAP Format
Migrating Directories from Earlier Releases
Additional Resources
Installed Documentation
Useful Websites
Related Books

The Lightweight Directory Access Protocol (LDAP) is a set of open protocols used to access centrally stored information over a network. It is based on the X.500 standard for directory sharing, but is less complex and resource-intensive. For this reason, LDAP is sometimes referred to as "X.500 Lite." The X.500 standard is a directory that contains hierarchical and categorized information, which could include information such as names, addresses, and phone numbers.

Like X.500, LDAP organizes information in a hierarchal manner using directories. These directories can store a variety of information and can even be used in a manner similar to the Network Information Service (NIS), enabling anyone to access their account from any machine on the LDAP enabled network.

In many cases, LDAP is used as a virtual phone directory, allowing users to easily access contact information for other users. But LDAP is more flexible than a traditional phone directory, as it is capable of referring a querent to other LDAP servers throughout the world, providing an ad-hoc global repository of information. Currently, however, LDAP is more commonly used within individual organizations, like universities, government departments, and private companies.

LDAP is a client/server system. The server can use a variety of databases to store a directory, each optimized for quick and copious read operations. When an LDAP client application connects to an LDAP server, it can either query a directory or attempt to modify it. In the event of a query, the server either answers the query locally, or it can refer the querent to an LDAP server which does have the answer. If the client application is attempting to modify information within an LDAP directory, the server verifies that the user has permission to make the change and then adds or updates the information.

This chapter refers to the configuration and use of OpenLDAP 2.0, an open source implementation of the LDAPv2 and LDAPv3 protocols.

Authentication Configuration

User Information
Authentication
Options
Command Line Version

When a user logs in to a Community Enterprise Linux system, the username and password combination must be verified, or authenticated, as a valid and active user. Sometimes the information to verify the user is located on the local system, and other times the system defers the authentication to a user database on a remote system.

The Authentication Configuration Tool provides a graphical interface for configuring user information retrieval from NIS, LDAP, and Hesiod servers. This tool also allows you to configure LDAP, Kerberos, and SMB as authentication protocols.

Note

If you configured a medium or high security level during installation (or with the Security Level Configuration Tool), then the firewall will prevent NIS (Network Information Service) authentication.

This chapter does not explain each of the different authentication types in detail. Instead, it explains how to use the Authentication Configuration Tool to configure them.

To start the graphical version of the Authentication Configuration Tool from the desktop, select the System (on the panel) > Administration > Authentication or type the command system-config-authentication at a shell prompt (for example, in an XTerm or a GNOME terminal).

Important

After exiting the authentication program, the changes made take effect immediately.

Using and Caching Credentials with SSSD

About the sssd.conf File
Starting and Stopping SSSD
Configuring Services
Configuring the NSS Service
Configuring the PAM Service
Creating Domains
General Rules and Options for Configuring a Domain
Configuring an LDAP Domain
Configuring Kerberos Authentication with a Domain
Configuring a Proxy Domain
Configuring Access Control for SSSD Domains
Using the Simple Access Provider
Using the LDAP Access Filter
Configuring Domain Failover
Configuring Failover
Using SRV Records with Failover
Deleting Domain Cache Files
Using NSCD with SSSD
Troubleshooting SSSD
Using SSSD Log Files
Problems with SSSD Configuration

The System Security Services Daemon (SSSD) provides access to different identity and authentication providers. SSSD is an intermediary between local clients and any configured data store. The local clients connect to SSSD and then SSSD contacts the external providers. This brings a number of benefits for administrators:

The System Security Services Daemon does not require any additional configuration or tuning to work with the Authentication Configuration Tool. However, SSSD can work with other applications, and the daemon may require configuration changes to improve the performance of those applications.

Console Access

Disabling Shutdown Via Ctrl+Alt+Del
Disabling Console Program Access
Defining the Console
Making Files Accessible From the Console
Enabling Console Access for Other Applications
The floppy Group

When normal (non-root) users log into a computer locally, they are given two types of special permissions:

  1. They can run certain programs that they would otherwise be unable to run.

The X Window System

The X11R7.1 Release
Desktop Environments and Window Managers
Desktop Environments
Window Managers
X Server Configuration Files
xorg.conf
Fonts
Fontconfig
Core X Font System
Runlevels and X
Runlevel 3
Runlevel 5
Additional Resources
Installed Documentation
Useful Websites

While the heart of Community Enterprise Linux is the kernel, for many users, the face of the operating system is the graphical environment provided by the X Window System, also called X.

Other windowing environments have existed in the UNIX world, including some that predate the release of the X Window System in June 1984. Nonetheless, X has been the default graphical environment for most UNIX-like operating systems, including Community Enterprise Linux, for many years.

The graphical environment for Community Enterprise Linux is supplied by the X.Org Foundation, an open source organization created to manage development and strategy for the X Window System and related technologies. X.Org is a large-scale, rapidly developing project with hundreds of developers around the world. It features a wide degree of support for a variety of hardware devices and architectures, and can run on a variety of different operating systems and platforms. This release for Community Enterprise Linux specifically includes the X11R7.1 release of the X Window System.

The X Window System uses a client-server architecture. The X server (the Xorg binary) listens for connections from X client applications via a network or local loopback interface. The server communicates with the hardware, such as the video card, monitor, keyboard, and mouse. X client applications exist in the user-space, creating a graphical user interface (GUI) for the user and passing user requests to the X server.

X Window System Configuration

Display Settings
Display Hardware Settings
Dual Head Display Settings

During installation, the system's monitor, video card, and display settings are configured. To change any of these settings after installation, use the X Configuration Tool.

To start the X Configuration Tool, go to System (on the panel) > Administration > Display, or type the command system-config-display at a shell prompt (for example, in an XTerm or GNOME terminal). If the X Window System is not running, a small version of X is started to run the program.

After changing any of the settings, log out of the graphical desktop and log back in to enable the changes.

Users and Groups

User and Group Configuration
Adding a New User
Modifying User Properties
Adding a New Group
Modifying Group Properties
User and Group Management Tools
Command Line Configuration
Adding a User
Adding a Group
Password Aging
Explaining the Process
Standard Users
Standard Groups
User Private Groups
Group Directories
Shadow Passwords
Additional Resources
Installed Documentation

The control of users and groups is a core element of Community Enterprise Linux system administration.

Users can be either people (meaning accounts tied to physical users) or accounts which exist for specific applications to use.

Groups are logical expressions of organization, tying users together for a common purpose. Users within a group can read, write, or execute files owned by that group.

Each user and group has a unique numerical identification number called a userid (UID) and a groupid (GID), respectively.

A user who creates a file is also the owner and group owner of that file. The file is assigned separate read, write, and execute permissions for the owner, the group, and everyone else. The file owner can be changed only by the root user, and access permissions can be changed by both the root user and file owner.

Community Enterprise Linux also supports access control lists (ACLs) for files and directories which allow permissions for specific users outside of the owner to be set. For more information about ACLs, refer to Chapter 9, Access Control Lists.

Printer Configuration

Adding a Local Printer
Adding an IPP Printer
Adding a Samba (SMB) Printer
Adding a JetDirect Printer
Selecting the Printer Model and Finishing
Confirming Printer Configuration
Printing a Test Page
Modifying Existing Printers
The Settings Tab
The Policies Tab
The Access Control Tab
The Printer and Job OptionsTab
Managing Print Jobs
Additional Resources
Installed Documentation
Useful Websites

Printer Configuration Tool allows users to configure a printer. This tool helps maintain the printer configuration file, print spool directories, print filters, and printer classes.

Community Enterprise Operating System.8 uses the Common Unix Printing System (CUPS). If a system was upgraded from a previous Community Enterprise Linux version that used CUPS, the upgrade process preserves the configured queues.

Using Printer Configuration Tool requires root privileges. To start the application, select System (on the panel) > Administration > Printing, or type the command system-config-printer at a shell prompt.

Printer Configuration Tool

Main window

Figure 36.1. Printer Configuration Tool

The following types of print queues can be configured:

Important

If you add a new print queue or modify an existing one, you must apply the changes for them to take effect.

Clicking the Apply button prompts the printer daemon to restart with the changes you have configured.

Clicking the Revert button discards unapplied changes.

Automated Tasks

Cron
Configuring Cron Tasks
Controlling Access to Cron
Starting and Stopping the Service
At and Batch
Configuring At Jobs
Configuring Batch Jobs
Viewing Pending Jobs
Additional Command Line Options
Controlling Access to At and Batch
Starting and Stopping the Service
Additional Resources
Installed Documentation

In Linux, tasks can be configured to run automatically within a specified period of time, on a specified date, or when the system load average is below a specified number. Community Enterprise Linux is pre-configured to run important system tasks to keep the system updated. For example, the slocate database used by the locate command is updated daily. A system administrator can use automated tasks to perform periodic backups, monitor the system, run custom scripts, and more.

Community Enterprise Linux comes with several automated tasks utilities: cron, at, and batch.

Log Files

Locating Log Files
Viewing Log Files
Adding a Log File
Monitoring Log Files

Log files are files that contain messages about the system, including the kernel, services, and applications running on it. There are different log files for different information. For example, there is a default system log file, a log file just for security messages, and a log file for cron tasks.

Log files can be very useful when trying to troubleshoot a problem with the system such as trying to load a kernel driver or when looking for unauthorized log in attempts to the system. This chapter discusses where to find log files, how to view log files, and what to look for in log files.

Some log files are controlled by a daemon called syslogd. A list of log messages maintained by syslogd can be found in the /etc/syslog.conf configuration file.

SystemTap

Introduction
Implementation
Using SystemTap
Tracing

Gathering System Information

System Processes
Memory Usage
File Systems
Hardware
Additional Resources
Installed Documentation

Before you learn how to configure your system, you should learn how to gather essential system information. For example, you should know how to find the amount of free memory, the amount of available hard drive space, how your hard drive is partitioned, and what processes are running. This chapter discusses how to retrieve this type of information from your Community Enterprise Linux system using simple commands and a few simple programs.

OProfile

Overview of Tools
Configuring OProfile
Specifying the Kernel
Setting Events to Monitor
Separating Kernel and User-space Profiles
Starting and Stopping OProfile
Saving Data
Analyzing the Data
Using opreport
Using opreport on a Single Executable
Getting more detailed output on the modules
Using opannotate
Understanding /dev/oprofile/
Example Usage
Graphical Interface
Additional Resources
Installed Docs
Useful Websites

OProfile is a low overhead, system-wide performance monitoring tool. It uses the performance monitoring hardware on the processor to retrieve information about the kernel and executables on the system, such as when memory is referenced, the number of L2 cache requests, and the number of hardware interrupts received. On a Community Enterprise Linux system, the oprofile RPM package must be installed to use this tool.

Many processors include dedicated performance monitoring hardware. This hardware makes it possible to detect when certain events happen (such as the requested data not being in cache). The hardware normally takes the form of one or more counters that are incremented each time an event takes place. When the counter value, essentially rolls over, an interrupt is generated, making it possible to control the amount of detail (and therefore, overhead) produced by performance monitoring.

OProfile uses this hardware (or a timer-based substitute in cases where performance monitoring hardware is not present) to collect samples of performance-related data each time a counter generates an interrupt. These samples are periodically written out to disk; later, the data contained in these samples can then be used to generate reports on system-level and application-level performance.

OProfile is a useful tool, but be aware of some limitations when using it:

Manually Upgrading the Kernel

Overview of Kernel Packages
Preparing to Upgrade
Downloading the Upgraded Kernel
Performing the Upgrade
Verifying the Initial RAM Disk Image
Verifying the Boot Loader
x86 Systems
Itanium Systems
IBM S/390 and IBM System z Systems
IBM eServer iSeries Systems
IBM eServer pSeries Systems

The Community Enterprise Linux kernel is custom built by the Community Enterprise Linux kernel team to ensure its integrity and compatibility with supported hardware. Before CentOS releases a kernel, it must first pass a rigorous set of quality assurance tests.

Community Enterprise Linux kernels are packaged in RPM format so that they are easy to upgrade and verify using the Package Management Tool, or the yum command. The Package Management Tool automatically queries the Community Enterprise Linux servers and determines which packages need to be updated on your machine, including the kernel. This chapter is only useful for those individuals that require manual updating of kernel packages, without using the yum command.

Warning

Building a custom kernel is not supported by the CentOS Global Services Support team, and therefore is not explored in this manual.

Tip

The use of yum is highly recommended by CentOS for installing upgraded kernels.

For more information on CentOS Network, the Package Management Tool, and yum, refer to Chapter 14, Product Subscriptions and Entitlements.

General Parameters and Modules

Kernel Module Utilities
Persistent Module Loading
Specifying Module Parameters
Storage parameters
Ethernet Parameters
Using Multiple Ethernet Cards
The Channel Bonding Module
Additional Resources
Installed Documentation
Useful Websites

This chapter is provided to illustrate some of the possible parameters available for common hardware device drivers [9], which under Community Enterprise Linux are called kernel modules. In most cases, the default parameters do work. However, there may be times when extra module parameters are necessary for a device to function properly or to override the module's default parameters for the device.

During installation, Community Enterprise Linux uses a limited subset of device drivers to create a stable installation environment. Although the installation program supports installation on many different types of hardware, some drivers (including those for SCSI adapters and network adapters) are not included in the installation kernel. Rather, they must be loaded as modules by the user at boot time.

Once installation is completed, support exists for a large number of devices through kernel modules.

Important

CentOS provides a large number of unsupported device drivers in groups of packages called kernel-smp-unsupported-<kernel-version> and kernel-hugemem-unsupported-<kernel-version> . Replace <kernel-version> with the version of the kernel installed on the system. These packages are not installed by the Community Enterprise Linux installation program, and the modules provided are not supported by CentOS, Inc.

The kdump Crash Recovery Service

Configuring the kdump Service
Configuring the kdump at First Boot
Using the Kernel Dump Configuration Utility
Configuring kdump on the Command Line
Testing the Configuration
Analyzing the Core Dump
Displaying the Message Buffer
Displaying a Backtrace
Displaying a Process Status
Displaying Virtual Memory Information
Displaying Open Files
Additional Resources
Installed Documentation
Useful Websites

kdump is an advanced crash dumping mechanism. When enabled, the system is booted from the context of another kernel. This second kernel reserves a small amount of memory, and its only purpose is to capture the core dump image in case the system crashes. Since being able to analyze the core dump helps significantly to determine the exact cause of the system failure, it is strongly recommended to have this feature enabled.

This chapter explains how to configure, test, and use the kdump service in Community Enterprise Linux, and provides a brief overview of how to analyze the resulting core dump using the crash debugging utility.

Security Overview

Introduction to Security
What is Computer Security?
Security Controls
Conclusion
Vulnerability Assessment
Thinking Like the Enemy
Defining Assessment and Testing
Evaluating the Tools
Attackers and Vulnerabilities
A Quick History of Hackers
Threats to Network Security
Threats to Server Security
Threats to Workstation and Home PC Security
Common Exploits and Attacks
Security Updates
Updating Packages

Because of the increased reliance on powerful, networked computers to help run businesses and keep track of our personal information, industries have been formed around the practice of network and computer security. Enterprises have solicited the knowledge and skills of security experts to properly audit systems and tailor solutions to fit the operating requirements of the organization. Because most organizations are dynamic in nature, with workers accessing company IT resources locally and remotely, the need for secure computing environments has become more pronounced.

Unfortunately, most organizations (as well as individual users) regard security as an afterthought, a process that is overlooked in favor of increased power, productivity, and budgetary concerns. Proper security implementation is often enacted postmortem - after an unauthorized intrusion has already occurred. Security experts agree that the right measures taken prior to connecting a site to an untrusted network, such as the Internet, is an effective means of thwarting most attempts at intrusion.

Securing Your Network

Workstation Security
Evaluating Workstation Security
BIOS and Boot Loader Security
Password Security
Administrative Controls
Available Network Services
Personal Firewalls
Security Enhanced Communication Tools
Server Security
Securing Services With TCP Wrappers and xinetd
Securing Portmap
Securing NIS
Securing NFS
Securing the Apache HTTP Server
Securing FTP
Securing Sendmail
Verifying Which Ports Are Listening
Single Sign-on (SSO)
Introduction
Getting Started with your new Smart Card
How Smart Card Enrollment Works
How Smart Card Login Works
Configuring Firefox to use Kerberos for SSO
Pluggable Authentication Modules (PAM)
Advantages of PAM
PAM Configuration Files
PAM Configuration File Format
Sample PAM Configuration Files
Creating PAM Modules
PAM and Administrative Credential Caching
PAM and Device Ownership
Additional Resources
TCP Wrappers and xinetd
TCP Wrappers
TCP Wrappers Configuration Files
xinetd
xinetd Configuration Files
Additional Resources
Kerberos
What is Kerberos?
Kerberos Terminology
How Kerberos Works
Kerberos and PAM
Configuring a Kerberos 5 Server
Configuring a Kerberos 5 Client
Domain-to-Realm Mapping
Setting Up Secondary KDCs
Setting Up Cross Realm Authentication
Additional Resources
Virtual Private Networks (VPNs)
How Does a VPN Work?
VPNs and Community Enterprise Linux
IPsec
Creating an IPsec Connection
IPsec Installation
IPsec Host-to-Host Configuration
IPsec Network-to-Network Configuration
Starting and Stopping an IPsec Connection
Firewalls
Netfilter and IPTables
Basic Firewall Configuration
Using IPTables
Common IPTables Filtering
FORWARD and NAT Rules
Malicious Software and Spoofed IP Addresses
IPTables and Connection Tracking
IPv6
Additional Resources
IPTables
Packet Filtering
Differences Between IPTables and IPChains
Command Options for IPTables
Saving IPTables Rules
IPTables Control Scripts
IPTables and IPv6
Additional Resources

Security and SELinux

Access Control Mechanisms (ACMs)
Discretionary Access Control (DAC)
Access Control Lists (ACLs)
Mandatory Access Control (MAC)
Role-based Access Control (RBAC)
Multi-Level Security (MLS)
Multi-Category Security (MCS)
Introduction to SELinux
SELinux Overview
Files Related to SELinux
Additional Resources
Brief Background and History of SELinux
Multi-Category Security (MCS)
Introduction
Applications for Multi-Category Security
SELinux Security Contexts
Getting Started with Multi-Category Security (MCS)
Introduction
Comparing SELinux and Standard Linux User Identities
Configuring Categories
Assigning Categories to Users
Assigning Categories to Files
Multi-Level Security (MLS)
Why Multi-Level?
Security Levels, Objects and Subjects
MLS Policy
LSPP Certification
SELinux Policy Overview
What is the SELinux Policy?
Where is the Policy?
The Role of Policy in the Boot Process
Object Classes and Permissions
Targeted Policy Overview
What is the Targeted Policy?
Files and Directories of the Targeted Policy
Understanding the Users and Roles in the Targeted Policy

Working With SELinux

End User Control of SELinux
Moving and Copying Files
Checking the Security Context of a Process, User, or File Object
Relabeling a File or Directory
Creating Archives That Retain Security Contexts
Administrator Control of SELinux
Viewing the Status of SELinux
Relabeling a File System
Managing NFS Home Directories
Granting Access to a Directory or a Tree
Backing Up and Restoring the System
Enabling or Disabling Enforcement
Enable or Disable SELinux
Changing the Policy
Specifying the Security Context of Entire File Systems
Changing the Security Category of a File or User
Running a Command in a Specific Security Context
Useful Commands for Scripts
Changing to a Different Role
When to Reboot
Analyst Control of SELinux
Enabling Kernel Auditing
Dumping and Viewing Logs

SELinux presents both a new security paradigm and a new set of practices and tools for administrators and some end-users. The tools and techniques discussed in this chapter focus on standard operations performed by end-users, administrators, and analysts.

Customizing SELinux Policy

Introduction
Modular Policy
Building a Local Policy Module
Using audit2allow to Build a Local Policy Module
Analyzing the Type Enforcement (TE) File
Loading the Policy Package

CentOS Training and Certification

Three Ways to Train
Microsoft Certified Professional Resource Center

Certification Tracks

Free Pre-assessment tests
CentOS Certified Technician (RHCT)

Now entering its third year, CentOS Certified Technician is the fastest-growing credential in all of Linux, with currently over 15,000 certification holders. RHCT is the best first step in establishing Linux credentials and is an ideal initial certification for those transitioning from non-UNIX/ Linux environments.

CentOS certifications are indisputably regarded as the best in Linux, and perhaps, according to some, in all of IT. Taught entirely by experienced CentOS experts, our certification programs measure competency on actual live systems and are in great demand by employers and IT professionals alike.

Choosing the right certification depends on your background and goals. Whether you have advanced, minimal, or no UNIX or Linux experience whatsoever, CentOS Training has a training and certification path that is right for you.

CentOS Certified Engineer (RHCE)

CentOS Certified Engineer began in 1999 and has been earned by more than 20,000 Linux experts. Called the "crown jewel of Linux certifications," independent surveys have ranked the RHCE program #1 in all of IT.

CentOS Certified Security Specialist (RHCSS)

An RHCSS has RHCE security knowledge plus specialized skills in Community Enterprise Linux, CentOS Directory Server and SELinux to meet the security requirements of today's enterprise environments. RHCSS is CentOS's newest certification, and the only one of its kind in Linux.

CentOS Certified Architect (RHCA)

RHCEs who seek advanced training can enroll in Enterprise Architect courses and prove their competency with the newly announced CentOS Certified Architect (RHCA) certification. RHCA is the capstone certification to CentOS Certified Technician (RHCT) and CentOS Certified Engineer (RHCE), the most acclaimed certifications in the Linux space.

RH033: CentOS Linux Essentials

Course Description
Prerequisites
Goal
Audience
Course Objectives
Follow-on Courses

http://www.redhat.com/training/rhce/courses/rh033.html

RH035: CentOS Linux Essentials for Windows Professionals

Course Description
Prerequisites
Goal
Audience
Course Objectives
Follow-on Courses

http://www.redhat.com/training/rhce/courses/rh035.html

RH133: CentOS Linux System Administration and CentOS Certified Technician (RHCT) Certification

Course Description
Prerequisites
Goal
Audience
Course Objectives
Follow-on Courses

http://www.redhat.com/training/rhce/courses/rh133.html

RH202 RHCT EXAM - The fastest growing credential in all of Linux.

Course Description
Prerequisites

http://www.redhat.com/training/rhce/courses/rh202.html

  1. RHCT exam is included with RH133. It can also be purchased on its own for $349