Suse Linux
Suse Linux
Suse Linux
Server
10 www.novell.com
May 08, 2008 Installation and Administration
Installation and Administration
All content is copyright © Novell, Inc.
Legal Notice
This manual is protected under Novell intellectual property rights. By reproducing, duplicating or
distributing this manual you explicitly agree to conform to the terms and conditions of this license
agreement.
This manual may be freely reproduced, duplicated and distributed either as such or as part of a bundled
package in electronic and/or printed format, provided however that the following conditions are ful-
filled:
That this copyright notice and the names of authors and contributors appear clearly and distinctively
on all reproduced, duplicated and distributed copies. That this manual, specifically for the printed
format, is reproduced and/or distributed for noncommercial use only. The express authorization of
Novell, Inc must be obtained prior to any other use of any manual or part thereof.
For Novell trademarks, see the Novell Trademark and Service Mark list http://www.novell
.com/company/legal/trademarks/tmlist.html. * Linux is a registered trademark of
Linus Torvalds. All other third party trademarks are the property of their respective owners. A trademark
symbol (®, ™ etc.) denotes a Novell trademark; an asterisk (*) denotes a third party trademark.
All information found in this book has been compiled with utmost attention to detail. However, this
does not guarantee complete accuracy. Neither Novell, Inc., SUSE LINUX Products GmbH, the authors,
nor the translators shall be held liable for possible errors or the consequences thereof.
Contents
Part I Deployment 1
2 Deployment Strategies 7
2.1 Deploying up to 10 Workstations . . . . . . . . . . . . . . . . . . . 7
2.2 Deploying up to 100 Workstations . . . . . . . . . . . . . . . . . . 9
2.3 Deploying More than 100 Workstations . . . . . . . . . . . . . . . 16
4 Remote Installation 47
4.1 Installation Scenarios for Remote Installation . . . . . . . . . . . . . 47
4.2 Setting Up the Server Holding the Installation Sources . . . . . . . . . 56
4.3 Preparing the Boot of the Target System . . . . . . . . . . . . . . . 66
4.4 Booting the Target System for Installation . . . . . . . . . . . . . . . 76
4.5 Monitoring the Installation Process . . . . . . . . . . . . . . . . . 81
5 Automated Installation 85
5.1 Simple Mass Installation . . . . . . . . . . . . . . . . . . . . . . 85
5.2 Rule-Based Autoinstallation . . . . . . . . . . . . . . . . . . . . . 97
5.3 For More Information . . . . . . . . . . . . . . . . . . . . . . 102
1 1 OpenWBEM 241
11.1 Setting Up OpenWBEM . . . . . . . . . . . . . . . . . . . . . . 243
11.2 Changing the OpenWBEM CIMOM Configuration . . . . . . . . . . . 248
11.3 For More Information . . . . . . . . . . . . . . . . . . . . . . 268
3 4 DHCP 637
34.1 Configuring a DHCP Server with YaST . . . . . . . . . . . . . . . . 638
34.2 DHCP Software Packages . . . . . . . . . . . . . . . . . . . . . 649
34.3 The DHCP Server dhcpd . . . . . . . . . . . . . . . . . . . . . 650
34.4 For More Information . . . . . . . . . . . . . . . . . . . . . . 653
3 5 Using NIS 655
35.1 Configuring NIS Servers . . . . . . . . . . . . . . . . . . . . . . 655
35.2 Configuring NIS Clients . . . . . . . . . . . . . . . . . . . . . . 661
3 7 Samba 699
37.1 Terminology . . . . . . . . . . . . . . . . . . . . . . . . . . . 699
37.2 Starting and Stopping Samba . . . . . . . . . . . . . . . . . . . 701
37.3 Configuring a Samba Server . . . . . . . . . . . . . . . . . . . . 701
37.4 Configuring Clients . . . . . . . . . . . . . . . . . . . . . . . . 707
37.5 Samba as Login Server . . . . . . . . . . . . . . . . . . . . . . 708
37.6 Samba Server in the Network with Active Directory . . . . . . . . . . 709
37.7 Migrating a Windows NT Server to Samba . . . . . . . . . . . . . . 711
37.8 For More Information . . . . . . . . . . . . . . . . . . . . . . 713
Index 951
About This Guide
This guide is intended for use by professional network and system administrators during
the actual planning, deployment, configuration, and operation of SUSE Linux Enter-
prise®. As such, it is solely concerned with ensuring that SUSE Linux Enterprise is
properly configured and that the required services on the network are available to allow
it to function properly as initially installed. This guide does not cover the process of
ensuring that SUSE Linux Enterprise offers proper compatibility with your enterprise's
application software or that its core functionality meets those requirements. It assumes
that a full requirements audit has been done and the installation has been requested or
that a test installation, for the purpose of such an audit, has been requested.
Deployment
Before you install SUSE Linux Enterprise, choose the deployment strategy and
disk setup that is best suited for your scenario. Learn how to install your system
manually, how to use network installation setups, and how to perform an autoinstal-
lation. Configure the installed system with YaST to adapt it to your requirements.
Administration
SUSE Linux Enterprise offers a wide range of tools to customize various aspects
of the system. This part introduces a few of them.
System
Learn more about the underlying operating system by studying this part. SUSE
Linux Enterprise supports a number of hardware architectures and you can use this
to adapt your own applications to run on SUSE Linux Enterprise. The boot loader
and boot procedure information assists you in understanding how your Linux system
works and how your own custom scripts and applications may blend in with it.
Services
SUSE Linux Enterprise is designed to be a network operating system. It offers a
wide range of network services, such as DNS, DHCP, Web, proxy, and authentica-
tion services, and integrates well into heterogeneous environments including MS
Windows clients and servers.
Security
This edition of SUSE Linux Enterprise includes several security-related features.
It ships with Novell® AppArmor, which enables you to protect your applications
by restricting privileges. Secure login, firewalling, and file system encryption are
covered as well.
Troubleshooting
SUSE Linux Enterprise includes a wealth of applications, tools, and documentation
should you need them in case of trouble. Some of the most common problems that
can occur with SUSE Linux Enterprise and their solutions are discussed in detail.
1 Feedback
We want to hear your comments and suggestions about this manual and the other doc-
umentation included with this product. Please use the User Comments feature at the
bottom of each page of the online documentation and enter your comments there.
2 Documentation Updates
For the latest version of this documentation, see the SUSE Linux Enterprise Server
Web site [http://www.novell.com/documentation/sles10/index
.html].
3 Additional Documentation
For additional documentation on this product, refer to http://www.novell.com/
documentation/sles10/index.html:
Start-Up Guide
Basic information about installation types and work flows.
Architecture-Specific Information
Architecture-specific information needed to prepare a SUSE Linux Enterprise
Server target for installation.
Heartbeat Guide
An in-depth administration guide to setting up high availability scenarios with
Heartbeat.
For a documentation overview on the SUSE® Linux Enterprise Desktop product, refer
to http://www.novell.com/documentation/sled10/index.html. The
following manuals are exclusively available for SUSE Linux Enterprise Desktop:
Deployment Guide
An in-depth guide for administrators facing the deployment and management of
SUSE Linux Enterprise Desktop.
Many chapters in this manual contain links to additional documentation resources. This
includes additional documentation that is available on the system as well as documen-
tation available on the Internet.
• Alt, Alt + F1: a key to press or a key combination; keys are shown in uppercase as
on a keyboard
• ►amd64 ipf: This paragraph is only relevant for the specified architectures. The
arrows mark the beginning and the end of the text block.◄
►ipseries s390 zseries: This paragraph is only relevant for the specified architec-
tures. The arrows mark the beginning and the end of the text block.◄
YaST
Several new configuration options have been developed for YaST. These are nor-
mally described in the chapters about the technology involved.
SPident
The management utility SPident gives an overview of the installed software base
and clarifies the current service pack level of the system.
Directory Services
Several LDAP-compliant directory services are available:
• OpenLDAP
Novell AppArmor
Harden your System with the Novell AppArmor technology. This service is de-
scribed in depth in Novell AppArmor Administration Guide (↑Novell AppArmor
Administration Guide).
iSCSI
iSCSI provides an easy and reasonably inexpensive solution for connecting Linux
computers to central storage systems. Find more information about iSCSI in
Chapter 12, Mass Storage over IP Networks—iSCSI (page 271).
Heartbeat 2
Heartbeat 2 provides a cluster membership and messaging infrastructure. The setup
of such a cluster is described in the Heartbeat Guide.
Multipath I/O
Device mapping multipath IO features automatic configuration of the subsystem
for a large variety of setups. For details, see the chapter about multipath I/O in
Storage Administration Guide.
• How many installations should be done? Depending on this, the best deployment
method differs. See also Chapter 2, Deployment Strategies (page 7).
• Will the system be in a hostile environment? Have a look at Chapter 49, Security
and Confidentiality (page 881) to get an overview of consequences.
• How will you get regular updates? All patches are provided online for registered
users. Find the registration and patch support database at http://www.novell
.com/suselinuxportal.
• Do you need help for your local installation? Novell provides training, support,
and consulting for all topics around SUSE Linux Enterprise. Find more information
about this at http://www.novell.com/products/
linuxenterpriseserver/.
• Do you need third-party products? Make sure that the required product is also
supported on the desired platform. Novell can also provide help to port software
to different platforms when needed.
SUSE Linux Enterprise provides you with a broad variety of services. Find an overview
of the documentation in this book in About This Guide (page xv). Most of the needed
configurations can be made with YaST, the SUSE configuration utility. In addition to
that, many manual configurations are described in the corresponding chapters.
In addition to the plain software installation, you should consider training the end users
of the systems as well as help desk staff.
For optimal security and safe work, you should make regular updates of all the operated
machines. If you have a mission critical server, you should probably run a second
identical machine where you can apply all changes for testing purposes before doing
so on the real system. This also gives you the possibility to switch machines in case of
hardware failure.
Deployment Strategies 7
Table 2.1 Installing from the SUSE Linux Enterprise Media
• Changing media
Remotely Controlled Tasks None, but this method can be combined with VNC
Remotely Controlled Tasks None, but method can be combined with VNC
Before considering a fully-automated approach, take into account that the more complex
the scenario gets the longer it takes to set up. If a time limit is associated with your de-
ployment, it might be a good idea to select a less complex approach that can be carried
out much more quickly. Automation makes sense for huge deployments and those that
need to be carried out remotely.
Deployment Strategies 9
Simple Remote Installation via VNC—Dynamic Network Configuration (page 11)
Consider this approach in a small to medium scenario with dynamic network setup
through DHCP. A network, network installation server, and VNC viewer application
are required.
Remote Installation via VNC—PXE Boot and Wake on LAN (page 12)
Consider this approach in a small to medium scenario that should be installed via
network and without physical interaction with the installation targets. A network,
a network installation server, network boot images, network bootable target hard-
ware, and a VNC viewer application are required.
Remote Installation via SSH—PXE Boot and Wake on LAN (page 13)
Consider this approach in a small to medium scenario that should be installed via
network and without physical interaction with the installation targets. A network,
a network installation server, network boot images, network bootable target hard-
ware, and an SSH client application are required.
Deployment Strategies 11
Details Section 4.1.2, “Simple Remote Installation via
VNC—Dynamic Network Configuration” (page 49)
Table 2.6 Remote Installation via VNC—PXE Boot and Wake on LAN
Table 2.9 Remote Installation via SSH—PXE Boot and Wake on LAN
Deployment Strategies 13
• Configuring DHCP, TFTP, PXE boot, and WOL
or
• Identical hardware
or
• Cross-site deployments
Deployment Strategies 15
Details Section 5.2, “Rule-Based Autoinstallation” (page 97)
It pays off to invest a considerable amount of time to create a sophisticated rule and
class framework in AutoYaST to match the requirements of a huge deployment site.
Not having to touch each target separately can save you a tremendous amount of time
depending on the scope of your installation project.
To install, follow the description of the installation procedure with YaST starting
from Section 3.6, “Language” (page 24).
To install, follow the description of the installation procedure with YaST starting
from Section 3.6, “Language” (page 24).
DVD/CD-ROM This is the easiest boot option. This option can be used if the
system has a local CD/DVD-ROM drive that is supported by
Linux.
Floppy The images for generating boot floppies are located on CD/DVD
1 in the /boot directory. A README is available in the same
directory.
PXE or BOOTP This must be supported by the system's BIOS or firmware and
a boot server must be available in the network. This task can also
be handled by another SUSE Linux Enterprise system.
Hard Disk SUSE Linux Enterprise can also be booted from the hard disk.
To do this, copy the kernel (linux) and the installation system
(initrd) from the directory /boot/loader on CD/DVD 1
to the hard disk and add the appropriate entry to the boot loader.
The installation program retrieves the location of the network installation source using
OpenSLP and configures the network connection with DHCP. If the DHCP network
configuration fails, you are prompted to enter the appropriate parameters manually.
The installation then proceeds as described below.
Installation—ACPI Disabled
If the normal installation fails, this might be due to the system hardware not sup-
porting ACPI (advanced configuration and power interface). If this seems to be the
case, use this option to install without ACPI support.
If you are not sure, try one of the following options first: Installation—ACPI Dis-
abled or Installation—Safe Settings.
Installation—Safe Settings
Boots the system with the DMA mode (for CD-ROM drives) and power management
functions disabled.
Rescue System
Starts a minimal Linux system without a graphical user interface. For more infor-
mation, see Section “Using the Rescue System” (page 942).
Memory Test
Tests your system RAM using repeated read and write cycles. Terminate the test
by rebooting. For more information, see Section 51.2.5, “Fails to Boot” (page 916).
Installation options from the menu disable only the most problematic functions. If you
need to disable or set other functions, use the Boot Options prompt. Find detailed infor-
mation about kernel parameters at http://en.opensuse.org/Linuxrc.
Use the function keys indicated in the bar at the bottom of the screen to change the
language, resolution of the monitor, or installation source or to add an additional driver
from your hardware vendor:
F1 Help
Get context-sensitive help for the active element of the boot screen.
F3 Video Mode
Select various graphical display modes for the installation. Select Text Mode if the
graphical installation causes problems.
F4 Source
Normally, the installation is performed from the inserted installation medium. Here,
select other sources, like FTP or NFS servers. If the installation is carried out in a
network with an SLP server, select one of the installation sources available on the
server with this option. Find information about SLP in Chapter 31, SLP Services
in the Network (page 601).
F5 Driver
Press this key to tell the system that you have an optional disk with a driver update
for SUSE Linux Enterprise. With File, load drivers directly from CD before the
installation starts. If you select Yes, you are prompted to insert the update disk at
the appropriate point in the installation process. The default option is No—not to
load a driver update.
After starting the installation, SUSE Linux Enterprise loads and configures a minimal
Linux system to run the installation procedure. To view the boot messages and copyright
notices during this process, press Esc. On completion of this process, the YaST installa-
tion program starts and displays the graphical installer.
If the installer does not detect your mouse correctly, use Tab for navigation,
arrow keys to scroll, and Enter to confirm a selection.
smtcert
Location of the SMT server's certificate. Specify one of the following locations:
URL
Remote location (http, https or ftp) from which the certificate can be download-
ed. Example:
smtcert=http://smt.example.com/smt-ca.crt
Floppy
Specifies a location on a floppy. The floppy has to be inserted at boot time,
you will not be prompted to insert it if it is missing. The value has to start with
the string floppy followed by the path to the certificate. Example:
smtcert=floppy/smt/smt-ca.crt
local path
Absolute path to the certificate on the local machine. Example:
smtcert=/data/inst/smt/smt-ca.cert
Interactive
Use ask to open a pop-up menu during the installation where you can specify
the path to the certificate. Do not use this option with AutoYaST. Example
smtcert=ask
Make sure the values you enter are correct. If smturl has not been specified
correctly, the registration of the update source will fail. If a wrong value for
3.6 Language
YaST and SUSE Linux Enterprise in general can be configured to use different languages
according to your needs. The language selected here is also used for the keyboard layout.
In addition, YaST uses the language setting to guess a time zone for the system clock.
These settings can be modified later along with the selection of secondary languages
to install on your system.
You can change the language later during installation as described in Section 3.12,
“Installation Settings” (page 29). For information about language settings in the installed
system, see Section 8.1, “YaST Language” (page 130).
After selecting Configure DASD Disks, an overview lists all available DASDs. To get
a clearer picture of the available devices, use the entry field located above the list to
specify a range of channels to display. To filter the list according to such a range, select
Filter. See Figure 3.1, “IBM System z: Selecting a DASD” (page 25).
Now specify the DASDs to use for the installation by selecting the corresponding entries
in the list then clicking Select or Deselect. After that, activate and make the DASDs
available for the installation by selecting Perform Action > Activate. See Figure 3.2,
“IBM System z: Activating a DASD” (page 25). To format the DASDs, select Perform
Action > Format right away or use the YaST partitioner later as described in Sec-
tion 8.5.7, “Using the YaST Partitioner” (page 155).
To use ZFCP disks for the SUSE Linux Enterprise installation, select Configure ZFCP
Disks in the selection dialog. This opens a dialog with a list of the ZFCP disks available
on the system. In this dialog, select Add to open another dialog in which to enter ZFCP
parameters. See Figure 3.3, “IBM System z: Overview of Available ZFCP Disks”
(page 26).
To make a ZFCP disk available for the SUSE Linux Enterprise installation, choose an
available Channel Number from the drop-down list. Get WWPNs (World Wide Port
Number) and Get LUNs (Logical Unit Number) return lists with available WWPNs and
FCP-LUNs, respectively, to choose from. When completed, exit the ZFCP dialog with
Next and the general hard disk configuration dialog with Finish to continue with the
rest of the configuration.
Adding DASD or zFCP disks is not only possible during the installation workflow,
but also when the installation proposal is shown. To add disks at that stage,
click Expert and scroll down. The DASD and zFCP entries are shown at the very
bottom.
The media check examines the integrity of a medium. To start the media check, select
the drive in that contains the installation medium and click Start Check. The check can
take some time.
To test multiple media, wait until a result message appears in the dialog before changing
the medium. If the last medium checked is not the one with which you started the instal-
lation, YaST prompts for the appropriate medium before continuing with the installation.
If the media check fails, your medium is damaged. Do not continue the instal-
lation because installation may fail or you may lose your data. Replace the
broken medium and restart the installation process.
If the result of the media check is positive, click Next to continue the installation.
New installation
Select this option to start a new installation from scratch.
Other Options
This option provides an opportunity to abort installation and boot or repair an in-
stalled system instead. To boot an already installed SUSE Linux Enterprise, select
Boot Installed System. If you have problems booting an already installed SUSE
Linux Enterprise, see Section 51.3, “Boot Problems” (page 920).
To repair an installed system that fails to boot, select Repair Installed System. Find
a description of the system repair options in Section “Using YaST System Repair”
(page 937).
You can choose to install add-on products together with your SUSE Linux Enterprise
system during the initial installation process or at any time later as described inSec-
tion 8.3.2, “Installing Add-On Products” (page 139). Add-on products are extensions
for your SUSE Linux Enterprise. An add-on product can include proprietary third-party
products or additional software for your system.
To include add-on products during the installation of SUSE Linux Enterprise, select
Include Add-On Products from Separate Media and click Next. In the next dialog, click
Add to select the source from which to install the add-on products. Many source types
You can reset all changes to the defaults by clicking Change > Reset to Defaults.
YaST then shows the original proposal again.
3.12.1 Overview
The options that sometimes need manual intervention in common installation situations
are presented in the Overview tab. Modify Partitioning, Software selection and Locale
settings here.
Keyboard Layout
To change the keyboard layout, select Keyboard Layout. By default, the layout corre-
sponds to the language chosen for installation. Select a keyboard layout from the list.
Use the Test field at the bottom of the dialog to check if you can enter special characters
of that layout correctly. Find more information about changing the keyboard layout in
Section 8.4.10, “Keyboard Layout” (page 150). When finished, click Accept to return
to the installation summary.
Partitioning
In most cases, YaST proposes a reasonable partitioning scheme that can be accepted
without change. YaST can also be used to customize the partitioning, but only experi-
enced users should change partitioning.
When you select the Partitioning for the first time, the YaST partitioning dialog displays
the proposed partition settings. To accept these settings, click Accept Proposal.
To make small changes in the proposal, select Base Partition Setup on This Proposal
and adjust partitioning in the next dialog. For a completely different partitioning, select
Create Custom Partition Setup. In the next dialog, choose a specific disk to partition
or Custom Partitioning if you want to have access to all disks. For more information
about custom partitioning, refer to Section 8.5.7, “Using the YaST Partitioner”
(page 155)the SUSE Linux Enterprise Server documentation. The YaST partitioner also
provides a tool for LVM creation. To create an LVM proposal, select Create LVM
Based Proposal. See Section 7.1, “LVM Configuration” (page 115) for more information
on LVM.
Software
SUSE Linux Enterprise contains a number of software packages for various application
purposes. Click Software in the suggestion window to start the software selection and
modify the installation scope according to your needs. Select your pattern from the list
in the middle and see the description in the right part of the window. Each pattern
contains a number of software packages needed for specific functions (e.g. Multimedia
or Office software). For a more detailed selection based on software packages to install,
select Details to switch to the YaST Software Manager. See Figure 3.5, “Installing and
Removing Software with the YaST Software Manager” (page 32).
You can also install additional software packages or remove software packages from
your system at any time later. For more information, refer to Section 8.3.1, “Installing
and Removing Software” (page 132).
The default desktop of SUSE Linux Enterprise is GNOME. To install KDE, click
Software and select KDE Desktop Environment from Graphical Environments.
Language
To change the system language or to configure support for secondary languages, select
Language. Select a language from the list. The primary language is used as the system
language. Choose a secondary languages to be able to switch to one of these languages
at any time without having to install additional packages. For more information, see
Section 8.5.15, “Language Selection” (page 163).
System
This dialog presents all the hardware information YaST could obtain about your
computer. Select any item in the list and click Details to see detailed information
about the selected item. Advanced users can also change the PCI ID setup and
Kernel Settings by choosing System Settings.
Add-On Products
The added source for add-on media appears in the overview. Before you start the
installation of the SUSE Linux Enterprise, add, remove, or modify add-on products
here if needed.
Booting
►zseries: This module cannot be used to configure the boot loader (zipl) on the
IBM System z platforms. ◄
YaST proposes a boot configuration for your system. Normally, you can leave
these settings unchanged. However, if you need a custom setup, modify the proposal
for your system. For information, see Section 21.3, “Configuring the Boot Loader
with YaST” (page 414).
Time Zone
This is the same as the configuration shown earlier in Section 3.11, “Clock and
Time Zone” (page 29).
Default Runlevel
SUSE Linux Enterprise can boot to different runlevels. Normally there should be
no need to change anything here, but if necessary, set the default runlevel with this
dialog. Refer to Section 20.2.3, “Configuring System Services (Runlevel) with
YaST” (page 398) for information about runlevel configuration.
The installation usually takes between 15 and 30 minutes, depending on the system
performance and the software selected. During this procedure a slide show introduces
the features of SUSE Linux Enterprise. Choose Details to switch to the installation log.
As soon as all packages are installed, YaST boots into the new Linux system, after
which you can configure the hardware and set up system services.
LPAR Installation
In the IBM System z HMC, select LOAD, select Clear, then enter the loading ad-
dress (the device address of the root device). If using a ZFCP disk as the boot device,
choose LOAD from SCSI and specify both ZFCP WWPN and LUN of the boot
device. Now start the loading process.
z/VM Installation
Shut down the installed system with the halt command. Log in to the VM guest
as LINUX1 and proceed to IPL the installed system. If using a ZFCP disk as the
boot device, specify both the ZFCP WWPN and LUN of the boot device before
initiating the IPL. The parameter length is limited to eight characters. Longer
numbers must be separated by spaces:
SET LOADDEV PORT 50050763 00C590A9 LUN 50010000 00000000
If connecting using a Java-capable browser, enter the complete URL, consisting of the
IP address of the installed system along with the port number, in the following fashion:
http://<IP of installed system>:5801/
Using X to Connect
When IPLing the installed system, make sure that the X server used for the first phase
of the installation is still available. YaST opens on this X server to finish the installation.
Start SSH in an xterm. Other terminal emulators lack complete support for the
text-based interface of YaST.
A message in the 3270 terminal asks you to connect to the Linux system with an SSH
client. This message is easily missed, however, because it is mixed with kernel messages
and because the terminal process might quit before you become aware of the message.
Once the message appears, use SSH to log in to the Linux system as root. If the con-
nection is denied or times out, wait a few minutes then try again.
YaST then starts to complete the installation of the remaining packages and create an
initial system configuration.
First, provide a password for the account of the system administrator (the root user).
Configure your Internet access and network connection. With a working Internet con-
nection, you can perform an update of the system as part of the installation. You can
also connect to an authentication server for centralized user administration in a local
network. Finally, configure the hardware devices connected to the machine.
For verification purposes, the password for root must be entered twice. Do not forget
the root password. Once entered, this password cannot be retrieved.
When typing passwords, the characters are replaced by dots, so you do not see the string
you are typing. If you are unsure whether you typed the correct string, use the Test
Keyboard Layout field for testing purposes.
The root can be changed any time later in the installed system. To do so run YaST
and start Security and Users > User Management.
In many networks, the system receives its name over DHCP. In this case it is not nec-
essary to modify the hostname and domain name. Select Change Hostname via DHCP
instead. To be able to access your system using this hostname, even when it is not
connected to the network, select Write Hostname to /etc/hosts. If you often change
networks without restarting the desktop environment (e.g. when switching between
different WLANs), do not enable this option, because the desktop system may get
confused when the hostname in /etc/hosts changes.
To change hostname settings at any time after installation, use YaST Network Devices
> Network Card. For more information, see Section 30.4.1, “Configuring the Network
Card with YaST” (page 561).
This configuration step also lets you configure the network devices of your system and
make security settings, for example, for a firewall or proxy. To configure your network
connection later, select Skip Configuration and click Next. Network hardware can also
be configured after the system installation has been completed. If you skip the network
device configuration, your system is left offline and is unable to retrieve any available
updates.
Apart from the device configuration, the following network settings can be configured
in this step:
Network Mode
Enable or disable the use of NetworkManager as described above.
Firewall
By default SuSEfirewall2 is enabled on all configured network interfaces. To
globally disable the firewall for this computer, click on disable. If the firewall is
enabled, you may open the SSH port in order to allow remote connections via secure
shell. To open the detailed firewall configuration dialog, click on Firewall. See
Section 43.4.1, “Configuring the Firewall with YaST” (page 825) for detailed infor-
mation.
IPv6
By default, the IPv6 support is enabled. To disable it, click Disable IPv6. For more
information about IPv6, see Section 30.2, “IPv6—The Next Generation Internet”
(page 549).
Proxy
If you have a proxy server controlling the Internet access in your network, configure
the proxy URLs and authentication details in this dialog.
Reset the network settings to the original proposed values by clicking Change
> Reset to Defaults. This discards any changes made.
If you have multiple network interfaces, verify that the desired card is used to connect
to the Internet. If not, click Change Device.
To start the test, select Yes, Test Connection to the Internet and click Next. In the next
dialog, view the progress of the test and the results. Detailed information about the test
process is available via View Logs. If the test fails, click Back to return to the network
configuration to correct your entries.
If you do not want to test the connection at this point, select No, Skip This Test then
Next. This also skips downloading the release notes, configuring the customer center,
and updating online. These steps can be performed any time after the system has been
initially configured.
Apart from activating and registering your product, this module also adds the official
update catalog to your configuration. This catalog provides fixes for known bugs or
security issues which can be installed via an online update.
To keep your catalogs valid, select Regularly Synchronize with Customer Center. This
option checks your catalogs and adds newly available catalogs or removes obsolete
ones. It does not touch manually added catalogs.
The download of updates might take quite some time, depending on the
bandwidth of the Internet connection and the size of the update files. In case
the patch system itself is updated, the online update will restart and download
more patches after the restart. If the kernel was updated, the system will reboot
before completing the configuration.
CA Management
The purpose of a CA (certificate authority) is to guarantee a trust relationship among
all network services communicating with each other. Without a CA, you can secure
server communications with SSL and TLS separately for each individual service.
By default, a CA is created and enabled during the installation. Find details about
the creation of a CA with YaST in Chapter 42, Managing X.509 Certification
(page 803).
OpenLDAP Server
You can run an LDAP service on your host to have a central facility manage a
range of configuration files. Typically, an LDAP server handles user account data,
but with SUSE Linux Enterprise it can also be used for mail, DHCP, and DNS data.
Restore the defaults by clicking Change > Reset to Defaults. This discards any
changes made.
3.14.7 Users
If network access was configured successfully during the previous steps of the installa-
tion, you can now choose from several user management options. If a network connection
has not been configured, create local user accounts. For detailed information about user
management, see Section 8.9.1, “User Management” (page 172)the SUSE Linux Enter-
prise Server documentation.
Local (/etc/passwd)
Users are administered locally on the installed host. This is a suitable option for
stand-alone workstations. User data is managed by the local file /etc/passwd.
All users who are entered in this file can log in to the system even if no network
is available.
If YaST found a former version of SUSE Linux Enterprise or another system using
/etc/passwd, it offers to import local users. To do so, check Read User Data
from a Previous Installation and click Choose. In the next dialog, select the users
to import and click OK.
LDAP
Users are administered centrally on an LDAP server for all systems in the network.
More information is available in Section 36.6, “Configuring an LDAP Client with
YaST” (page 684).
NIS
Users are administered centrally on a NIS server for all systems in the network.
See Section 35.2, “Configuring NIS Clients” (page 661) for more information.
If you use the custom package selection and one or more authentication
methods are missing from the menu, the required packages probably are not
installed.
Along with the selected user administration method, you can use Kerberos authentication.
This is essential for integrating your SUSE Linux Enterprise to an Active Directory
domain, which is described in Section 37.6, “Samba Server in the Network with Active
Directory” (page 709). To use Kerberos authentication, select Set Up Kerberos Authen-
tication.
However, you should configure the graphics card right away. Although the display
settings as configured by YaST should be generally acceptable, most users have very
strong preferences as far as resolution, color depth, and other graphics features are
concerned. To change these settings, select the respective item and set the values as
desired. To test your new configuration, click Test the Configuration.
You can cancel changes by clicking Change > Reset to Defaults. YaST then shows
the original proposal again.
AutoYaST is a system for installing one or more SUSE Linux Enterprise systems auto-
matically without user intervention. AutoYaST installations are performed using a
control file with installation and configuration data. For detailed information, refer to
Chapter 5, Automated Installation (page 85). Finish the installation of SUSE Linux
Enterprise with Finish in the final dialog.
SUSE Linux Enterprise is now installed and configured. Unless you enabled the auto-
matic login function or customized the default runlevel, you should see the graphical
Each method is introduced by means of two short check lists: one listing the prerequisites
for this method and the other illustrating the basic procedure. More detail is then pro-
vided for all the techniques used in these installation scenarios.
NOTE
In the following sections, the system to hold your new SUSE Linux Enterprise
installation is referred to as target system or installation target. The term instal-
lation source is used for all sources of installation data. This includes physical
media, such as CD and DVD, and network servers distributing the installation
data in your network.
Remote Installation 47
IMPORTANT
The configuration of the X Window System is not part of any remote installation
process. After the installation has finished, log in to the target system as root,
enter telinit 3, and start SaX2 to configure the graphics hardware.
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• Controlling system with working network connection and VNC viewer software
or Java-enabled browser (Firefox, Konqueror, Internet Explorer, or Opera)
• Physical boot medium (CD or DVD) for booting the target system
• Valid static IP addresses already assigned to the installation source and the control-
ling system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 56). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 64).
3 When the boot screen of the target system appears, use the boot options prompt
to set the appropriate VNC options and the address of the installation source.
This is described in detail in Section 4.4, “Booting the Target System for Instal-
lation” (page 76).
The target system boots to a text-based environment, giving the network address
and display number under which the graphical installation environment can be
addressed by any VNC viewer application or browser. VNC installations announce
themselves over OpenSLP and can be found using Konqueror in service:/
or slp:/ mode.
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
Remote Installation 49
• Controlling system with working network connection and VNC viewer software
or Java-enabled browser (Firefox, Konqueror, Internet Explorer, or Opera)
• Physical boot medium (CD, DVD, or custom boot disk) for booting the target system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 56). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 64).
2 Boot the target system using the first CD or DVD of the SUSE Linux Enterprise
media kit.
3 When the boot screen of the target system appears, use the boot options prompt
to set the appropriate VNC options and the address of the installation source.
This is described in detail in Section 4.4, “Booting the Target System for Instal-
lation” (page 76).
The target system boots to a text-based environment, giving the network address
and display number under which the graphical installation environment can be
addressed by any VNC viewer application or browser. VNC installations announce
themselves over OpenSLP and can be found using Konqueror in service:/
or slp:/ mode.
To perform this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• TFTP server
• Target system capable of PXE boot, networking, and Wake on LAN, plugged in
and connected to the network
• Controlling system with working network connection and VNC viewer software
or Java-enabled browser (Firefox, Konqueror, Internet Explorer, or Opera)
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 56). Choose an NFS, HTTP, or FTP
network server or configure an SMB installation source as described in Sec-
tion 4.2.5, “Managing an SMB Installation Source” (page 64).
2 Set up a TFTP server to hold a boot image that can be pulled by the target system.
This is described in Section 4.3.2, “Setting Up a TFTP Server” (page 68).
3 Set up a DHCP server to provide IP addresses to all machines and reveal the lo-
cation of the TFTP server to the target system. This is described in Section 4.3.1,
“Setting Up a DHCP Server” (page 66).
4 Prepare the target system for PXE boot. This is described in further detail in
Section 4.3.5, “Preparing the Target System for PXE Boot” (page 75).
Remote Installation 51
5 Initiate the boot process of the target system using Wake on LAN. This is de-
scribed in Section 4.3.7, “Wake on LAN” (page 75).
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• Controlling system with working network connection and working SSH client
software
• Physical boot medium (CD, DVD, or custom boot disk) for the target system
• Valid static IP addresses already assigned to the installation source and the control-
ling system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 56). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 64).
2 Boot the target system using the first CD or DVD of the SUSE Linux Enterprise
media kit.
3 When the boot screen of the target system appears, use the boot options prompt
to set the appropriate parameters for network connection, address of the installa-
tion source, and SSH enablement. This is described in detail in Section 4.4.3,
“Using Custom Boot Options” (page 78).
The target system boots to a text-based environment, giving the network address
under which the graphical installation environment can be addressed by any SSH
client.
4 On the controlling workstation, open a terminal window and connect to the target
system as described in Section “Connecting to the Installation Program”
(page 83).
Remote Installation 53
For this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• Controlling system with working network connection and working SSH client
software
• Physical boot medium (CD or DVD) for booting the target system
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 56). Choose an NFS, HTTP, or FTP
network server. For an SMB installation source, refer to Section 4.2.5, “Managing
an SMB Installation Source” (page 64).
2 Boot the target system using the first CD or DVD of the SUSE Linux Enterprise
media kit.
3 When the boot screen of the target system appears, use the boot options prompt
to pass the appropriate parameters for network connection, location of the instal-
lation source, and SSH enablement. See Section 4.4.3, “Using Custom Boot
Options” (page 78) for detailed instructions on the use of these parameters.
The target system boots to a text-based environment, giving you the network
address under which the graphical installation environment can be addressed by
any SSH client.
4 On the controlling workstation, open a terminal window and connect to the target
system as described in Section “Connecting to the Installation Program”
(page 83).
To perform this type of installation, make sure that the following requirements are met:
• Remote installation source: NFS, HTTP, FTP, or SMB with working network
connection
• TFTP server
• Running DHCP server for your network, providing a static IP to the host to install
• Target system capable of PXE boot, networking, and Wake on LAN, plugged in
and connected to the network
• Controlling system with working network connection and SSH client software
1 Set up the installation source as described in Section 4.2, “Setting Up the Server
Holding the Installation Sources” (page 56). Choose an NFS, HTTP, or FTP
network server. For the configuration of an SMB installation source, refer to
Section 4.2.5, “Managing an SMB Installation Source” (page 64).
2 Set up a TFTP server to hold a boot image that can be pulled by the target system.
This is described in Section 4.3.2, “Setting Up a TFTP Server” (page 68).
3 Set up a DHCP server to provide IP addresses to all machines and reveal the lo-
cation of the TFTP server to the target system. This is described in Section 4.3.1,
“Setting Up a DHCP Server” (page 66).
4 Prepare the target system for PXE boot. This is described in further detail in
Section 4.3.5, “Preparing the Target System for PXE Boot” (page 75).
5 Initiate the boot process of the target system using Wake on LAN. This is de-
scribed in Section 4.3.7, “Wake on LAN” (page 75).
Remote Installation 55
6 On the controlling workstation, start an SSH client and connect to the target
system as described in Section 4.5.2, “SSH Installation” (page 83).
TIP
You can even use a Microsoft Windows machine as installation server for your
Linux deployment. See Section 4.2.5, “Managing an SMB Installation Source”
(page 64) for details.
4 Configure the required server type. This step relates to the automatic configuration
of server services. It is skipped when automatic configuration is deactivated.
Define an alias for the root directory of the FTP or HTTP server on which the
installation data should be found. The installation source will later be located
under ftp://Server-IP/Alias/Name (FTP) or under
http://Server-IP/Alias/Name (HTTP). Name stands for the name of
the installation source, which is defined in the following step. If you selected
NFS in the previous step, define wild cards and export options. The NFS server
will be accessible under nfs://Server-IP/Name.
Make sure that the firewall settings of your server system allow traffic
on the ports for HTTP, NFS, and FTP. If they currently do not, start the
YaST firewall module and open the respective ports.
5 Configure the installation source. Before the installation media are copied to their
destination, define the name of the installation source (ideally, an easily remem-
bered abbreviation of the product and version). YaST allows providing ISO im-
ages of the media instead of copies of the installation CDs. If you want this, acti-
vate the relevant check box and specify the directory path under which the ISO
files can be found locally. Depending on the product to distribute using this in-
stallation server, it might be that more add-on CDs or service pack CDs are re-
quired and should be added as extra installation sources. To announce your in-
stallation server in the network via OpenSLP, activate the appropriate option.
Remote Installation 57
TIP
6 Upload the installation data. The most lengthy step in configuring an installation
server is copying the actual installation CDs. Insert the media in the sequence
requested by YaST and wait for the copying procedure to end. When the sources
have been fully copied, return to the overview of existing information sources
and close the configuration by selecting Finish.
Your installation server is now fully configured and ready for service. It is auto-
matically started every time the system is started. No further intervention is re-
quired. You only need to configure and start this service correctly by hand if you
have deactivated the automatic configuration of the selected network service
with YaST as an initial step.
To deactivate an installation source, select the installation source to remove then select
Delete. The installation data are removed from the system. To deactivate the network
service, use the respective YaST module.
If your installation server should provide the installation data for more than one product
of product version, start the YaST installation server module and select Add in the
overview of existing installation sources to configure the new installation source.
1 Log in as root.
2 Create a directory that should later hold all installation data and change into this
directory. For example:
mkdir install/product/productversion
cd install/product/productversion
3 For each CD contained in the media kit execute the following commands:
3a Copy the entire content of the installation CD into the installation server di-
rectory:
cp -a /media/path_to_your_CD-ROM_drive .
On SUSE Linux Enterprise Server, you can export the installation sources with NFS
using YaST. Proceed as follows:
1 Log in as root.
4 Select Add Directory and browse for the directory containing the installation
sources, in this case, productversion.
Remote Installation 59
5 Select Add Host and enter the hostnames of the machines to which to export the
installation data. Instead of specifying hostnames here, you could also use wild
cards, ranges of network addresses, or just the domain name of your network.
Enter the appropriate export options or leave the default, which works fine in
most setups. For more information about the syntax used in exporting NFS shares,
read the exports man page.
6 Click Finish. The NFS server holding the SUSE Linux Enterprise installation
sources is automatically started and integrated into the boot process.
If you prefer manually exporting the installation sources via NFS instead of using the
YaST NFS Server module, proceed as follows:
1 Log in as root.
This exports the directory //productversion to any host that is part of this
network or to any host that can connect to this server. To limit the access to this
server, use netmasks or domain names instead of the general wild card *. Refer
to the export man page for details. Save and exit this configuration file.
3 To add the NFS service to the list of servers started during system boot, execute
the following commands:
insserv /etc/init.d/nfsserver
insserv /etc/init.d/portmap
4 Start the NFS server with rcnfsserver start. If you need to change the
configuration of your NFS server later, modify the configuration file and restart
the NFS daemon with rcnfsserver restart.
Announcing the NFS server via OpenSLP makes its address known to all clients in
your network.
1 Log in as root.
4 Save this configuration file and start the OpenSLP daemon with rcslpd start.
For more information about OpenSLP, refer to the package documentation located under
/usr/share/doc/packages/openslp/ or refer to Chapter 31, SLP Services
in the Network (page 601).
2 Configure the FTP server to distribute the contents of your installation directory:
2a Log in as root and install the package vsftpd using the YaST package
manager.
2c Create a subdirectory holding the installation sources in the FTP root direc-
tory:
mkdir instsource
Remote Installation 61
2d Mount the contents of the installation repository into the change root envi-
ronment of the FTP server:
mount --bind path_to_instsource /srv/ftp/instsource
3 Announce the installation source via OpenSLP, if this is supported by your net-
work setup:
Replace instsource with the actual name to the installation source direc-
tory on your server. The service: line should be entered as one continuous
line.
3b Save this configuration file and start the OpenSLP daemon with rcslpd
start.
2c Create a symbolic link from the location of the installation sources to the
root directory of the Web server (/srv/www/htdocs):
ln -s /path_instsource /srv/www/htdocs/instsource
with
Options Indexes FollowSymLinks
3 Announce the installation source via OpenSLP, if this is supported by your net-
work setup:
Remote Installation 63
3b Save this configuration file and start the OpenSLP daemon using rcslpd
restart.
To set up an exported Windows Share holding your SUSE Linux Enterprise installation
sources, proceed as follows:
2 Start Explorer and create a new folder that will hold the entire installation tree
and name it INSTALL, for example.
3 Export this share according the procedure outlined in your Windows documenta-
tion.
4 Enter this share and create a subfolder, called product. Replace product
with the actual product name.
2 Select Installation.
4 Choose SMB and enter the Windows machine's name or IP address, the share
name (INSTALL/product/CD1, in this example), username, and password.
After you hit Enter, YaST starts and you can perform the installation.
1 Download the ISO images and save them to the machine to use as the installation
server.
2 Log in as root.
3 Choose and create an appropriate location for the installation data, as described
in Section 4.2.2, “Setting Up an NFS Installation Source Manually” (page 58),
Section 4.2.3, “Setting Up an FTP Installation Source Manually” (page 61), or
Section 4.2.4, “Setting Up an HTTP Installation Source Manually” (page 62).
5 To mount and unpack each ISO image to the final location, issue the following
command:
Replace path_to_iso with the path to your local copy of the ISO image,
path_to_instsource with the source directory of your server, product
with the product name, and mediumx with the type (CD or DVD) and number
of media you are using.
6 Repeat the previous step to mount all ISO images needed for your product.
Remote Installation 65
4.3 Preparing the Boot of the Target
System
This section covers the configuration tasks needed in complex boot scenarios. It contains
ready-to-apply configuration examples for DHCP, PXE boot, TFTP, and Wake on
LAN.
4 Select Expert Settings and select Yes when warned about leaving the start-up di-
alog.
5 In the Configured Declarations dialog, select the subnet in which the new system
should be located and click Edit.
6 In the Subnet Configuration dialog select Add to add a new option to the subnet's
configuration.
To configure DHCP to provide a static IP address to a specific host, enter the Expert
Settings of the DHCP server configuration module (Step 4 (page 66)) and add a new
declaration of the host type. Add the options hardware and fixed-address to
this host declaration and provide the appropriate values.
2 Append the following lines to your DHCP server's configuration file located
under /etc/dhcpd.conf:
group {
# PXE related stuff
#
# "next server" defines the tftp server that will be used
next server ip_tftp_server:
#
# "filename" specifies the pxelinux image on the tftp server
# the server runs in chroot under /srv/tftpboot
filename "pxelinux.0";
}
If you plan on using SSH for the remote control of a PXE and Wake on LAN installation,
explicitly specify the IP address DHCP should provide to the installation target. To
achieve this, modify the above-mentioned DHCP configuration according to the follow-
ing example:
Remote Installation 67
group {
# PXE related stuff
#
# "next server" defines the tftp server that will be used
next server ip_tftp_server:
#
# "filename" specifies the pxelinux image on the tftp server
# the server runs in chroot under /srv/tftpboot
filename "pxelinux.0";
host test { hardware ethernet mac_address;
fixed-address some_ip_address; }
}
The host statement introduces the hostname of the installation target. To bind the
hostname and IP address to a specific host, you must know and specify the system's
hardware (MAC) address. Replace all the variables used in this example with the actual
values that match your environment.
After restarting the DHCP server, it provides a static IP to the host specified, enabling
you to connect to the system via SSH.
2 Start YaST > Network Services > TFTP Server and install the requested package.
3 Click Enable to make sure that the server is started and included in the boot
routines. No further action from your side is required to secure this. xinetd starts
tftpd at boot time.
4 Click Open Port in Firewall to open the appropriate port in the firewall running
on your machine. If there is no firewall running on your server, this option is not
available.
3 Add the appropriate files needed for the boot image as described in Section 4.3.3,
“Using PXE Boot” (page 70).
4a If it does not exist, create a file called tftp under this directory with touch
tftp. Then run chmod 755 tftp.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /srv/tftpboot
disable = no
}
Remote Installation 69
4.3.3 Using PXE Boot
Some technical background information as well as PXE's complete specifications are
available in the Preboot Execution Environment (PXE) Specification (http://www
.pix.net/software/pxeboot/archive/pxespec.pdf).
1 Change to the directory of your installation repository and copy the linux,
initrd, message, and memtest files to the /srv/tftpboot directory
by entering the following:
cp -a boot/loader/linux boot/loader/initrd
boot/loader/message boot/loader/memtest /srv/tftpboot
2 Install the syslinux package directly from your installation CDs or DVDs
with YaST.
4 Change to the directory of your installation repository and copy the isolinux
.cfg file to /srv/tftpboot/pxelinux.cfg/default by entering the
following:
cp -a boot/loader/isolinux.cfg /srv/tftpboot/pxelinux.cfg/default
6 Insert the following entries in the append lines of the default failsafe and
apic labels:
insmod=kernel module
By means of this entry, enter the network kernel module needed to support
network installation on the PXE client. Replace kernel module with the
appropriate module name for your network device.
install=nfs://ip_instserver/path_instsource/CD1
This entry defines the NFS server and the installation source for the client
installation. Replace ip_instserver with the actual IP address of your
installation server. path_instsource should be replaced with the actual
path to the installation sources. HTTP, FTP, or SMB sources are addressed
in a similar manner, except for the protocol prefix, which should read http,
ftp, or smb.
IMPORTANT
default linux
# default
label linux
kernel linux
append initrd=initrd ramdisk_size=65536 insmod=e100 \
install=nfs://ip_instserver/path_instsource/product/CD1
# failsafe
label failsafe
kernel linux
append initrd=initrd ramdisk_size=65536 ide=nodma apm=off acpi=off \
insmod=e100 install=nfs://ip_instserver/path_instsource/product/CD1
# apic
Remote Installation 71
label apic
kernel linux
append initrd=initrd ramdisk_size=65536 apic insmod=e100 \
install=nfs://ip_instserver/path_instsource/product/CD1
# manual
label manual
kernel linux
append initrd=initrd ramdisk_size=65536 manual=1
# rescue
label rescue
kernel linux
append initrd=initrd ramdisk_size=65536 rescue=1
# memory test
label memtest
kernel memtest
# hard disk
label harddisk
localboot 0
implicit 0
display message
prompt 1
timeout 100
The following section serves as a short reference to the PXELINUX options used
in this setup. Find more information about the options available in the documen-
tation of the syslinux package located under /usr/share/doc/
packages/syslinux/.
APPEND options...
Add one or more options to the kernel command line. These are added for both
automatic and manual boots. The options are added at the very beginning of the
kernel command line, usually permitting explicitly entered kernel options to override
them.
title mytitle
kernel my_kernel my_kernel_options
initrd myinitrd
label mylabel
kernel mykernel
append myoptions
Labels are mangled as if they were filenames and they must be unique after man-
gling. For example, the two labels “v2.1.30” and “v2.1.31” would not be distin-
guishable under PXELINUX because both mangle to the same DOS filename.
The kernel does not have to be a Linux kernel; it can be a boot sector or a COM-
BOOT file.
APPEND -
Append nothing. APPEND with a single hyphen as argument in a LABEL section
can be used to override a global APPEND.
Remote Installation 73
LOCALBOOT type
On PXELINUX, specifying LOCALBOOT 0 instead of a KERNEL option means
invoking this particular label and causes a local disk boot instead of a kernel boot.
Argument Description
All other values are undefined. If you do not know what the UNDI or PXE stacks
are, specify 0.
TIMEOUT time-out
Indicates how long to wait at the boot prompt until booting automatically, in units
of 1/10 second. The time-out is canceled as soon as the user types anything on the
keyboard, assuming the user will complete the command begun. A time-out of zero
disables the time-out completely (this is also the default). The maximum possible
time-out value is 35996 (just less than one hour).
PROMPT flag_val
If flag_val is 0, displays the boot prompt only if Shift or Alt is pressed or Caps
Lock or Scroll Lock is set (this is the default). If flag_val is 1, always displays
the boot prompt.
F2 filename
F1 filename
..etc...
F9 filename
F10 filename
Displays the indicated file on the screen when a function key is pressed at the boot
prompt. This can be used to implement preboot online help (presumably for the
kernel command line options). For backward compatibility with earlier releases,
Do not place the PXE option ahead of the hard disk boot option in the BIOS.
Otherwise this system would try to reinstall itself every time you boot it.
If the controlling machine is not located in the same network segment as the
installation target that should be awakened, either configure the WOL requests
to be sent as multicasts or remotely control a machine on that network segment
to act as the sender of these requests.
Remote Installation 75
Users of SUSE Linux Enterprise Server 9 and higher can use a YaST module called
WOL to easily configure Wake on LAN. Users of other versions of SUSE Linux-based
operating systems can use a command line tool.
3 Click Add and enter the hostname and MAC address of the target system.
4 To turn on this machine, select the appropriate entry and click Wake up.
2 Start YaST > Software Management and install the package netdiag.
3 Open a terminal and enter the following command as root to wake the target:
ether-wake mac_of_target
See the table below for a complete set of the options available.
• resolution #2
• ...
Remote Installation 77
Key Purpose Available Options Default Value
• FTP
• HTTP
• NFS
• SMB
• Hard Disk
The following table lists all installation scenarios mentioned in this chapter with the
required parameters for booting and the corresponding boot options. Just append all of
them in the order they appear in this table to get one boot option string that is handed
to the installation routines. For example (all in one line):
Replace all the values (...) in this string with the values appropriate for your setup.
Section 4.1.3, “Remote • Location of the in- Not applicable; process man-
Installation via stallation server aged through PXE and DHCP
VNC—PXE Boot and • Location of the
Wake on LAN” TFTP server
(page 51) • VNC enablement
• VNC password
Remote Installation 79
Installation Scenario Parameters Needed Boot Options
for Booting
Section 4.1.6, “Remote • Location of the in- Not applicable; process man-
Installation via stallation server aged through PXE and DHCP
SSH—PXE Boot and • Location of the
Wake on LAN” TFTP server
(page 55) • SSH enablement
• SSH password
Find more information about the linuxrc boot options used for booting a Linux
system in /usr/share/doc/packages/linuxrc/linuxrc.html.
The installation program announces the IP address and display number needed to connect
for installation. If you have physical access to the target system, this information is
provided right after the system booted for installation. Enter this data when your VNC
client software prompts for it and provide your VNC password.
Because the installation target announces itself via OpenSLP, you can retrieve the address
information of the installation target via an SLP browser without the need for any
physical contact to the installation itself provided your network setup and all machines
support OpenSLP:
Remote Installation 81
1 Start the KDE file and Web browser Konqueror.
Using VNC, you can control the installation of a Linux system from any other operating
system, including other Linux flavors, Windows, or Mac OS.
On a Linux machine, make sure that the package tightvnc is installed. On a Windows
machine, install the Windows port of this application, which can be obtained at the
TightVNC home page (http://www.tightvnc.com/download.html).
2 Enter the IP address and display number of the installation target as provided by
the SLP browser or the installation program itself:
ip_address:display_number
Using a Web browser to connect to the installation program makes you totally indepen-
dent of any VNC software or the underlying operating system. As long as the browser
application has Java support enabled, you can use any browser (Firefox, Internet Ex-
plorer, Konqueror, Opera, etc.) to perform the installation of your Linux system.
3 Enter your VNC password when prompted to do so. The browser window now
displays the YaST screens as in a normal local installation.
Remote Installation 83
4 When prompted for the password, enter the password that has been set with the
SSH boot option. After you have successfully authenticated, a command line
prompt for the installation target appears.
5 Enter yast to launch the installation program. A window opens showing the
normal YaST screens as described in Chapter 3, Installation with YaST (page 17).
This scenario assumes you are rolling out SUSE Linux Enterprise to a set of
machines with exactly the same hardware configuration.
1 Create an AutoYaST profile that contains the installation details needed for your
deployment as described in Section 5.1.1, “Creating an AutoYaST Profile”
(page 86).
2 Determine the source of the AutoYaST profile and the parameter to pass to the
installation routines as described in Section 5.1.2, “Distributing the Profile and
Determining the autoyast Parameter” (page 88).
3 Determine the source of the SUSE Linux Enterprise installation data as described
in Section 5.1.3, “Providing the Installation Data” (page 91).
Automated Installation 85
4 Determine and set up the boot scenario for autoinstallation as described in Sec-
tion 5.1.4, “Setting Up the Boot Scenario” (page 91).
5 Pass the command line to the installation routines by adding the parameters
manually or by creating an info file as described in Section 5.1.5, “Creating
the info File” (page 93).
• Use the AutoYaST GUI to create and modify a profile to meet your requirements
2 After you complete the hardware configuration and read the release notes, check
Clone This Installation for AutoYaST, if it is not yet checked by default. This
creates a ready-to-use profile as /root/autoinst.xml that can be used to
create clones of this particular installation.
To use the AutoYaST GUI to create a profile from an existing system configuration
and modify it to your needs, proceed as follows:
4 As well as the default resources, like boot loader, partitioning, and software se-
lection, you can add various other aspects of your system to the profile by
checking the items in the list in Create a Reference Control File.
5 Click Create to have YaST gather all the system information and write it to a
new profile.
• If the profile is complete and matches your requirements, select File > Save
as and enter a filename for the profile, such as autoinst.xml.
Automated Installation 87
Figure 5.1 Editing an AutoYaST Profile with the AutoYaST Front-End
Replace the server and path placeholders with values matching your actual setup.
Automated Installation 89
AutoYaST includes a feature that allows binding certain profiles to the client's MAC
address. Without having to alter the autoyast= parameter, you can have the same
setup install several different instances using different profiles.
1 Create separate profiles with the MAC address of the client as the filename and
put them on the HTTP server that holds your AutoYaST profiles.
2 Omit the exact path including the filename when creating the autoyast= pa-
rameter, for example:
autoyast=http://192.0.2.91/
YaST tries to determine the location of the profile in the following way:
1. YaST searches for the profile using its own IP address in uppercase hexadecimal,
for example, 192.0.2.91 is C000025B.
2. If this file is not found, YaST removes one hex digit and tries again. This action
is repeated eight times until the file with the correct name is found.
3. If that still fails, it tries looking for a file with the MAC address of the clients as
the filename. The MAC address of the example client is 0080C8F6484C.
4. If the MAC address–named file cannot be found, YaST searches for a file named
default (in lowercase). An example sequence of addresses where YaST
searches for the AutoYaST profile looks as follows:
C000025B
C000025
C00002
C0000
C000
C00
C0
C
0080C8F6484C
default
To provide the installation sources over the network, set up a network installation
server (HTTP, NFS, FTP) as described in Section 4.2.1, “Setting Up an Installation
Server Using YaST” (page 56). Use an info file to pass the server's location to the
installation routines.
Network Boot
As for a normal remote installation, autoinstallation can be initiated with Wake on
LAN and PXE, the boot image and control file can be pulled in via TFTP, and the
installation sources from any network installation server.
Bootable CD-ROM
You can use the original SUSE Linux Enterprise media to boot the system for au-
toinstallation and pull in the control file from a network location or a floppy. Alter-
natively, create your own custom CD-ROM holding both the installation sources
and the AutoYaST profile.
The following sections provide a basic outline of the procedures for network boot or
boot from CD-ROM.
Automated Installation 91
default linux
default linux
Replace the example IP addresses and paths with the data used in your setup.
Boot from SUSE Linux Enterprise Media, Get the Profile over the Network
Use this approach if a totally network-based scenario is not possible (for example,
if your hardware does not support PXE) and you have physical access to system
to install during most of the process.
You need:
• A network server providing the profile data (see Section 5.1.2, “Distributing the
Profile and Determining the autoyast Parameter” (page 88) for details)
• A floppy containing the info file that tells the installation routines where to find
the profile
or
Boot and Install from SUSE Linux Enterprise Media, Get the Profile from a Floppy
Use this approach if an entirely network-based installation scenario would not
work. It requires physical access to the system to install for turning on the target
machine, or, in the second case, to enter the profile's location at the boot prompt.
In both cases, you may also need to change media depending on the scope of instal-
lation.
You need:
or
Access to the boot prompt of the target to enter the autoyast= parameter
Boot and Install from Custom Media, Get the Profile from the Media
If you just need to install a limited number of software packages and the number
of targets is relatively low, creating your own custom CD holding both the installa-
tion data and the profile itself might prove a good idea, especially if no network is
available in your setup.
Do this by manually passing these parameters at the boot prompt of the installation or
by providing a file called info that is read by the installation routines (linuxrc). The
former requires physical access to any client to install, which makes this approach un-
suitable for large deployments. The latter enables you to provide the info file on some
media that is prepared and inserted into the clients' drives prior to the autoinstallation.
Alternatively, use PXE boot and include the linuxrc parameters in the pxelinux
.cfg/default file as shown in Section “Preparing for Network Boot” (page 91).
Automated Installation 93
The following parameters are commonly used for linuxrc. For more information, refer
to the AutoYaST package documentation under /usr/share/doc/packages/
autoyast.
Keyword Value
netmask Netmask.
gateway Gateway.
autoyast Location of the the control file to use for the automatic in-
stallation, such as
autoyast=http://192.168.2.1/profiles/.
If you prefer a static network setup at installation time, your info file would look like
the following:
autoyast:profile_source \
install:install_source \
hostip:some_ip \
netmask:some_netmask \
gateway:some_gateway
The \ indicate that the line breaks have only been added for the sake of readability. All
options must be entered as one continuous string.
The info data can be made available to linuxrc in various different ways:
• As a file in the root directory of a floppy that is in the client's floppy drive at instal-
lation time.
• As a file in the root directory of the initial RAM disk used for booting the system
provided either from custom installation media or via PXE boot.
• As part of the AutoYaST profile. In this case, the AutoYaST file needs to be called
info to enable linuxrc to parse it. An example for this approach is given below.
linuxrc looks for a string (start_linuxrc_conf) in the profile that represents the
beginning of the file. If it is found, it parses the content starting from that string and
finishes when the string end_linuxrc_conf is found. The options are stored in the
profile as follows:
....
<install>
....
<init>
<info_file>
<![CDATA[
#
# Don't remove the following line:
# start_linuxrc_conf
#
install: nfs:server/path
Automated Installation 95
vnc: 1
vncpassword: test
autoyast: file:///info
# end_linuxrc_conf
# Do not remove the above comment
#
]]>
</info_file>
</init>
......
</install>
....
linuxrc loads the profile containing the boot parameters instead of the traditional info
file. The install: parameter points to the location of the installation sources. vnc
and vncpassword indicate the use of VNC for installation monitoring. The
autoyast parameter tells linuxrc to treat info as an AutoYaST profile.
• If the client system boots from any kind of physical media, either product media
or custom CDs, you need to insert these into the client's drives.
• If the client is not switched on via Wake on LAN, you need to at least switch on
the client machine.
• If you have not opted for remote controlled autoinstallation, the graphical feedback
from AutoYaST is sent to the client's attached monitor or, if you use a headless
client, to a serial console.
To enable remote controlled autoinstallation, use the VNC or SSH parameters described
in Section 5.1.5, “Creating the info File” (page 93) and connect to the client from
another machine as described in Section 4.5, “Monitoring the Installation Process”
(page 81).
• Are the machines on your site of different hardware configuration (for example,
using different devices or using different memory and disk sizes)?
• Do you intend to install across different domains and need to distinguish between
them?
What rule-based autoinstallation does is, basically, generate a custom profile to match
a heterogeneous scenario by merging several profiles into one. Each rule describes one
particular distinctive feature of your setup (such as disk size) and tells AutoYaST which
profile to use when the rule matches. Several rules describing different features of your
setup are combined in an AutoYaST rules.xml file. The rule stack is then processed
and AutoYaST generates the final profile by merging the different profiles matching
the AutoYaST rules into one. To illustrate this procedure, refer to Section 5.2.2, “Ex-
ample Scenario for Rule-Based Autoinstallation” (page 99).
Rule-based AutoYaST offers you great flexibility in planning and executing your SUSE
Linux Enterprise deployment. You can:
• Create rules for matching any of the predefined system attributes in AutoYaST
• Combine multiple system attributes (such as disk size and kernel architecture) into
one rule by using logical operators
Automated Installation 97
• Create custom rules by running shell scripts and passing their output to the Auto-
YaST framework. The number of custom rules is limited to five.
NOTE
For more information about rule creation and usage with AutoYaST, refer to
the package's documentation under /usr/share/doc/packages/
autoyast2/html/index.html, Chapter Rules and Classes.
1 Create several AutoYaST profiles that contain the installation details needed for
your heterogeneous setup as described in Section 5.1.1, “Creating an AutoYaST
Profile” (page 86).
2 Define rules to match the system attributes of your hardware setup as shown in
Section 5.2.2, “Example Scenario for Rule-Based Autoinstallation” (page 99).
3 Determine the source of the AutoYaST profile and the parameter to pass to the
installation routines as described in Section 5.1.2, “Distributing the Profile and
Determining the autoyast Parameter” (page 88).
4 Determine the source of the SUSE Linux Enterprise installation data as described
in Section 5.1.3, “Providing the Installation Data” (page 91)
5 Pass the command line to the installation routines by adding the parameters
manually or by creating an info file as described in Section 5.1.5, “Creating
the info File” (page 93).
6 Determine and set up the boot scenario for autoinstallation as described in Sec-
tion 5.1.4, “Setting Up the Boot Scenario” (page 91).
A Print Server
This machine just needs a minimal installation without a desktop environment and
a limited set of software packages.
Automated Installation 99
Figure 5.2 AutoYaST Rules
AutoYaST Directory
Enigineering Department
Computers
rules.xml File
Rule 1
Rule 3
Sales Profile
Sales Department
Laptops
Print Server
In a first step, use one of the methods outlined in Section 5.1.1, “Creating an AutoYaST
Profile” (page 86) to create profiles for each use case. In this example, you would
create print.xml, engineering.xml, and sales.xml.
1. Does the machine have an IP of 192.168.27.11? Then make it the print server.
2. Does the machine have PCMCIA hardware and feature an Intel chipset? Then
consider it an Intel laptop and install the sales department software selection.
3. If none of the above is true, consider the machine a developer workstation and install
accordingly.
Roughly sketched, this translates into a rules.xml file with the following content:
<?xml version="1.0"?>
<!DOCTYPE autoinstall SYSTEM "/usr/share/autoinstall/dtd/rules.dtd">
<autoinstall xmlns="http://www.suse.com/1.0/yast2ns"
xmlns:config="http://www.suse.com/1.0/configns">
<rules config:type="list">
<rule>
<hostaddress>
<match>192.168.27.11</match>
<match_type>exact</match_type>
</hostaddress>
<result>
<profile>print.xml</profile>
<continue config:type="boolean">false</continue>
</result>
</rule>
<rule>
<haspcmcia>
<match>1</match>
<match_type>exact</match_type>
</haspcmcia>
<custom1>
<script>
if grep -i intel /proc/cpuinfo > /dev/null; then
echo -n "intel"
else
echo -n "non_intel"
fi;
</script>
<match>*</match>
<match_type>exact</match_type>
</custom1>
<result>
<profile>sales.xml</profile>
<continue config:type="boolean">false</continue>
</result>
When distributing the rules file, make sure that the rules directory resides under the
profiles directory specified in the autoyast=protocol:serverip/
profiles/ URL. AutoYaST looks for a rules subdirectory containing a file named
rules.xml first then loads and merges the profiles specified in the rules file.
Creating a custom installation, rolling it out to your hardware, and personalizing the
final product involves the following steps:
1 Prepare the master machine whose disk should be cloned to the client machines.
For more information, refer to Section 6.1, “Preparing the Master Machine”
(page 104).
2 Customize the firstboot workflow. For more information, refer to Section 6.2,
“Customizing the Firstboot Installation” (page 104).
3 Clone the master machine's disk and roll this image out to the clients' disks. For
more information, refer to Section 6.3, “Cloning the Master Installation”
(page 112).
4 Have the end user personalize the instance of SUSE Linux Enterprise. For more
information, refer to Section 6.4, “Personalizing the Installation” (page 113).
4 To define your own workflow of YaST configuration steps for the end user or
add your own YaST modules to this workflow, proceed to Section 6.2, “Customiz-
ing the Firstboot Installation” (page 104). Otherwise proceed directly to Step 5
(page 104).
/etc/sysconfig/firstboot
Configure various aspects of firstboot, such as release notes, scripts, and license
actions.
/etc/YaST2/firstboot.xml
Configure the installation workflow by enabling or disabling components or adding
custom ones.
1 Log in as root.
3 Create the welcome file and the localized versions and place them in the directory
specified in the /etc/sysconfig/firstboot configuration file.
Proceed in a similar way to configure customized license and finish messages. These
variables are FIRSTBOOT_LICENSE_DIR and FIRSTBOOT_FINISH_FILE.
halt
The firstboot installation is aborted and the entire system shuts down. This is the
default setting.
continue
The firstboot installation continues.
abort
The firstboot installation is aborted, but the system tries to boot.
1 Create your own release notes file. Use the RTF format as in the example file in
/usr/share/doc/release-notes and save the result as
RELEASE-NOTES.en.rtf (for English).
2 Store optional localized versions next to the original version and replace the en
part of the filename with the actual ISO 639 language code, such as de for Ger-
man.
• Language Selection
• Welcome
• License Agreement
• Host Name
• Network
• Desktop
• root Password
• User Management
• Hardware Configuration
• Finish Setup
This standard layout of a firstboot installation workflow is not mandatory. You can
enable or disable certain components or hook your own modules into the workflow.
To modify the firstboot workflow, manually edit the firstboot configuration file /etc/
YaST2/firstboot.xml. This XML file is a subset of the standard control.xml
file that is used by YaST to control the installation workflow.
The following overview provides you with enough background to modify the firstboot
installation workflow. In it, see the basic syntax of the firstboot configuration file and
how the key elements are configured.
…
<proposals config:type="list">❶
<proposal>❷
<name>firstboot_hardware</name>❸
<mode>installation</mode>❹
<stage>firstboot</stage>❺
<label>Hardware Configuration</label>❻
<proposal_modules config:type="list">❼
<proposal_module>printer</proposal_module>❽
</proposal_modules>
</proposal>
<proposal>
…
</proposal>
</proposals>
❶ The container for all proposals that should be part of the firstboot workflow.
❷ The container for an individual proposal.
❸ The internal name of the proposal.
❹ The mode of this proposal. Do not make any changes here. For a firstboot instal-
lation, this must be set to installation.
The next section of the firstboot configuration file consists of the workflow definition.
All modules that should be part of the firstboot installation workflow must be listed
here.
<workflows config:type="list">
<workflow>
<defaults>
<enable_back>yes</enable_back>
<enable_next>yes</enable_next>
<archs>all</archs>
</defaults>
<stage>firstboot</stage>
<label>Configuration</label>
<mode>installation</mode>
… <!–– list of modules ––>
</modules>
</workflow>
</workflows>
…
The overall structure of the workflows section is very similar to that of the
proposals section. A container holds the workflow elements and the workflow ele-
ments all include stage, label and mode information just as the proposals introduced in
Example 6.1, “Configuring the Proposal Screens” (page 108). The most notable difference
is the defaults section, which contains basic design information for the workflow
components:
enable_back
Include the Back button in all dialogs.
enable_next
Include the Next button in all dialogs.
<modules config:type="list">❶
<module>❷
<label>Language</label>❸
<enabled config:type="boolean">false</enabled>❹
<name>firstboot_language</name>❺
</module>
<modules>
To make changes to the number or order of proposal screens during the firstboot instal-
lation, proceed as follows:
2 Delete or add proposal screens or change the order of the existing ones:
• To add a new proposal, create a new proposal element and fill in all the
required subelements. Make sure that the proposal exists as a YaST module
in /usr/share/YaST2/clients.
You can always change the workflow of the configuration steps when the default does
not meet your needs. Enable or disable certain modules in the workflow or add your
own custom ones.
2 Change the value for the enabled element from true to false to disable
the module or from false to true to enable it again.
<module>
<label>Time and Date</label>
<enabled config:type="boolean">true</enabled>
<name>firstboot_timezone</name>
</module>
1 Create your own YaST module and store the module file module_name.ycp
in /usr/share/YaST2/clients.
3 Determine at which point of the workflow your new module should be run. In
doing so, make sure that possible dependencies to other steps in the workflow
are taken into account and resolved.
4 Create a new module element inside the modules container and add the appro-
priate subelements:
<modules config:type="list">
…
<module>
<label>my_module</label>
<enabled config:type="boolean">true</enabled>
<name>filename_my_module</name>
</module>
</modules>
4b Make sure that enabled is set to true to have your module included in
the workflow.
4c Enter the filename of your module in the name element. Omit the full path
and the .ycp suffix.
2 Create your shell script, store it in the specified directory, and apply the appropri-
ate file permissions.
WARNING
Using LVM might be associated with increased risk, such as data loss. Risks also
include application crashes, power failures, and faulty commands. Save your
data before implementing LVM or reconfiguring volumes. Never work without
a backup.
VG 1 VG 2
LV 1 LV 2 LV 3 LV 4
MP MP MP MP MP MP MP
Figure 7.1, “Physical Partitioning versus LVM” (page 116) compares physical partitioning
(left) with LVM segmentation (right). On the left side, one single disk has been divided
into three physical partitions (PART), each with a mount point (MP) assigned so that
the operating system can access them. On the right side, two disks have been divided
into two and three physical partitions each. Two LVM volume groups (VG 1 and VG 2)
have been defined. VG 1 contains two partitions from DISK 1 and one from DISK 2.
VG 2 contains the remaining two partitions from DISK 2. In LVM, the physical disk
partitions that are incorporated in a volume group are called physical volumes (PVs).
Within the volume groups, four logical volumes (LV 1 through LV 4) have been defined,
which can be used by the operating system via the associated mount points. The border
LVM features:
• Using LVM, it is possible to add hard disks or LVs in a running system. However,
this requires hot-swappable hardware that is capable of such actions.
• It is possible to activate a "striping mode" that distributes the data stream of a logical
volume over several physical volumes. If these physical volumes reside on different
disks, this can improve the reading and writing performance just like RAID 0.
• The snapshot feature enables consistent backups (especially for servers) in the
running system.
With these features, using LVM already makes sense for heavily used home PCs or
small servers. If you have a growing data stock, as in the case of databases, music
archives, or user directories, LVM is just the right thing for you. This would allow file
systems that are larger than the physical hard disk. Another advantage of LVM is that
up to 256 LVs can be added. However, keep in mind that working with LVM is different
from working with conventional partitions. Instructions and further information about
configuring LVM is available in the official LVM HOWTO at http://tldp.org/
HOWTO/LVM-HOWTO/.
Starting from kernel version 2.6, LVM version 2 is available, which is downward-
compatible with the previous LVM and enables the continued management of old volume
groups. When creating new volume groups, decide whether to use the new format or
the downward-compatible version. LVM 2 does not require any kernel patches. It makes
use of the device mapper integrated in kernel 2.6. This kernel only supports LVM ver-
sion 2. Therefore, when talking about LVM, this section always refers to LVM version 2.
Instead of LVM 2, you can use EVMS (Enterprise Volume Management System),
which offers a uniform interface for logical volumes and RAID volumes. Like LVM 2,
EVMS makes use of the device mapper in kernel 2.6.
If there are several volume groups, set the current volume group in the selection box
to the upper left. The buttons in the upper right enable creation of additional volume
groups and deletion of existing volume groups. Only volume groups that do not have
any partitions assigned can be deleted. All partitions that are assigned to a volume group
are also referred to as a physical volumes (PV).
To add a previously unassigned partition to the selected volume group, first click the
partition then Add Volume. At this point, the name of the volume group is entered next
to the selected partition. Assign all partitions reserved for LVM to a volume group.
Otherwise, the space on the partition remains unused. Before exiting the dialog, every
volume group must be assigned at least one physical volume. After assigning all phys-
ical volumes, click Next to proceed to the configuration of logical volumes.
To create a new logical volume, click Add and fill out the pop-up that opens. As for
partitioning, enter the size, file system, and mount point. Normally, a file system, such
as reiserfs or ext2, is created on a logical volume and is then designated a mount point.
The files stored on this logical volume can be found at this mount point on the installed
system. Additionally it is possible to distribute the data stream in the logical volume
among several physical volumes (striping). If these physical volumes reside on different
hard disks, this generally results in a better reading and writing performance (like
RAID 0). However, a striping LV with n stripes can only be created correctly if the
hard disk space required by the LV can be distributed evenly to n physical volumes.
WARNING: Striping
YaST has no chance at this point to verify the correctness of your entries con-
cerning striping. Any mistake made here is apparent only later when the LVM
is implemented on disk.
If you have already configured LVM on your system, the existing logical volumes can
be entered now. Before continuing, assign appropriate mount points to these logical
volumes too. With Next, return to the YaST Expert Partitioner and finish your work
there.
EVMS2 provides a unified interface (evmsgui and command line) for managing the
following storage resources:
• Physical disks and logical devices on local media and SAN-based media, including
iSCSI
• Cluster storage objects with the Cluster Segment Manager (CSM) plug-in
• Volumes for all file systems that have a file system interface module (FSIM) for
EVMS2
• Snapshots of volumes
In SUSE Linux Enterprise Server 10, new features include the following:
• EVMS2 and CLVM2 (Cluster Linux Volume Manager 2) use the same multidisk
(MD) drivers and device mapper (DM) drivers in the kernel.
• File system plug-ins are available for Heartbeat 2 Cluster Manager and Oracle
Cluster File System 2.
EVMS Devices
The EVMS Administration Utility distinguishes five different levels of devices:
Segments
Segments consist of partitions and other memory regions on a disk, such as the
master boot record (MBR).
Containers
These are the counterparts of volume groups in LVM.
Regions
The available devices are grouped into LVM2 and RAID here.
Volumes
All devices, regardless of whether they are represented by a real partition, a logical
volume, or a RAID device are available with their respective mount points.
If you choose to use EVMS, you must replace your device names with the EVMS device
names. Simple partitions are found in /dev/evms/, logical volumes in /dev/evms/
lvm/, and RAID devices in /dev/evms/md. To activate EVMS at boot time, add
boot.evms to the boot scripts in the YaST runlevel editor. See also Section 20.2.3,
“Configuring System Services (Runlevel) with YaST” (page 398).
RAID 0
This level improves the performance of your data access by spreading out blocks
of each file across multiple disk drives. Actually, this is not really a RAID, because
it does not provide data backup, but the name RAID 0 for this type of system has
become the norm. With RAID 0, two or more hard disks are pooled together. The
performance is very good, but the RAID system is destroyed and your data lost if
even one hard disk fails.
RAID 1
This level provides adequate security for your data, because the data is copied to
another hard disk 1:1. This is known as hard disk mirroring. If a disk is destroyed,
a copy of its contents is available on another one. All of them except one could be
damaged without endangering your data. However, if damage is not detected, it
also may happen that damaged data is mirrored to the correct disk and data corrup-
tion happens that way. The writing performance suffers a little in the copying process
compared to when using single disk access (10 to 20 % slower), but read access is
significantly faster in comparison to any one of the normal physical hard disks,
because the data is duplicated so can be parallel scanned. Generally it can be said
that Level 1 provides nearly twice the read transaction rate of single disks and almost
the same write transaction rate as single disks.
RAID 4
Level 4 provides block-level striping just like Level 0 combined with a dedicated
parity disk. In the case of a data disk failure, the parity data is used to create a re-
placement disk. However, the parity disk may create a bottleneck for write access.
Nevertheless, Level 4 is sometimes used.
RAID 5
RAID 5 is an optimized compromise between Level 0 and Level 1 in terms of
performance and redundancy. The hard disk space equals the number of disks used
minus one. The data is distributed over the hard disks as with RAID 0. Parity blocks,
created on one of the partitions, are there for security reasons. They are linked to
each other with XOR, enabling the contents to be reconstructed by the corresponding
parity block in case of system failure. With RAID 5, no more than one hard disk
can fail at the same time. If one hard disk fails, it must be replaced as soon as pos-
sible to avoid the risk of losing data.
In the next dialog, choose between RAID levels 0, 1, and 5 (see Section 7.2.1, “RAID
Levels” (page 124) for details). After Next is clicked, the following dialog lists all parti-
tions with either the “Linux RAID” or “Linux native” type (see Figure 7.6, “RAID
Partitions” (page 126)). No swap or DOS partitions are shown. If a partition is already
assigned to a RAID volume, the name of the RAID device (for example, /dev/md0)
is shown in the list. Unassigned partitions are indicated with “--”.
To add a previously unassigned partition to the selected RAID volume, first click the
partition then Add. At this point, the name of the RAID device is entered next to the
selected partition. Assign all partitions reserved for RAID. Otherwise, the space on the
partition remains unused. After assigning all partitions, click Next to proceed to the
settings dialog where you can fine-tune the performance (see Figure 7.7, “File System
Settings” (page 127)).
As with conventional partitioning, set the file system to use as well as encryption and
the mount point for the RAID volume. Checking Persistent Superblock ensures that
the RAID partitions are recognized as such when booting. After completing the confi-
guration with Finish, see the /dev/md0 device and others indicated with RAID in the
expert partitioner.
7.2.3 Troubleshooting
Check the file /proc/mdstats to find out whether a RAID partition has been de-
stroyed. In the event of a system failure, shut down your Linux system and replace the
defective hard disk with a new one partitioned the same way. Then restart your system
and enter the command mdadm /dev/mdX --add /dev/sdX. Replace 'X' with
your particular device identifiers. This integrates the hard disk automatically into the
RAID system and fully reconstructs it.
• /usr/share/doc/packages/mdadm/Software-RAID.HOWTO.html
• http://en.tldp.org/HOWTO/Software-RAID-HOWTO.html
Configure the system with YaST using various YaST modules. Depending on the
hardware platform and the installed software, there are different ways to access YaST
in the installed system.
In KDE or GNOME, start the YaST Control Center from the main menu. Before YaST
starts, you are prompted to enter the root password, because YaST needs system ad-
ministrator permissions to change the system files.
To start YaST from the command line, enter the commands su (for changing to the
user root) and yast2. To start the text version, enter yast instead of yast2. Also
use the command yast to start the program from one of the virtual consoles.
For hardware platforms that do not support a display device of their own and for remote
administration on other hosts, run YaST remotely. First, open a console on the host on
which to display YaST and enter the command
ssh -X root@<system-to-configure> to log in to the system to configure
as root and redirect the X server output to your terminal. Following the successful
SSH login, enter yast2 to start YaST in graphical mode.
To save time, the individual YaST modules can be started directly. To start a module,
enter yast2 module_name. View a list of all module names available on your
system with yast2 -l or yast2 --list. Start the network module, for example,
with yast2 lan.
If you need work in a different language but do not want to change the system language
setting, run the YaST with the LANG variable set to your preferred language. Use a long
language code in the format langcode_statecode. For example, for American
English, enter LANG="en_US" yast2.
This command starts YaST using the specified language. The language is only valid
for this YaST session. The language settings of the terminal, other users, and your
other sessions remain unchanged.
If you run YaST remotely over SSH, YaST uses the language settings of your local
system.
YaST comes with two front-ends depending on the desktop installed on your
system. By default, the YaST gtk front-end runs on the GNOME desktop, and
the YaST qt front-end on the other desktops. This is defined with the WANT_UI
variable in the /sbin/yast2 script. Feature-wise, the gtk front-end is very
similar to the qt front-end described in the manuals. One exception is the gtk
software management module, which differs considerably from the qt port.
In SUSE® Linux Enterprise, software is available in the form of RPM packages. Nor-
mally, a package contains everything needed for a program: the program itself, the
configuration files, and all documentation. A list of individual packages is displayed
to the right in the individual package window. The content of this list is determined by
the currently selected filter. If, for example, the Patterns filter is selected, the individual
package window displays all packages of the current selection.
In the package manager, each package has a status that determines what to do with the
package, such as “Install” or “Delete.” This status is shown by a symbol in a status box
at the beginning of the line. Change the status by clicking or selecting the desired status
from the menu that opens when the item is right-clicked. Depending on the current sit-
The font color used for various packages in the individual package window provides
additional information. Installed packages for which a newer version is available on
the installation media are displayed in blue. Installed packages whose version numbers
are higher than those on the installation media are displayed in red. However, because
the version numbering of packages is not always linear, the information may not be
perfect, but should be sufficient to indicate problematic packages. If necessary, check
the version numbers.
Installing Packages
To install packages, select packages for installation and click Accept. Selected packages
should have the Install status icon. The package manager automatically checks the de-
pendencies and selects any other required packages (resolution of dependencies). To
view other packages required for installation before clicking Accept, choose Extras >
Show Automatic Package Changes from the main menu. After installing packages,
continue working with the package manager by clicking Install More or close it by
clicking Finish.
The package manager provides preselected groups for installation. You can select an
entire group instead of single packages. To view these groups, use Filter in the left
frame.
To display all packages on your installation media, use the filter Package Groups
and select zzz All at the bottom of the tree. SUSE Linux Enterprise contains a
number of packages and it might take some time to display this long list.
To uninstall a language from your system, select a language from the language list and
uncheck the status box at the beginning of a line.
NOTE
To view a list of the all installed packages from the selected installation source, select
the filter Installation Sources then select Installation Summary from Secondary Filters
and deactivate all check boxes except Keep.
The package status in the individual package window can be changed as usual. However,
the changed package may no longer meet the search criteria. To remove such packages
from the list, update the list with Update List.
To install sources for selected program, mark the check box in the Source column. If
you cannot see a check box, your installation sources do not contain the source of the
package.
Because this function saves the exact package list, it is only reliable when the
hardware is identical on the source and target systems. For more complicated
situations, AutoYaST, described in Chapter 5, Automated Installation (page 85),
may be a better choice.
Removing Packages
To remove packages, assign the correct status to the packages to remove and click Ac-
cept. Selected packages should have the Delete status. If a package required by other
installed packages is marked for deletion, the package manager issues an alert with
detailed information and alternative solutions.
Reinstalling Packages
If you find damaged files that belong to package or you want to reinstall the original
version of a package from your installation media, reinstall the package. To reinstall
packages, select packages for reinstallation and click Accept. Selected packages should
have the Update status. If any dependency issues arise with installed packages, the
package manager issues an alert with detailed information and alternative solutions.
In addition to the Search filter, all lists of the package manager feature a quick
search. Simply enter a letter to move the cursor to the first package in the list
whose name begins with this letter. The cursor must be in the list (by clicking
the list).
To find a package by name, select Name, enter the name of the package to find in the
search field, and click Search. To find a package by text in the description, select
Summary and Descriptions, enter a search string, and click Search.
To search for the package that contains a certain file, enter the name of the file, select
RPM "Provides", and click Search. To find all packages that depend on a particular
package, select RPM "Requires", enter the name of package, and click Search.
If you are familiar with the package structure of SUSE Linux Enterprise, you can use
the Package Groups filter to find packages by subject. This filter sorts the program
packages by subjects, such as applications, development, and hardware, in a tree
structure to the left. The more you expand the branches, the more specific the selection
is. This means fewer packages are displayed in the individual package window.
Installation Summary
After selecting the packages for installation, update, or deletion, view the installation
summary with Installation Summary. It shows how packages will be affected when you
click Accept. Use the check boxes to the left to filter the packages to view in the indi-
vidual package window. For example, to check which packages are already installed,
deactivate all check boxes except Keep.
The package status in the individual package window can be changed as usual. However,
the respective package may no longer meet the search criteria. To remove such packages
from the list, update the list with Update List.
The Description tab with the description of the selected package is automatically active.
To view information about package size, version, installation media, and other technical
details, select Technical Data. Information about provided and required files is in De-
pendencies. To view available versions with their installation sources, click Versions.
Disk Usage
During the selection of the software, the resource window at the bottom left of the
module displays the prospective disk usage of all mounted file systems. The colored
bar graph grows with every selection. As long as it remains green, there is sufficient
space. The bar color slowly changes to red as you approach the limit of disk space. If
you select too many packages for installation, an alert is displayed.
Checking Dependencies
Some packages depend on other packages. This means that the software of the package
only works properly if another package is also installed. There are some packages with
identical or similar functionality. If these packages use the same system resource, they
should not be installed at the same time (package conflict).
When the package manager starts, it examines the system and displays installed pack-
ages. When you select to install and remove packages, the package manager can auto-
matically check the dependencies and select any other required packages (resolution
of dependencies). If you select or deselect conflicting packages, the package manager
indicates this and submits suggestions for solving the problem (resolution of conflicts).
To activate the automatic dependency check, select Autocheck, located under the infor-
mation window. With Autocheck activated, any change of a package status triggers an
automatic check. This is a useful feature, because the consistency of the package selec-
tion is monitored permanently. However, this process consumes resources and can slow
down the package manager. For this reason, the automatic check is not activated by
default. Regardless of the state of Autocheck, a consistency check is performed when
you confirm your selection with Accept.
For example, sendmail and postfix may not be installed concurrently. Figure 8.3,
“Conflict Management of the Package Manager” (page 138) shows the conflict message
prompting you to make a decision. postfix is already installed. Accordingly, you
can refrain from installing sendmail, remove postfix, or take the risk and ignore
the conflict.
Unless you are very experienced, follow the suggestions of YaST when handling
package conflicts, because otherwise the stability and functionality of your
system could be endangered by the existing conflict.
After successfully adding the add-on media, the package manager window appears. If
the add-on provides a new pattern, see the new item in the Patterns filter. To view the
list of all packages from the selected installation source, select the filter Installation
Sources and choose the installation source to view. To view packages from a selected
add-on by package groups, select the secondary filter Package Groups.
Create your own add-on products with YaST Add-On Creator. Read about the
YaST add-on creator at http://developer.novell.com/wiki/index
.php/Creating_Add-On_Media_with_YaST. Find technical background
information at http://developer.novell.com/wiki/index.php/
Creating_Add-Ons.
All registered sources have an activation status in the first column of the list. Enable
or disable individual installation sources by clicking Activate or Deactivate. During
the installation of software packages or updates, YaST selects a suitable entry from the
list of activated installation sources. When you exit the module with Close, the current
settings are saved and applied to the configuration modules Software Management and
System Update.
If you are not able to access the update catalog, this might be due to an expired
subscription. Normally, SUSE Linux Enterprise comes with a one or three years
subscription, during which you have access to the update catalog. This access
will be denied once the subscription ends.
In case of an access denial to the update catalog you will see a warning message
with a recommendation to visit the Novell Customer Center and check your
subscription. The Novell Customer Center is available at http://www.novell
.com/center/.
Definition of Terms
Package
A package is a compressed file in rpm format that contains the files for a particular
program.
Patch
A patch consists of one or more packages—either full packages or patchrpm or
deltarpm packages— and may also introduce dependencies to packages that are
not installed yet.
patchrpm
A patchrpm consists only of files that have been updated since it was first released
for SUSE Linux Enterprise 10. Its download size is usually considerably smaller
than the size of a package.
deltarpm
A deltarpm consists only of the binary diff between two defined versions of a
package and therefore, has the smallest download size. Before being installed, the
rpm package has to be rebuild on the local machine.
The patch display lists the available patches for SUSE Linux Enterprise. The patches
are sorted by security relevance. The color of the patch name, as well as a pop-up
window under the mouse cursor, indicate the security status of the patch: Security
(red), Recommended (blue), or Optional (black). There are three different views
on patches. Use Show Patch Category to toggle the views:
All Patches
All patches available for SUSE Linux Enterprise.
A list entry consists of a symbol and the patch name. For a list of possible symbols,
press Shift + F1. Actions required by Security and Recommended patches are au-
tomatically preset. These actions are Autoinstall, Autoupdate, or Autodelete. Actions
for Optional patches are not preset—right-click on a patch and choose an action
from the list.
Most patches include updates for several packages. If you want to change actions for
single packages, right-click on a package in the package window and choose an action.
Once you have marked all patches and packages as desired, proceed with Accept.
Since rebuilding rpm packages from deltarpms is a memory and CPU time
consuming task, certain setups or hardware configuration might require to
disable the usage of deltarpms for performance sake. To disable the use of
deltarpms edit the file /etc/zypp/zypp.conf and set
download.use_deltarpm to false.
Another alternative for updating software is the ZENworks updater applet for KDE and
GNOME. The ZENworks updater helps monitor new patches. It also provides a quick
update function. For more information, refer to Section 9.2, “Managing Packages with
the ZEN Tools” (page 204).
When Only Download Patches is checked, the patches are downloaded at the specified
time but not installed. They must be installed manually. The patches are downloaded
to the rug cache directory, /var/cache/zmd/web, by default. Use the command
rug get-prefs cache-directory to get the current rug cache directory. For
more information about rug, see Section 9.1, “Update from the Command Line with
rug” (page 200).
The Patch CD Update module from the Software section installs patches from CD, not
from an FTP server. The advantage lies in a much faster update with CD. After the
patch CD is inserted, all patches on the CD are displayed in the dialog. Select the desired
packages for installation from the list of patches. The module issues an error message
if no patch CD is present. Insert the patch CD then restart the module.
The procedure for updating the system is similar to a new installation. Initially, YaST
examines the system, determines a suitable update strategy, and presents the results in
a suggestion dialog. Click Change or the individual items to change any details.
Update Options
Set the update method for your system. Two options are available.
Update with Installation of New Software and Features Based on the Selection
To update the entire system to the latest versions of software, select one of the
predefined selections. These selections ensure that packages that did not exist pre-
viously are also installed.
Packages
Click Packages to start the package manager and select or deselect individual packages
for update. Any package conflicts should be resolved with the consistency check. The
use of the package manager is covered in detail in Section 8.3.1, “Installing and Remov-
ing Software” (page 132).
Backup
During the update, the configuration files of some packages may be replaced by those
of the new version. Because you may have modified some of the files in your current
system, the package manager normally makes backup copies of the replaced files. With
this dialog, determine the scope of these backups.
This backup does not include the software. It only contains configuration files.
Language
Primary and other languages currently installed on the system are listed here. Change
them by clicking Language in the displayed configuration or with Change > Language.
Optionally, adapt the keyboard layout and time zone to the region where the primary
language is spoken. Find more about language selection in Section 8.5.15, “Language
Selection” (page 163).
8.4 Hardware
New hardware must first be installed or connected as directed by the vendor. Turn on
external devices and start the appropriate YaST module. Most devices are automatically
detected by YaST and the technical data is displayed. If the automatic detection fails,
YaST offers a list of devices (model, vendor, etc.) from which to select the suitable
device. Consult the documentation enclosed with your hardware for more information.
If your model is not included in the device list, try a model with a similar des-
ignation. However, in some cases the model must match exactly, because sim-
ilar designations do not always indicate compatibility.
8.4.3 Printer
Configure a printer with Hardware > Printer. If a printer is properly connected to the
system, it should be detected automatically. Find detailed instructions for configuring
printers with YaST in Section 23.4, “Setting Up a Printer” (page 441).
The dialog presents a list of detected hard disk controllers and enables assignment of
the suitable kernel module with specific parameters. Use Test Loading of Module to
check if the current settings work before they are saved permanently in the system.
It is advised to test the settings before making them permanent in the system.
Incorrect settings can prevent the system from booting.
Save the hardware information displayed to a file by clicking Save to File. Select the
desired directory and filename then click Save to create the file.
During installation, the current SUSE Linux Enterprise kernel automatically activates
DMA for hard disks but not for CD drives, because default DMA activation for all
drives often causes problems with CD drives. Use the DMA module to activate DMA
for your drives. If the drive supports the DMA mode without any problems, the data
transfer rate of your drive can be increased by activating DMA.
NOTE
DMA (direct memory access) means that your data can be transferred directly
to the RAM, bypassing the processor control.
Command Line
Issue the following command:
dasd_configure 0.0.0150 1 0
Replace 0.0.0150 with the actual channel number to which the DASD is attached.
The last zero of the command line should be 1 if the DASD should be accessed in
DIAG mode.
NOTE
mkinitrd
zipl
NOTE
To make the changes persistent through a reboot, run the following commands:
mkinitrd
zipl
If you have a USB device, this configuration is not necessary. Plug in the joystick and
start using it.
Fine-tune the settings by clicking Expert Settings. Adjust the key repeat rate and delay
and configure the start-up state by choosing the desired settings in Start-Up States. For
Devices to Lock, enter a space-separated list of devices to which to apply the Scroll
Lock, Num Lock, and Caps Lock settings. Click OK to complete the fine-tuning. Finally,
after all selections have been made, click Accept for your changes to take effect.
To set up the keyboard for the graphical environment, run the graphical YaST then select
Keyboard Layout. Find information about the graphical configuration in Section 8.14.3,
“Keyboard Properties” (page 195).
8.4.12 Sound
Most sound cards are detected automatically and configured with reasonable values
during initial installation. To install a card added later or modify settings, use Hardware
> Sound. It is also possible to switch the sequence of the cards.
1 Click Add to open a dialog in which to select a sound card vendor and model.
Refer to your sound card documentation for the information required. Find a
reference list of sound cards supported by ALSA with their corresponding sound
modules in /usr/share/doc/packages/alsa/cards.txt and at
http://www.alsa-project.org/alsa-doc/. After making your se-
lection, click Next.
Normal setup
Adjust the output volume and play a test sound.
In this dialog, there is also a shortcut to the joystick configuration. Click Joystick
configuration and select the joystick type in the following dialog to configure a
joystick. Click Next to continue.
3 In Sound Card Volume, test your sound configuration and make adjustments to
the volume. You should start at about ten percent to avoid damage to your hearing
or the speakers. A test sound should be audible when you click Test. If you cannot
hear anything, increase the volume. Press Next > Finish to complete the sound
configuration.
Volume
Use this dialog for setting the volume.
Start Sequencer
For playback of MIDI files, check this option.
The volume and configuration of all sound cards installed are saved when you click
Finish in the YaST sound module. The mixer settings are saved to the file /etc/
8.5 System
This group of modules is designed to help you manage your system. All modules in
this group are system-related and serve as valuable tools for ensuring that your system
runs properly and your data is managed efficiently.
For IBM System z, continue with Section 8.5.3, “Boot Loader Configuration”
(page 154).
8.5.1 Backup
Create a backup of both your system and data using System > System Backup. However,
the backup created by the module does not include the entire system. The system is
backed up by saving important storage areas on your hard disk that may be crucial when
trying to restore a system, such as the partition table or master boot record (MBR). It
can also include the XML configuration acquired from the installation of the system,
which is used for AutoYaST. Data is backed up by saving changed files of packages
accessible on installation media, entire packages that are unaccessible (such as online
updates), and files not belonging to packages, such as many of the configuration files
in /etc or the directories under /home.
8.5.2 Restoration
With System > System Restoration, restore your system from a backup archive created
with System Backup. First, specify where the archives are located (removable media,
local hard disks, or network file systems). Click Next to view the description and contents
of the individual archives and select what to restore from the archives.
You can also uninstall packages that were added since the last backup and reinstall
packages that were deleted since the last backup. These two steps enable you to restore
the exact system state at the time of the last backup.
8.5.4 Clustering
Find information about Heartbeat and high availability configuration with YaST in
Heartbeat Guide.
8.5.5 LVM
The logical volume manager (LVM) is a tool for custom partitioning of hard disks with
logical drives. Find information about LVM in Section 7.1, “LVM Configuration”
(page 115).
8.5.6 EVMS
The enterprise volume management system (EVMS) is, like LVM, a tool for custom
partitioning and grouping of hard disks into virtual volumes. It is flexible, extensible,
and can be tailored using a plug-in model to individual needs of various volume man-
agement systems.
EVMS is compatible with existing memory and volume management systems, like
DOS, Linux LVM, GPT (GUID partition table), IBM System z, Macintosh, and BSD
partitions. More information is provided at http://evms.sourceforge.net/.
IBM System z recognize only DASD and SCSI hard disks. IDE hard disks are not
supported. This is why these devices appear in the partition table as dasda or
sda for the first recognized device.
If you run the expert dialog during installation, any free hard disk space is also listed
and automatically selected. To provide more disk space to SUSE Linux Enterprise®,
free the needed space starting from the bottom toward the top of the list (starting from
the last partition of a hard disk toward the first). For example, if you have three partitions,
you cannot use the second exclusively for SUSE Linux Enterprise and retain the third
and first for other operating systems.
Partition Types
TIP: IBM System z: Hard Disks
On the IBM System z platforms, SUSE Linux Enterprise Server supports SCSI
hard disks as well as DASDs (direct access storage devices). While SCSI disks
can be partitioned as described below, DASDs can have no more than three
partition entries in their partition tables.
Every hard disk has a partition table with space for four entries. An entry in the partition
table can correspond to a primary partition or an extended partition. Only one extended
partition entry is allowed, however.
If you need more than four partitions, create an extended partition as the fourth partition
or earlier. This extended partition should span the entire remaining free cylinder range.
Then create multiple logical partitions within the extended partition. The maximum
For architectures using the GPT disk label, the number of primary partitions is
not restricted. Consequently, there are no logical partitions.
Creating a Partition
To create a partition from scratch, proceed as follows:
1 Select Create. If several hard disks are connected, a selection dialog appears in
which to select a hard disk for the new partition.
2 Specify the partition type (primary or extended). Create up to four primary parti-
tions or up to three primary partitions and one extended partition. Within the
extended partition, create several logical partitions (see Section “Partition Types”
(page 156)).
3 Select the file system to use and a mount point. YaST suggests a mount point
for each partition created. Refer to Chapter 25, File Systems in Linux (page 469)
for details on the various file systems.
4 Specify additional file system options if your setup requires them. This is neces-
sary, for example, if you need persistent device names. For details on the available
options, refer to Section “Editing a Partition” (page 158).
5 Click OK > Apply to apply your partitioning setup and leave the partitioning
module.
If you created the partition during installation, you are returned to the installation
overview screen.
File System ID
Even if you do not want to format the partition at this stage, assign it a file
system ID to ensure that the partition is registered correctly. Possible values
include Linux, Linux swap, Linux LVM, Linux EVMS, and Linux RAID. For
LVM and RAID details, refer to Section 7.1, “LVM Configuration” (page 115)
and Section 7.2, “Soft RAID Configuration” (page 123).
File System
Change the file system or format the partition here. Changing the file system
or reformatting partitions irreversibly deletes all data from the partition . For
details on the various file systems, refer to Chapter 25, File Systems in Linux
(page 469).
Fstab Options
Specify various parameters contained in the global file system administration
file (/etc/fstab). The default settings should suffice for most setups.
You can, for example, change the file system identification from the device
name to a volume label. In the volume label, use all characters except / and
space.
Expert Options
Expert opens a menu containing the following commands:
Note, that different partitioning tools may start counting the cylinders of a
partition with 0 or with 1. When calculating the number of cylinders, you should
always use the difference between the last and the first cylinder number and
add one.
If the partitioning is performed by YaST and other partitions are detected in the system,
these partitions are also added to the /etc/fstab file to enable easy access to this
data. This file contains all partitions in the system with their properties, such as the file
system, mount point, and user permissions.
The partitions, regardless of whether they are Linux or FAT partitions, are specified
with the options noauto and user. This allows any user to mount or unmount these
partitions as needed. For security reasons, YaST does not automatically enter the exec
option here, which is needed for executing programs from the location. However, to
run programs from there, you can enter this option manually. This measure is necessary
if you encounter system messages such as “bad interpreter” or “Permission denied”.
At the beginning of the physical volumes (PVs), information about the volume is written
to the partition. To reuse such a partition for other non-LVM purposes, it is advisable
to delete the beginning of this volume. For example, in the VG system and PV /dev/
sda2, do this with the command dd if=/dev/zero of=/dev/sda2 bs=512
count=1.
The file system used for booting (the root file system or /boot) must not be
stored on an LVM logical volume. Instead, store it on a normal physical partition.
For IBM System z, continue with Section 8.5.12, “System Services (Runlevel)”
(page 162).
Each kernel driver contains a list of device IDs of all devices it supports. If a new device
is not in any driver's database, the device is treated as unsupported, even if it can be
used with an existing driver. With this YaST module from System section, you can add
PCI IDs. Only advanced users should attempt to use this YaST module.
To add an ID, click Add and select how to assign it: by selecting a PCI device from a
list or by manually entering PCI values. In the first option, select the PCI device from
the provided list then enter the driver or directory name. If the directory is left empty,
the driver name is used as the directory name. When assigning PCI ID values manually,
enter the appropriate data to set up a PCI ID. Click OK to save your changes.
To change the time zone, select the region in the left column and the location or time
zone in the right column. With Hardware Clock Set To, set whether the system clock
should use Local Time or UTC (Coordinated Universal Time). UTC is often used in
Linux systems. Machines with additional operating systems, such as Microsoft Windows,
mostly use local time.
Set the current system time and date with Change. In the dialog that opens, modify the
time and date by entering new values or adjusting them with the arrow buttons. Press
Apply to save the changes.
Select the main language to use for your system in Primary Language. To adjust the
keyboard or time zone to this setting, enable Adapt Keyboard Layout or Adapt Time
Zone.
Set how locale variables are set for the root user with Details. Also use Details to set
the primary language to a dialect not available in the main list. These settings are written
into the file /etc/sysconfig/language.
You can configure supported CDMA and GPRS modems as regular modems in
the YaST modem module.
To configure your mail with YaST, specify the type of your connection to the Internet
in the first dialog. Choose one of the following options:
Permanent
Select this option if you have a dedicated line to the Internet. Your machine is online
permanently, so no dial-up is required. If your system is part of a local network
with a central e-mail server, select this option to ensure permanent access to your
e-mail messages.
Dial-Up
This item is relevant for users who have a computer at home, are not located in a
network, and occasionally connect to the Internet.
Activate virus scanning for your incoming and outgoing e-mail with AMaViS by select-
ing that option. The package is installed automatically as soon as you activate the mail
filtering feature. In the following dialogs, specify the outgoing mail server (usually the
SMTP server of your provider) and the parameters for incoming mail. Set the diverse
POP or IMAP servers for mail reception by various users. Using this dialog, you can
also assign aliases, use masquerading, or set up virtual domains. Click Finish to exit
the mail configuration.
The mail server module of SUSE Linux Enterprise only works if the users, groups,
and the DNS and DHCP services are managed with LDAP.
The mail server module allows configuration of SUSE Linux Enterprise as a mail
server. YaST assists with the following steps of the configuration process:
Global Settings
Configures the identification of the local mail server and the maximum size of in-
coming or outgoing messages and the type of mail transport.
Local Delivery
Configures the type of local mail delivery.
Mail Transport
Configures special transport routes for mail depending on its target address.
SPAM Prevention
Configures the SPAM protection settings of the mail server. This activates the tool
AMaViS. Set up the type and strictness of the SPAM check.
main
Main or master domain of the local mail server
local
All users who can receive mail in a master domain can also receive mail in a
local domain. In the case of a message within the local domain, only the portion
before the @ is evaluated.
virtual
Only users with an explicit address within a virtual domain receive mail. Vir-
tual mail addresses are set up in the user management module of YaST.
DHCP Server
Use this to set up a custom DHCP server in only a few steps. Chapter 34, DHCP
(page 637) provides basic knowledge about the subject and a step-by-step description
of the configuration process.
DNS Server
Configuring a DNS server that is responsible for name resolution is recommended
for larger networks. You can use DNS Server for this as described in Section 33.2,
“Configuration with YaST” (page 612). Chapter 33, The Domain Name System
(page 611) provides background information about DNS.
HTTP Server
To run your own Web server, configure Apache in HTTP Server. Find more infor-
mation in Chapter 40, The Apache HTTP Server (page 741).
Hostnames
When booting and in small networks, you can use Hostnames for hostname resolu-
tion instead of DNS. The entries in this module reflect the data of the file /etc/
hosts. For more information, read Section “ /etc/hosts ” (page 587).
Kerberos Client
If you have a Kerberos server in your network for network authentication, use
Kerberos Client. A detailed description of the client configuration with YaST is
available in Section 46.6, “Configuring a Kerberos Client with YaST” (page 853).
LDAP Client
If using LDAP for user authentication in the network, configure the client in LDAP
Client. Information about LDAP and a detailed description of the client configuration
with YaST are available in Section 36.6, “Configuring an LDAP Client with YaST”
(page 684).
LDAP Server
The LDAP server can keep various data in a central directory and distribute it to
all clients in your network. Mostly it is used to store shared contact information
but its function is not limited to that. An LDAP server can be used also for authen-
tication. Information about LDAP and a detailed description of the server configu-
ration with YaST are available in Chapter 36, LDAP—A Directory Service
(page 663).
NFS Client
With NFS client, mount directories provided by NFS server in your own file trees.
Use NFS Client to configure your system to access an NFS server in the network.
NFS Server
With NFS, run a file server that all members of your network can access. This file
server can be used to make certain applications, files, and storage space available
NIS Client
If you run NIS server to administer user data on a central place and distribute it to
the clients, configure the client here. Detailed information about NIS client and
configuration with YaST is available in Section 35.2, “Configuring NIS Clients”
(page 661).
NIS Server
If you run more than one system, local user administration (using the files /etc/
passwd and /etc/shadow) is impractical and requires a lot of maintenance.
In this case, administer user data on a central server and distribute it to the clients
from there. NIS is one option for this. Detailed information about NIS and its
configuration with YaST is available in Section 35.1.1, “Configuring a NIS Master
Server” (page 656).
NTP Client
NTP (network time protocol) is a protocol for synchronizing hardware clocks over
a network. Information about NTP and instructions for configuring it with YaST
are available in Chapter 32, Time Synchronization with NTP (page 605).
When this module starts, choose whether to start inetd or xinetd. The selected
daemon can be started with a standard selection of services. Alternatively, compose
your own selection of services with Add, Delete, and Edit.
Proxy
Configure Internet proxy client settings in Proxy. Click Enable Proxy then enter
the desired proxy settings. You can test these settings by clicking Test Proxy Set-
tings. A small window informs you whether your proxy settings work correctly.
After your settings have been entered and tested, save them by clicking Accept.
Remote Administration
To administer your machine remotely from another machine, use Remote Adminis-
tration. To maintain your system remotely, use a VNC client, such as krdc, or a
Java-enabled browser. Although remote administration using VNC is simple and
fast, it is less secure than using SSH, so you should always keep this in mind when
using a VNC server. Find detailed information about installing with a VNC client
in Section 4.1.1, “Simple Remote Installation via VNC—Static Network Configu-
ration” (page 48).
Routing
Use Routing to configure the paths data takes over the network. In most cases, only
enter the IP address of the system through which to send all data in Default Gateway.
To create more complicated configurations, use Expert Configuration.
SLP Server
With service location protocol (SLP), you can configure clients in your network
without knowledge of server names and services that these servers provide. Detailed
information about SLP servers and configuration with YaST are described in
Chapter 31, SLP Services in the Network (page 601).
TFTP Server
A TFTP server in not an FTP server. While an FTP server uses the File Transfer
Protocol (FTP), a TFTP server uses the much simpler Trivial File Transfer Protocol
(TFTP) without security features. TFTP servers are usually used to boot diskless
workstations, X terminals, and routers. Detailed information about TFTP servers
and configuration with YaST are described in Section 4.3.2, “Setting Up a TFTP
Server” (page 68).
WOL
WOL (wake on LAN) refers to the possibility of waking up a computer from
standby mode over the network using special packages. It only works with mother-
boards that support this functionality in their BIOS. WOL configuration with YaST
is described in Section 4.3.7, “Wake on LAN” (page 75).
iSCSI Target
iSCSI technology provides an easy and reasonably inexpensive solution for con-
necting Linux computers to central storage systems. To configure the server side,
use Miscellaneous > iSCSI Target. Find more information about configuration of
iSCSI with YaST in Chapter 12, Mass Storage over IP Networks—iSCSI (page 271).
8.8 AppArmor
Novell AppArmor is designed to provide easy-to-use application security for both
servers and workstations. Novell AppArmor is an access control system that lets you
specify which files each program may read, write, and execute. To enable or disable
Novell AppArmor on your system, use AppArmor Control Panel. Information about
Novell AppArmor and a detailed description of the configuration with YaST are
available in Novell AppArmor Administration Guide (↑Novell AppArmor Administration
Guide).
Whenever you need to make multiple configuration changes and want to avoid
restarting the user and group configuration module for every single one of
these changes, use Write Changes Now to save your changes without exiting
the configuration module.
1 Click Add.
2 Enter the necessary data for User Data. If you do not need to adjust any more
detailed settings for this new user, proceed to Step 5 (page 173).
3 To change a user's ID, home directory name, default home, group, group mem-
berships, directory permissions, or login shell, open the Details tab and change
the default values.
4 To adjust user's password expiration, length, and expiration warnings, use the
Password Settings tab.
The new user can immediately log in with the created login name and password.
Deleting Users
To delete a user, proceed as follows:
2 Click Delete.
3 Determine whether to delete or keep the home directory of the user to delete.
2 Click Edit.
1 Click Add.
For more information about encrypted homes, see Section 47.2, “Using Encrypted
Home Directories” (page 869).
Using the auto login feature on any system that can be physically accessed by
more than one person is a potential security risk. Any user accessing this system
can manipulate the data on it. If your system contains confidential data, do
not use the auto login functionality.
If you are the only user of your system, you can configure auto login. It automatically
logs a user into the system after start. Only one selected user can use the auto login
function. Auto login works only with KDM or GDM.
To activate auto login, select the user from the list of users and click Expert Options >
Login Settings. Then choose Auto Login and click OK.
To deactivate this functionality, select the user and click Expert Options > Login Settings.
Then uncheck Auto Login and click OK.
Using the passwordless login feature on any system that can be physically ac-
cessed by more than one person is a potential security risk. Any user accessing
this system can manipulate the data on it. If your system contains confidential
data, do not use this functionality.
Login without a password automatically logs a user into the system after the user enters
the username in the login manager. It is available to multiple users on a system and
works only with KDM or GDM.
To activate the function, select the user from the list of users and click Expert Options
> Login Settings. Then choose Passwordless Login and click OK.
To deactivate this function, select the user for whom to disable this functionality from
the list of users and click Expert Options > Login Settings. Then uncheck Passwordless
Login and click OK.
1 Click Add.
To configure the password expiration policy for a new user, proceed as follows:
1 Click Add.
You can limit the lifetime of any user account by specifying a date of expiration for
this particular account. Specify the Expiration Date in the YYYY-MM-DD format and
leave the user configuration. If no Expiration Date is given, the user account never
expires.
• Default Group
• Secondary Groups
SUSE Linux Enterprise can use DES, MD5, or Blowfish for password encryption. The
default password encryption method is Blowfish. The encryption method is set during
installation of the system, as described in Section 3.14.1, “Password for the System
Administrator “root”” (page 36). To change the password encryption method in the
installed system, select Expert Options > Password Encryption.
The module gives an overview of all groups. As in the user management dialog, change
filter settings by clicking Set Filter.
To add a group, click Add and enter the appropriate data. Select group members from
the list by checking the corresponding box. Click Accept to create the group. To edit a
group, select the group to edit from the list and click Edit. Make all necessary changes
then save them with Accept. To delete a group, simply select it from the list and click
Delete.
Password Settings
To have new passwords checked by the system for security before they are accepted,
click Check New Passwords and Test for Complicated Passwords. Set the minimum
password length for newly created users. Define the period for which the password
should be valid and how many days in advance an expiration alert should be issued
when the user logs in to the text console.
Boot Settings
Set how the key combination Ctrl + Alt + Del should be interpreted by selecting
the desired action. Normally, this combination, when entered in the text console,
causes the system to reboot. Do not modify this setting unless your machine or
server is publicly accessible and you are afraid someone could carry out this action
without authorization. If you select Stop, this key combination causes the system
to shut down. With Ignore, this key combination is ignored.
If you use the KDE login manager (KDM), set permissions for shutting down the
system in Shutdown Behavior of KDM. Give permission to Only root (the system
administrator), All Users, Nobody, or Local Users. If Nobody is selected, the system
can only be shut down from the text console.
Login Settings
Typically, following a failed login attempt, there is a waiting period lasting a few
seconds before another login is possible. This makes it more difficult for password
sniffers to log in. Optionally activate Record Successful Login Attempts. If you
suspect someone is trying to discover your password, check the entries in the system
log files in /var/log. To grant other users access to your graphical login screen
User Addition
Every user has a numerical and an alphabetical user ID. The correlation between
these is established using the file /etc/passwd and should be as unique as pos-
sible. Using the data in this screen, define the range of numbers assigned to the
numerical part of the user ID when a new user is added. A minimum of 500 is
suitable for users. Automatically generated system users start with 1000. Proceed
in the same way with the group ID settings.
Miscellaneous Settings
To use predefined file permission settings, select Easy, Secure, or Paranoid. Easy
should be sufficient for most users. The setting Paranoid is extremely restrictive
and can serve as the basic level of operation for custom settings. If you select
Paranoid, remember that some programs might not work correctly or even at all,
because users no longer have permission to access certain files.
Also set which user should launch the updatedb program, if installed. This pro-
gram, which automatically runs on a daily basis or after booting, generates a
database (locatedb) in which the location of each file on your computer is stored.
If you select Nobody, any user can find only the paths in the database that can be
seen by any other (unprivileged) user. If root is selected, all local files are indexed,
because the user root, as superuser, may access all directories. Make sure that
the options Current Directory in root's Path and Current Directory in Path of
Regular Users are deactivated. Only advanced users should consider using these
options because these settings may pose a significant security risk if used incorrectly.
To have some control over the system even if it crashes, click Enable Magic SysRq
Keys.
8.10 Virtualization
Virtualization makes it possible to run several operating systems on one physical ma-
chine. The hardware for the different systems is provided virtually. Virtualization YaST
modules provide configuration for the Xen virtualization system. For more information
about this technology, see the virtualization manual on http://www.novell.com/
documentation/sles10/index.html..
8.11.3 Autoinstallation
The AutoYaST tool is intended for automated installation. In Miscellaneous > Autoin-
stallation, prepare profiles for this tool. Find detailed information about automated in-
stallation with AutoYaST in Chapter 5, Automated Installation (page 85). The informa-
tion about using the Autoinstallation module is in Section 5.1.1, “Creating an AutoYaST
Profile” (page 86).
/var/log/messages
This is the general system log file. Here, view kernel messages, users logging in
as root, and other useful information.
/proc/cpuinfo
This displays processor information, including its type, make, model, and perfor-
mance.
/proc/dma
This shows which DMA channels are currently being used.
/proc/interrupts
This shows which interrupts are in use and how many of each have been in use.
/proc/ioports
This shows which I/O ports are in use at the moment.
/proc/meminfo
This displays memory status.
/proc/modules
This displays the individual modules.
/proc/mounts
This displays devices currently mounted.
/proc/partitions
This shows the partitioning of all hard disks.
/proc/version
This displays the current version of Linux.
/var/log/YaST2/y2log
This displays all YaST log messages.
/var/log/boot.msg
This displays information concerning the start-up of the system.
/var/log/faillog
This displays login failures.
/var/log/warn
This displays all system warnings.
When YaST is started in text mode, the YaST Control Center appears first. See Fig-
ure 8.9, “Main Window of YaST in Text Mode” (page 185). The main window consists
of three areas. The left frame, which is surrounded by a thick white border, features the
categories to which the various modules belong. The active category is indicated by a
colored background. The right frame, which is surrounded by a thin white border, pro-
vides an overview of the modules available in the active category. The bottom frame
contains the buttons for Help and Exit.
When the YaST Control Center is started, the category Software is selected automati-
cally. Use ↓ and ↑ to change the category. To start a module from the selected category,
press →. The module selection now appears with a thick border. Use ↓ and ↑ to select
the desired module. Keep the arrow keys pressed to scroll through the list of available
modules. When a module is selected, the module title appears with a colored background
and a brief description is displayed in the bottom frame.
Function Keys
The F keys (F1 to F12) enable quick access to the various buttons. Which function
keys are actually mapped to which buttons depends on the active YaST module,
because the different modules offer different buttons (Details, Info, Add, Delete,
etc.). Use F10 for OK, Next, and Finish. Press F1 to access the YaST help, which
shows the functions mapped to the individual F keys.
View a list of all module names available on your system with yast -l or yast
--list. To display the available options of a module, enter yast module_name
help. If a module does not have a command line mode, a message informs you of this.
Some modules do not support the command line mode because command line tools
with the same functionality already exist. The modules concerned and the command
line tools available are:
sw_single
sw_single provides package management and system update functionality. Use
rug instead of YaST in your scripts. Refer to Section 9.1, “Update from the
Command Line with rug” (page 200).
online_update_setup
online_update_setup configures automatic updating of your system. This
can be configured with cron.
inst_suse_register
With inst_suse_register, register your SUSE Linux Enterprise. For more
information about the registration, see Section 8.3.4, “Registering SUSE Linux
Enterprise” (page 140).
hwinfo
hwinfo provides information about the hardware of your system. The command
hwinfo does the same.
The YaST module users is used for user management. To display the command op-
tions, enter yast users help.
To add multiple users, create a /tmp/users.txt file with a list of users to add.
Enter one username per line and use the following script:
#!/bin/bash
#
# adds new user, the password is same as username
#
#!/bin/bash
#
# the home will be not deleted
# to delete homes, use option delete_home
#
To display the YaST network card configuration options, enter yast lan help. To
display the YaST firewall card configuration options, enter yast firewall help.
The network and firewall configurations with YaST are persistent. After reboot, it is
not necessary to execute scripts again.
To display a configuration summary for the network, use yast lan list. The first
item in the output of Example 8.4, “Sample Output of yast lan list” (page 190)
is a device ID. To get more information about the configuration of the device, use yast
lan show id=<number>. In this example, the correct command is yast lan
show id=0.
The command line interface of the YaST firewall configuration is a fast and easy way
to enable or disable services, ports, or protocols. To display allowed services, ports,
and protocols, use yast firewall services show. For examples of how to
enable a service or port, use yast firewall services help. To enable mas-
querading, enter yast firewall masquerade enable.
If you change your display hardware after installation, use sax2 -r on the
command line to cause SaX2 to detect your hardware. You must be root to
run SaX2 from the command line.
Graphics Card
It is not possible to change the graphics card because only known models are supported
and these are detected automatically. However, you can change many options that affect
the behavior of the card. Normally, this should not be necessary because the system
already has set them up appropriately during installation. If you are an expert and want
to tweak some of the options, click Options next to the graphics card and select the
option to change. To assign a value needed to a certain option, enter this value in the
dialog that appears after selecting that option. Click OK to close the options dialog.
Monitor
To change the current settings for the monitor, click Change next to the monitor. A
new dialog opens in which to adjust various monitor-specific settings. This dialog has
several tabs for various aspects of monitor operation. Select the first tab to manually
select the vendor and model of the display device in two lists. If your monitor is not
listed, you can choose one of the VESA or LCD modes that suit your needs or, if you
have a vendor driver disk or CD, click Utility Disk and follow the instructions on the
screen to use it. Check Activate DPMS to use display power management signaling.
Display Size, with the geometrical properties of the monitor, and Sync Frequencies,
with the ranges for the horizontal and vertical sync frequencies of your monitor, are
normally set up correctly by the system, but you can modify these values manually.
After making all adjustments, click OK to close this dialog.
Although there are safety mechanisms, you should still be very careful when
changing the allowed monitor frequencies manually. Incorrect values might
destroy your monitor. You should always refer to the monitor's manual before
changing frequencies.
Dual Head
If you have a graphics card with two outputs installed in your computer, you can connect
two screens to your system. Two screens that are attached to the same graphics card
are referred to as dual head. SaX2 automatically detects multiple display devices in the
system and prepares the configuration accordingly. To use the dual head mode of a
graphics card, check Activate Dual Head Mode at the bottom of the dialog and click
Configure to set the dual head options and the arrangement of the screens in the dual
head dialog.
The tabs in the row at the top of the dialog each correspond to a graphics card in your
system. Select the card to configure and set its multihead options in the dialog below.
In the upper part of the multihead dialog, click Change to configure the additional
screen. The possible options are the same as for the first screen. Choose the resolution
to use for this screen from the list. Select one of three possible multihead modes.
Cloned Multihead
In this mode, all monitors display the same contents. The mouse is only visible on
the main screen.
Xinerama Multihead
All screens combine to form a single large screen. Program windows can be posi-
tioned freely on all screens or scaled to a size that fills more than one monitor.
NOTE
Linux currently does not offer 3D support for Xinerama multihead environ-
ments. In this case, SaX2 deactivates the 3D support.
The arrangement of the dual head environment describes the sequence of the individual
screens. By default, SaX2 configures a standard layout that follows the sequence of the
Multihead
If you have more than one graphics card installed in your computer, you can connect
more than one screen to your system. Two or more screens that are attached to different
graphics cards are referred to as multihead. SaX2 automatically detects multiple
graphics cards in the system and prepares the configuration accordingly. By default,
SaX2 configures a standard layout that follows the sequence of the detected graphics
cards, arranging all screens in a row from left to right. The additional Arrangement tab
allows for changing this layout manually. Drag the icons representing the individual
screens in the grid and click OK to close the dialog.
NOTE
Regardless of whether you run a test, all modifications are only activated when
you restart the X server.
When you are satisfied with your settings, click OK to confirm your changes.
NOTE
Any changes you make here take effect only after you restart the X server.
In the Port and Mode dialog, configure the connection to the tablet. SaX2 enables the
configuration of graphics tablets connected to the USB port or the serial port. If your
tablet is connected to the serial port, verify the port. /dev/ttyS0 refers to the first
serial port. /dev/ttyS1 refers to the second. Additional ports use similar notation.
Choose appropriate Options from the list and select the Primary Tablet Mode suitable
for your needs.
If your graphics tablet supports electronic pens, configure them in Electronic Pens.
Add eraser and pen and set their properties after clicking Properties.
When you are satisfied with the settings, click OK to confirm your changes.
• http://forge.novell.com/modules/xfmod/project/
?yast—Another YaST project page
The back-end daemon for the Novell ZENworks Linux Management Agent is the
ZENworks Management Daemon (ZMD). ZMD performs software management func-
tions. The daemon is started automatically during boot.
Check the status of the daemon with rczmd status. To start the daemon, enter
rczmd start. To restart it, use rczmd restart. Deactivate it with rczmd
stop.
ZMD can also be started with special options to control its behavior. To have ZMD
always start with some special options permanently, set ZMD_OPTIONS in /etc/
sysconfig/zmd then run SuSEconfig. The available options are:
-n, --no-daemon
Do not run the daemon in the background.
-m, --no-modules
Do not load any modules.
-r, --no-remote
Do not start remote services.
ZMD is the back-end only. The software management tasks are initiated through the
command line tool rug or the graphical Software Updater applet.
rug sorts software from services into catalogs (also known as channels), which corre-
spond to groups of similar software. For example, one catalog might contain software
from an update server as well as software from a third-party software vendor. You are
able to subscribe to individual catalogs in order to control the display of available
packages and prevent the accidental installation of unwanted software. Operations
usually are performed only on software from catalogs to which you are subscribed.
If the zmd is not used for a certain period of time, it can be switched to sleep mode. To
check the zmd status and reactivate the daemon, use rug ping. This command wakes
zmd up and logs its status information.
To check for new patches, use rug pch. To get information about a patch, enter
rug patch-info patch.
If you are not able to access the update catalog, this might be due to an expired
subscription. Normally, SUSE Linux Enterprise comes with a one or three years
subscription, during which you have access to the update catalog. This access
will be denied once the subscription ends.
In case of an access denial to the update catalog you will see a warning message
with a recommendation to visit the Novell Customer Center and check your
subscription. The Novell Customer Center is available at http://www.novell
.com/center/.
install
The user may install new software
lock
The user may set package locks
remove
The user may remove software
subscribe
The user may change channel subscriptions
trusted
The user is considered as trusted, so he is able to install packages without package
signatures
upgrade
The user may update software packages
view
This allows the user to see which software is installed on the machine and which
software is in available channels. The option is relevant only to remote users. Local
users are normally permitted to view installed and available packages.
superuser
Permits all rug commands except user management and settings, which must be
done locally.
To give a user permission to update the system, use the rug ua username upgrade
command. Replace username by the name of the user. To revoke the privileges of a
user, use command rug ud username. To list users with their rights, use rug ul.
However, you may not want the patches to be installed automatically, but may want to
retrieve them and select the patches for installation at a later time. To download patches
only, use the rug up -dy command. The up -dy option downloads the patches
from your catalogs without confirmation and saves them to the rug cache. The default
location of the rug cache is /var/cache/zmd.
Replace url_path by the name of your proxy server. Replace name by your username.
Replace password by your password.
If you are not able to access the update catalog, this might be due to an expired
subscription. Normally, SUSE Linux Enterprise comes with a one or three years
subscription, during which you have access to the update catalog. This access
will be denied once the subscription ends.
In case of an access denial to the update catalog you will see a warning message
with a recommendation to visit the Novell Customer Center and check your
subscription. The Novell Customer Center is available at http://www.novell
.com/center/.
Left-click the panel icon to open the updater window. It displays a list of patches and
new package versions available. Each entry has a short description and, if applicable,
a category icon: Security patches are marked with a yellow shield. Optional patches
are marked with a light blue circle. Recommended patches are not marked with an icon.
Security patches are listed first, then recommended patches, optional patches, and finally
new package versions. Use the links All, Packages, and Patches to filter the list of
packages displayed.
Officially released updates from Novell show up as Patches. New package ver-
sions from other sources show up as Packages.
To get details about a certain entry, mark it with the mouse and click the Details link
under the list window. To select an entry for installation, mark the entry's check box.
Use the links All and None to select or deselect all patches. Clicking Update installs
the selected programs.
The service tab lists all services available together with type and status information (if
you cannot see the latter two, adjust the window size). Use Remove Service or Add
Service to add or remove services. The following service types are available:
YUM
An HTTP, HTTPS, or FTP server using the RPM-MD format for the package data.
ZYPP
ZYPP services are the YaST installation sources added with Software > Installation
Source in YaST. Use Software Updater or YaST to add installation sources. The
source from which you initially installed (DVD or CD-ROM in most cases) is
preconfigured. If you change or delete this source, replace it with another valid
installation source (ZYPP service), because otherwise you cannot install new soft-
ware.
NOTE: Terminology
The terms YaST installation source, YaST package repository, and ZYPP
service are the same name for a source from which you can install software.
NU
NU stands for Novell Update. Novell provides updates for SUSE Linux Enterprise
exclusively as NU services. If you configured update during installation, the official
Novell NU server is already present in the list.
After SUSE Linux Enterprise is installed, two services are preconfigured: your installa-
tion source (DVD, CD-ROM, or network resource) as a ZYPP service and a SUSE
Linux Enterprise update server as a NU service, which was added during product reg-
istration. Normally there is no need to change these settings. If you do not see a NUYUM
service, open a root shell and execute the command suse_register. A service
is added automatically.
Catalogs
Services are able to provide packages for different pieces of software or for different
software versions (typically RCE or ZENworks services do so). These are organized
in different categories called catalogs. Subscribe or unsubscribe from a catalog by
marking or unmarking the check box in front of it.
At the moment, the SUSE Linux services (YUM and ZYPP) do not provide different
catalogs. Each service only has one catalog. If Software Updater was configured during
installation or with suse_register, it subscribes to the YUM and ZYPP catalogs
automatically. If you manually add a service, you must subscribe to its catalogs.
Software tends to “grow” from version to version. Therefore, take a look at the available
partition space with df before updating. If you suspect you are running short of disk
space, secure your data before updating and repartition your system. There is no general
rule of thumb regarding how much space each partition should have. Space requirements
depend on your particular partitioning profile and the software selected.
10.1.1 Preparations
Before updating, copy the old configuration files to a separate medium, such as tape
device, removable hard disk, USB stick, or ZIP drive, to secure the data. This primarily
Before starting your update, make note of the root partition. The command df / lists
the device name of the root partition. In Example 10.1, “List with df -h” (page 212),
the root partition to write down is /dev/hda3 (mounted as //).
PostgreSQL
Before updating PostgreSQL (postgres), dump the databases. See the manual page
of pg_dump. This is only necessary if you actually used PostgreSQL prior to your
update.
2 Boot the system as for the installation, described in Section 3.3, “System Start-
Up for Installation” (page 18). In YaST, choose a language and select Update
in the Installation Mode dialog. Do not select New Installation.
3 YaST determines whether there are multiple root partitions. If there is only one,
continue with the next step. If there are several, select the right partition and
confirm with Next (/dev/hda3 was selected in the example in Section 10.1.1,
“Preparations” (page 211)). YaST reads the old fstab on this partition to analyze
and mount the file systems listed there.
4 In the Installation Settings dialog, adjust the settings according to your require-
ments. Normally, you can leave the default settings untouched, but if you intend
to enhance your system, check the packages offered in the Software Selection
submenus or add support for additional languages.
4a Click Update Options to update only software that is already installed (Only
Update Installed Packages) or to add new software and features to the system
according to selected patterns. It is advisable to accept the suggestion. You
can adjustment it later with YaST.
4b You also have the possibility to make backups (Backup) of various system
components. Selecting backups slows down the update process. Use this
option if you do not have a recent system backup.
5 Click Accept and confirm Start Update to start the software installation process.
At the end of the installation read the release notes and then click Finish to restart the
computer and log in.
Read the installation instructions on the Service Pack media for further changes.
1 Insert the first SUSE Linux Enterprise SP medium (CD 1 or DVD 1) and boot
your machine. A boot screen similar to the original installation of SUSE Linux
Enterprise 10 is displayed.
Network Installation
Before starting a network installation of an SUSE Linux Enterprise SP, make sure that
the following requirements are met:
• A working network connection both on the installation server and the target machine
that includes a name service, DHCP (optional, but needed for PXE boot), and
OpenSLP (optional).
• The SUSE Linux Enterprise SP CD 1 or DVD 1 to boot the target system or a target
system set up for PXE boot according to Section 4.3.5, “Preparing the Target System
for PXE Boot” (page 75).
2 Select Installation to boot the SP kernel then use F3 to select a type of network
installation source (FTP, HTTP, NFS, or SMB).
3 Provide the appropriate path information or select SLP as the installation source.
4 Select the appropriate installation server from those offered or use the boot options
prompt to provide the type of installation source and its actual location as in
Section 3.3.4, “Installing from a Network Source without SLP” (page 20). YaST
starts.
Finish the installation as outlined in Chapter 3, Installation with YaST (page 17).
1 Adjust the setup of your DHCP server to provide the address information needed
for PXE boot according to Section 4.3.5, “Preparing the Target System for PXE
Boot” (page 75).
2 Set up a TFTP server to hold the boot image needed for PXE boot.
Use the first CD or DVD of your SUSE Linux Enterprise Service Pack for this
and otherwise follow the instructions in Section 4.3.2, “Setting Up a TFTP
Server” (page 68).
4 Initiate the boot of the target system and use VNC to remotely connect to the
installation routine running on this machine. See Section 4.5.1, “VNC Installation”
(page 81) for more information.
5 Accept the license agreement then select a language, default desktop, and other
installation settings.
For detailed instructions for installing SUSE Linux Enterprise, see Chapter 3,
Installation with YaST (page 17).
If you do not select the Update to Service Pack patch, your system will stay at
the previous feature level and you will get bug fixes and security updates for
a limited time only (for SUSE Linux Enterprise 10 SP2 this period is now extended
to six months). Thus for ongoing system integrity it is recommended to switch
to the new feature level as early as possible.
Other update ways are running rug commands manually, using the Patch CD (see
Section 8.3.7, “Updating from a Patch CD” (page 144)), or making use of a locally in-
stalled SMT system.
NOTE
• The system must be online throughout the entire update process, because this process
requires access to the Novell Customer Center.
• If your setup involves third party software or add-on software, test this procedure
on another machine to make sure that the dependencies are not broken by the update.
• Make sure that the entire process is completed successfully. Otherwise the system
becomes inconsistent.
You can only update to Service Pack 2, if Service Pack 1 is fully installed beforehand.
If this is not already the case, update to Service Pack 1 first as outlined in Section “SUSE
Linux Enterprise GA to SP1 and SP2” (page 223).
NOTE
During update migration using YaST Online Update, the ZMD stack is updated
and the ZMD daemon is restarted, too. Therefore, it is advisable to avoid using
any other software management tools such as rug, zen-updater,
zen-installer and zen-remover. It is recommended to quit the
zen-updater during the migration.
1 In a running SUSE Linux Enterprise system, select Computer > YaST > Software
> Online Update.
If you are not logged in as root, enter the root password when prompted.
2 The Online Update dialog appears. Several patches are preselected. Scroll down
the patch list and verify that the package management related patches and the
SUSE Linux Enterprise 10 SP2 maintenance stack update (slesp1u-libzypp)
are actually preselected. Then press Accept to apply the selected updates.
4 Once restarted, press Accept to apply all available updates together with a new
kernel. When installed, you must reboot the system.
5 In the restarted Online Update you now should scroll down the patch list and
select Update to Service Pack 2 (move-to-sles10-sp2) as shown in Fig-
ure 10.2, “Update to Service Pack 2” (page 219). In the pop-up window, click
Accept to confirm the start of the update procedure to the service pack feature
level.
6 The Patch Download and Installation dialog tracks the progress log of the migra-
tion patch installation. When Total Progress reaches 100%, click Finish.
8 Click Close to finish the update to SUSE Linux Enterprise 10 SP2 and reboot.
Before initiating the online update using zen-updater to progress to the SP feature level,
make sure that the requirements are met as listed in Section “Starting with YaST Online
Update” (page 218).
If you see the ZMD not running message, check in a terminal as root
with rczmd status whether ZMD is alive. In case of trouble enter rug
restart --clean to force a restart and cleanup of ZMD and its
database.
If you are not logged in as root, enter the root password when prompted.
6 Click Close to finish the update to SUSE Linux Enterprise 10 SP2 and reboot.
Using rug
For background information about rug command line tool, see Section 9.1, “Update
from the Command Line with rug” (page 200). Use rug, if you need a scriptable solution
for the update.
Before initiating the online update using rug to progress to the SP feature level, make
sure that the requirements are met as listed in Section “Starting with YaST Online Up-
date” (page 218).
This it the minimal command sequence needed to migrate the system to the SP2 patch
level:
rug in -t patch slesp1u-libzypp && rug ping -a
rug in -t patch move-to-sles10-sp2 && rug ping -a
rug refresh && rug ping -a
rug up -t patch -g recommended && rug ping -a
reboot
NOTE
rug ping -a ensures, that the ZMD initialization is complete after the previ-
ous rug command.
The following steps are only relevant, if your system is still running at the GA
patch level.
1 In a running SUSE Linux Enterprise system (GA), select Computer > YaST >
Software > Online Update.
If you are not logged in as root, enter the root password when prompted.
2 The Online Update dialog appears. Scroll down the patch list and select Update
to Service Pack 1 as shown in Figure 10.4, “Update to Service Pack 1” (page 223).
In the pop-up window, click Accept to confirm the start of the update procedure
to the service pack feature level.
4 Run the online update a second time. Once done, in the Patch Download and
Installation click Close. During this second run YaST installs the kernel and all
the other software.
5 Click Finish when you see Installation Finished reported near the end of the
progress log.
6 To finish the update, manually reboot the system to activate the new kernel.
Now SUSE Linux Enterprise runs at the SP1 patch level. Continue with Section
“Starting with YaST Online Update” (page 218) to promote the system to the SP2 patch
level.
For a detailed list of software and configuration changes from SUSE Linux En-
terprise Server 10 to SUSE Linux Enterprise Server 10 SP1, refer to the release
notes of the service pack. View them in the installed system using the YaST
release notes module.
The default boot loader menus contain one kernel entry. Before installing multiple
kernels, it is useful to add an entry for the extra kernels, so they can be selected easily.
The kernel that was active before installing the new kernel can be accessed as vmlinuz
.previous and initrd.previous. By creating a boot loader entry similar to the
default entry and having this entry refer to vmlinuz.previous and initrd
.previous instead of vmlinuz and initrd, the previously active kernel can be
accessed. Alternatively, GRUB and LILO support wild card boot loader entries. Refer
to the GRUB info pages (info grub) and to the lilo.conf(5) manual page for
details.
• km_wlan—Various drivers for wireless LAN cards. The madwifi driver for
Atheros WLAN cards from km_wlan was removed.
For technical reasons, it was necessary to drop support for Ralink WLAN cards. The
following modules were not part of the distribution and will not be added in the future:
On HP systems, you must reconfigure the EFI console then you can drop the console
parameter from the kernel boot command. As a work-around, you can try
console=ttyS1... as a boot parameter instead of console=ttyS0....
/etc/krb5.conf /etc/krb5.conf.heimdal
/etc/krb5.keytab /etc/krb5.keytab.heimdal
It is not possible to copy the server-related (kdc and kadmind) data. After the system
update, the old heimdal database is still available under /var/heimdal. MIT kerberos
maintains the database under /var/lib/kerberos/krb5kdc. For more informa-
tion, see Chapter 45, Network Authentication—Kerberos (page 837) and Chapter 46,
Installing and Administering Kerberos (page 845).
XFree86 X.Org
XFree86 Xorg
xf86config xorgconfig
xf86cfg xorgcfg
XFree86 X.Org
XFree86.0.log Xorg.0.log
XFree86.0.log.old Xorg.0.log.old
In the course of the change to X.Org, the packages were renamed from XFree86* to
xorg-x11*.
Wrapper
There are some new wrappers for starting the OOo components. The new names
are shown in Table 10.4, “Wrapper” (page 231).
Old New
/usr/X11R6/bin/OOo-calc /usr/bin/oocalc
/usr/X11R6/bin/OOo-draw /usr/bin/oodraw
/usr/X11R6/bin/OOo-impress /usr/bin/ooimpress
/usr/X11R6/bin/OOo-math /usr/bin/oomath
/usr/X11R6/bin/OOo-padmin /usr/sbin/oopadmin
/usr/X11R6/bin/OOo-setup –
/usr/X11R6/bin/OOo-template /usr/bin/oofromtemplate
/usr/X11R6/bin/OOo-web /usr/bin/ooweb
/usr/X11R6/bin/OOo-writer /usr/bin/oowriter
/usr/X11R6/bin/OOo /usr/bin/ooffice
/usr/X11R6/bin/OOo-wrapper /usr/bin/ooo-wrapper
The wrapper now supports the option --icons-set for switching between KDE
and GNOME icons. The following options are no longer supported:
--default-configuration, --gui, --java-path, --skip-check,
--lang (the language is now determined by means of locales),
--messages-in-window, and --quiet.
The growisofs program from the dvd+rw-tools package can now burn all DVD
media (DVD+R, DVD-R, DVD+RW, DVD-RW, DVD+RL). Try using that one instead
of the patched cdrecord-dvd.
common-auth
Default PAM configuration for auth section
common-account
Default PAM configuration for account section
common-password
Default PAM configuration for password changing
common-session
Default PAM configuration for session management
You should include these default configuration files from within your application-spe-
cific configuration file, because it is easier to modify and maintain one file instead of
the approximately forty files that used to exist on the system. If you install an application
later, it inherits the already applied changes and the administrator is not required to re-
member to adjust the configuration.
The changes are simple. If you have the following configuration file (which should be
the default for most applications):
#%PAM-1.0
auth required pam_unix2.so
account required pam_unix2.so
password required pam_pwcheck.so
password required pam_unix2.so use_first_pass use_authtok
#password required pam_make.so /var/yp
session required pam_unix2.so
/etc/sysconfig/powersave/ common
common
cpufreq
events
battery
sleep
thermal
10.3.27 PCMCIA
cardmgr no longer manages PC cards. Instead, as with Cardbus cards and other sub-
systems, a kernel module manages them. All necessary actions are executed by
hotplug. The pcmcia start script has been removed and cardctl is replaced by
pccardctl. For more information, see /usr/share/doc/packages/
pcmciautils/README.SUSE.
If you have a local ~/.xinitrc file, you must change it accordingly. Otherwise ap-
plications like f-spot, banshee, tomboy, or Network Manager banshee might fail. Save
your old ~/.xinitrc. Then copy the new template file into your home directory
with:
cp /etc/skel/.xinitrc.template ~/.xinitrc
• /etc/slp.reg.d/ntp.reg
• /etc/init.d/ntp
• /etc/logrotate.d/ntp
• /usr/sbin/rcntp
• /etc/sysconfig/ntp
GNOME (gnome-vfs2 and libgda) contains a wrapper that picks gamin or fam to provide
file system change notification:
• If the FAM daemon is not running, gamin is preferred (Rationale: Inotify is support-
ed only by gamin and it is more efficient for local file systems).
From the command line, you can influence the behavior by using firefox
-new-window url or firefox -new-tab url.
The following information describes a few of the components proposed by the DMTF
standards. Understanding what these are and how they relate to each other can help you
understand what OpenWBEM is and how you most effectively use it in your network.
OpenWBEM 241
nications that provide for distributed system management. There are two parts to
CIM: the CIM Specification and the CIM Schema.
The CIM Specification describes the language, naming, and meta schema. The
meta schema is a formal definition of the model. It defines the terms used to express
the model and their usage and semantics. The elements of the meta schema are
Classes, Properties, and Methods. The meta schema also supports Indications and
Associations as types of Classes, and References as types of Properties.
The CIM Schema provides the actual model descriptions. The CIM Schema supplies
a set of classes with properties and associations that provide a well understood
conceptual framework within which it is possible to organize the available informa-
tion about the managed environment.
• CIMOM providers are software that performs specific tasks within the CIMOM
that are requested by client applications. Each provider instruments one or more
aspects of the CIMOM's schema.
SUSE® Linux Enterprise Server contains the open source CIMOM from the Open-
WBEM project [http://openwbem.org].
Understanding how the OpenWBEM CIMOM is set up and how to configure it can
help you monitor and manage disparate systems in your network with more confidence
and ease.
openwbem-base-providers:
This package contains a Novell Linux instrumentation of base operating system
components such as computer, system, operating system, and processes for the
OpenWBEM CIMOM.
openwbem-smash-providers:
This package contains a Novell Linux instrumentation of the Systems Management
Architecture for Server Hardware (SMASH) providers for the OpenWBEM
CIMOM.
• Section 11.1.1, “Starting, Stopping, or Checking Status for owcimomd” (page 244)
OpenWBEM 243
• Section 11.1.2, “Ensuring Secure Access” (page 244)
If desired, you can replace the path for the default certificate with a path to a commercial
certificate that you have purchased or with a different certificate that you have generated
in the http_server.SSL_cert = path_filename setting in the /etc/
openwbem/openwbem.conf file.
/etc/openwbem/servercert.pem
If you want to generate a new certificate, use the following command. Running this
command replaces the current certificate, so Novell recommends making a copy of the
old certificate before generating a new one.
If you want to change the certificate that OpenWBEM uses, see Section 11.2.2,
“Changing the Certificate Configuration” (page 256).
Ports
OpenWBEM is configured by default to accept all communications through a secure
port, 5989. The following table explains the port communication setup and recommended
configuration.
5989 Secure The secure port that OpenWBEM communications use via HTTPS
services.
OpenWBEM 245
Port Type Notes and Recommendations
5988 Unse- The unsecure port that OpenWBEM communications use via HTTP
cure services.
Novell recommends that you use this setting only when attempting
to debug a problem with the CIMOM. As soon as the problem is
resolved, set the non-secure port option back to Disabled.
If you want to change the default port assignments, see Section 11.2.3, “Changing the
Port Configuration” (page 257).
You can change any of the default settings. See Section 11.2.1, “Changing the Authen-
tication Configuration” (page 248).
• http_server.allow_local_authentication = true
• http_server.ssl_client_verification = disabled
• http_server.use_digest = false
• owcimomd.allow_anonymous = false
• owcimomd.allowed_users = root
• owcimomd.authentication_module =
/usr/lib/openwbem/authentication/libpamauthentication.so
The OpenWBEM CIMOM is PAM enabled by default; therefore the local root user
can authenticate to the OpenWBEM CIMOM with local root user credentials.
• log.main.components = *
• log.main.level = ERROR
• log.main.type = syslog
OpenWBEM 247
11.2 Changing the OpenWBEM
CIMOM Configuration
When OpenWBEM CIMOM (owcimomd) starts, it reads it run-time configuration from
the openwbem.conf file. The openwbem.conffile is located in the /etc/
openwbem directory.
Any setting that has the options commented out with a semicolon (;) or pound sign (#)
uses the default setting.
When making changes to this file, you can use any text editor that saves the file in a
format that is native to the platform you are using.
You can change any of the settings in the openwbem.conf file. This section discusses
the following configuration settings:
http_server.allow_local_authentication
Purpose
Directs the http_server to allow local authentication without supplying a password, re-
lying on local system file permissions.
You can use this setting with the Basic or Digest settings.
Syntax
http_server.allow_local_authentication = option
Option Description
OpenWBEM 249
Option Description
Example
http_server.allow_local_authentication = true
http_server.digest_password_file
Purpose
Specifies a location for the password file. This is required if the http_server.use_digest
setting is enabled.
Syntax
http_server.digest_password_file = path_filename
The following is the default path and filename for the digest password file:
/etc/openwbem/digest_auth.passwd
Example
http_server.digest_password_file =
/etc/openwbem/digest_auth.passwd
http_server.ssl_client_verification
Purpose
Determines whether the server should attempt to authenticate clients with SSL Client
Certificate verification.
Option Description
Example
http_server.ssl_client_verification = disabled
http_server.ssl_trust_store
Purpose
Specifies a directory containing the OpenSSL trust store.
Syntax
http_server.ssl_trust_store = path
The following is the default path for the trust store file.
OpenWBEM 251
/etc/openwbem/truststore
Example
http_server.ssl_trust_store = /etc/openwbem/truststore
http_server.use_digest
Purpose
Directs the HTTP server to use Digest authentication, which bypasses the Basic authen-
tication mechanism. To use digest, you must set up the digest password file using
owdigestgenpass.
Syntax
http_server.use_digest = option
Option Description
Example
http_server.use_digest = false
ACL processing is not enabled until the OpenWBEM_Acl1.0.mof file has been im-
ported.
Syntax
owcimomd.ACL_superuser = username
Example
owcimomd.ACL_superuser = root
owcimomd.allow_anonymous
Purpose
Enables or disables anonymous logins to owcimomd.
Syntax
owcimomd.allow_anonymous = option
Option Description
OpenWBEM 253
Option Description
Example
owcimomd.allowed_anonymous = false
owcimomd.allowed_users
Purpose
Specifies a list of users who are allowed to access owcimomd data.
Syntax
owcimomd.allowed_users = option
Option Description
username Specifies one or more users who are allowed to access the owci-
momd data.
Example
owcimomd.allowed_users = bcwhitely jkcarey jlanderson
Syntax
owcimomd.authentication_module = path_filename
The following is the default path and filename for the authentication modules:
/usr/lib/openwbem/authentication/libpamauthentication.so
Example
owcimomd.authentication_module =
/usr/lib/openwbem/authentication/libpamauthentication.so
simple_auth.password_file
Purpose
Specifies the path to the password file when the simple authentication module is used.
Syntax
simple_auth.password_file = path_filename
Example
simple_auth.password_file =
/etc/openwbem/simple_auth.passwd
OpenWBEM 255
11.2.2 Changing the Certificate
Configuration
The http_server.SSL_cert and the http_server.SSL_key settings specify the location of
the file or files that contains the host's private key and the certificate that is used by
OpenSSL for HTTPS communications.
/etc/openwbem/servercert.pem
/etc/openwbem/serverkey.pem
Syntax
http_server.SSL_cert = path_filename
or
http_server.SSL_key = path_filename
NOTE
Both the key and certificate can be in the same file. In this case, the values of
http_server.SSL_cert and http_server.SSL_key would be the same.
Examples
http_server.SSL_cert = /etc/openwbem/servercert.pem
http_server.SSL_key = /etc/openwbem/servercert.pem
http_server.SSL_key = /etc/openwbem/serverkey.pem
Syntax
http_server.http_port = option
or
http_server.https_port = option
Option Description
Example
These settings disable the HTTP port and enable port 5989 for HTTPS communications:
http_server.http_port = -1
http_server.https_port = 5989
OpenWBEM 257
11.2.4 Changing the Default Logging
Configuration
The following log settings in the owcimomd.conf file let you specify where and how
much logging occurs, the type of errors logged, and the log size, filename, and format:
If you want to set up debug logging, see Section 11.2.5, “Configuring Debug Logging”
(page 266).
If you want to set up additional logs, see Section 11.2.6, “Configuring Additional Logs”
(page 267).
log.main.categories
Purpose
Specifies the categories the log outputs.
Syntax
log.main.categories = option
• DEBUG
• ERROR
• FATAL
• INFO
Example
log.main.categories = FATAL ERROR INFO
log.main.components
Purpose
Specifies the components that the log outputs.
OpenWBEM 259
Syntax
log.main.components = option
Option Description
Example
log.main.components = owcimomd nssd
log.main.format
Purpose
Specifies the format (text mixed with printf() style conversion specifiers) of the log
messages.
Syntax
log.main.format = conversion_specifier
Option Specifies
%% %
%d Date
For more information about the date format specifiers, see the
documentation for the strftime() function found in the <ctime>
header.
%F Filename
%L Line number
%M Method name where the logging request was issued (only works
on C++ compilers which support __PRETTY_FUNCTION__
or C99’s __func__).
%m Message
%t Thread ID
\n New line
OpenWBEM 261
Option Specifies
\t Tab
\r Line feed
\\ \
It is possible to change the minimum field width, the maximum field width, and justifi-
cation. The optional format modifier is placed between the percent sign (%) and the
conversion character. The first optional format modifier is the left justification flag,
which is the minus (-) character. The optional minimum field width modifier follows,
which is an integer that represents the minimum number of characters to output. If the
data item requires fewer characters, it is padded with spaces on either the left or the
right, according to the justification flag. If the data item is larger than the minimum
field width, the field is expanded to accommodate the data.
The maximum field width modifier is designated by a period (.) followed by a decimal
constant. If the data item is longer than the maximum field, then the extra characters
are removed from the beginning of the data item (by default) or from the end (if the
left justification flag was specified).
Examples
Log4j TTCC layout:
XML output conforming to log4j.dtd 1.2, which can be processed by Chainsaw (if used,
this must be on one line; it is split up here for readability):
log.main.format = [%t]%m
log.main.level
Purpose
Specifies the level the log outputs. If set, the log outputs all predefined categories at
and above the specified level.
Syntax
log.main.level = option
Option Description
DEBUG Logs all Debug, Info, Error, and Fatal error messages.
Example
log.main. level = ERROR
OpenWBEM 263
log.main.location
Purpose
Specifies the location of the log file owcimomd uses when the log.main.type setting
option specifies that logging is sent to a file.
Syntax
log.main.location = path_filename
Example
log.main.location = /system/cimom/var/owcimomd.log
log.main.max_backup_index
Purpose
Specifies the amount of backup logs that are kept before the oldest is erased.
Syntax
log.main.backup_index = option
Option Description
Example
log.main.max_backup_index = 1
Syntax
log.main.max_file_size = option
Option Description
Example
log.main.max_file_size = 0
log.main.type
Purpose
Specifies the type of main log owcimomd uses.
Syntax
log.main.type = option
Option Description
OpenWBEM 265
Option Description
Example
log.main.type = syslog
• log.debug.categories = *
• log.debug.components = *
• log.debug.format = [%t] %m
• log.debug.level = *
• log.debug.type = stderr
log.debug.format =
\x1b[1;37;40m[\x1b[1;31;40m%-.6t\x1b[1;37;40m]\x1b[1;32;40m
%m\x1b[0;37;40m
If you want to use additional colors, use the following codes with the
log.debug.format command:
Color Codes
red \x1b[1;31;40m
green \x1b[1;32;40m
yellow \x1b[1;33;40m
blue \x1b[1;34;40m
purple \x1b[1;35;40m
cyan \x1b[1;36;40m
white \x1b[1;37;40m
gray \x1b[0;37;40m
OpenWBEM 267
owcimomd.additional_logs = logname
Syntax
owcimomd.additional_logs = logname
• log.log_name.categories
• log.log_name.components
• log.log_name.format
• log.log_name.level
• log.log_name.location
• log.log_name.max_backup_index
• log.log_name.max_file_size
Example
owcimomd.additional_logs = errorlog1 errorlog2 errorlog3
• readme
• openwbem-faq.html
OpenWBEM 269
Mass Storage over IP
Networks—iSCSI
One of the central tasks in computer centers and when operating servers is providing
12
hard disk capacity for server systems. Fiber channel is often used for this purpose in
the mainframe sector. So far, UNIX computers and the majority of servers are not
connected to central storage solutions.
linux-iSCSI provides an easy and reasonably inexpensive solution for connecting Linux
computers to central storage systems. In principle, iSCSI represents a transfer of SCSI
commands on the IP level. If a program starts an inquiry for such a device, the operating
system produces the necessary SCSI commands. These are then embedded in IP packages
and encrypted as necessary by software that is commonly known as an iSCSI initiator.
The packages are then transferred to the corresponding iSCSI remote station, also called
iSCSI target.
Many storage solutions provide access over iSCSI, but it is also possible to run a Linux
server that provides an iSCSI target. In this case, it is important to set up the Linux
server optimized for file system services. The iSCSI target just accesses block devices
in Linux. Therefore it is possible to use RAID solutions to increase disk space as well
as a lot of memory to improve data caching. For more information about RAID, also
see Section 7.2, “Soft RAID Configuration” (page 123).
To configure the iSCSI target, run the iSCSI Target module in YaST. The configuration
is split into three tabs. In the Service tab, select the start mode and the firewall settings.
If you want to access the iSCSI target from a remote machine, select Open Port in
Firewall. If a iSNS server should manage the discovery and access control, activate
iSNS Access Control and enter the IP address of your iSNS Server. Note, that you cannot
use even valid hostnames, but must use the IP address. For more about iSNS, read
Chapter 13, iSNS for Linux Overview (page 281).
The Global tab provides settings for the iSCSI server. The authentication set here is
used for the discovery of services, not for accessing the targets. If you do not want to
restrict the access to the discovery, use No Authentication.
If authentication is needed, there are two possibilities to consider. One is that an initiator
must prove that it has the permissions to run a discovery on the iSCSI target. This is
done with Incoming Authentication. The other is that the iSCSI target must prove to
the initiator that it is the expected target. Therefore, the iSCSI target can also provide
a username and password. This is done with Outgoing Authentication. Find more infor-
mation about authentication in RFC 3720 (see http://www.ietf.org/rfc/
rfc3720.txt).
The targets are defined in the Targets tab. Use Add to create a new iSCSI target. The
first dialog asks for information about the device to export.
Target
The Target line has a fixed syntax that looks like the following:
iqn.yyyy-mm.<reversed domain name>
Identifier
The Identifier is freely selectable. It should follow some scheme to make the whole
system more structured.
LUN
It is possible to assign several LUNs to a target. To do this, select a target in the
Targets tab then click Edit. There, add new LUNs to an existing target.
Path
Add the path to the block device or file system image to export.
The next menu configures the access restrictions of the target. The configuration is very
similar to the configuration of the discovery authentication. In this case, at least an in-
coming authentication should be setup.
Next finishes the configuration of the new target, and brings you back to the overview
page of the Target tab. Activate your changes by clicking on Finish.
If you have access to an iSNS server, the first thing to configure is telling the target
about this server. Note, that the address of the iSNS server must always be given as
IP address. A normal domain name is not sufficient. The configuration for this function-
ality looks like the following:
iSNSServer 192.168.1.111
iSNSAccessControl no
This configuration makes the iSCSI target register itself with the iSNS server, which
in turn provides the discovery for initiators. For more about iSNS read Chapter 13,
All direct iSCSI authentication may be done in two directions. The iSCSI target can
require the iSCSI initiator to authenticate with the IncomingUser, which can be
added multiple times. The iSCSI initiator may also require the iSCSI target to authenti-
cate. Use OutgoingUser for this. Both have the same syntax:
IncomingUser <username> <password>
OutgoingUser <username> <password>
The authentication is followed by one or several target definitions. For each target, add
a Target section. This section always starts with a Target identifier followed by
definitions of logical unit numbers:
Target iqn.yyyy-mm.<reversed domain name>[:identifier]
Lun 0 Path=/dev/mapper/system-v3
Lun 1 Path=/dev/hda4
Lun 2 Path=/var/lib/xen/images/xen-1,Type=fileio
In the Target line, yyyy-mm is the date when this target is activated, and identifier
is freely selectable. Find more about naming conventions in RFC 3722 (see http://
www.ietf.org/rfc/rfc3722.txt). Three different block devices are exported
in this example. The first one is a logical volume (see also Section 7.1, “LVM Configu-
ration” (page 115)), the second is an IDE partition, and the third is an image available
in the local file system. All these look like block devices to an iSCSI initiator.
Before activating the iSCSI target, add at least one IncomingUser after the Lun
definitions. It does the authentication for the use of this target.
To activate all your changes, restart the iscsitarget daemon with rcopen-iscsi
restart. Check your configuration in the /proc file system:
cat /proc/net/iet/volume
tid:1 name:iqn.2006-02.com.example.iserv:systems
lun:0 state:0 iotype:fileio path:/dev/mapper/system-v3
lun:1 state:0 iotype:fileio path:/dev/hda4
lun:2 state:0 iotype:fileio path:/var/lib/xen/images/xen-1
There are many more options that control the behavior of the iSCSI target. Find them
in the manual page of ietd.conf.
Active sessions are also displayed in the /proc file system. For each connected initiator,
an extra entry is added to /proc/net/iet/session:
To create a new iSCSI target with a LUN, first update your configuration file. The ad-
ditional entry could be:
Target iqn.2006-02.com.example.iserv:system2
Lun 0 Path=/dev/mapper/system-swap2
IncomingUser joe secret
1 Create a new target with the command ietadm --op new --tid=2
--params Name=iqn.2006-02.com.example.iserv:system2.
3 Set the username and password combination on this target with ietadm --op
new --tid=2 --user
--params=IncomingUser=joe,Password=secret.
It is also possible to delete active connections. First, check all active connections with
the command cat /proc/net/iet/session. This may look like:
To delete the session with the session ID 281474980708864, use the command ietadm
--op delete --tid=1 --sid=281474980708864 --cid=0. Be aware
that this makes the device unaccessible on the client system and processes accessing
this device are likely to hang.
ietadm can also be used to change various configuration parameters. Obtain a list of
the global variables with ietadm --op show --tid=1 --sid=0. The output
looks like:
InitialR2T=Yes
ImmediateData=Yes
MaxConnections=1
MaxRecvDataSegmentLength=8192
MaxXmitDataSegmentLength=8192
MaxBurstLength=262144
FirstBurstLength=65536
DefaultTime2Wait=2
DefaultTime2Retain=20
MaxOutstandingR2T=1
DataPDUInOrder=Yes
DataSequenceInOrder=Yes
ErrorRecoveryLevel=0
HeaderDigest=None
DataDigest=None
OFMarker=No
IFMarker=No
OFMarkInt=Reject
IFMarkInt=Reject
All of these parameters may be changed easily. For example, if you want to change the
maximum number of connections to two, use ietadm --op update --tid=1
--params=MaxConnections=2. In the file /etc/ietd.conf, the associated
line should look like MaxConnections 2.
The changes that you make with the command ietadm are not permanent
for the system. These changes are lost at the next reboot if they are not added
There are several more options available for the command ietadm. Find an overview
with ietadm -h. The abbreviations there are target ID (tid), session ID (sid), and
connection ID (cid). They can also be found in /proc/net/iet/session.
After a successful discovery, use Login to activate the target. You will be asked for
authentication information to use the selected iSCSI target. Next finishes the configura-
tion. If everything went well, the target now appears in Connected Targets.
lsscsi
[1:0:0:0] disk IET VIRTUAL-DISK 0 /dev/sda
The discovery stores all received values in an internal persistent database. In addition,
it displays all detected targets. Run this discovery with the command iscsiadm -m
discovery --type=st --portal=<targetip>. The output should look
like:
149.44.171.99:3260,1 iqn.2006-02.com.example.iserv:systems
To discover the available targets on a iSNS server, use the command iscsiadm
--mode discovery --type isns --portal <targetip>
For each target defined on the iSCSI target, one line appears. Learn how to obtain more
information about the stored data in Section 12.2.3, “The iSCSI Client Databases”
(page 279).
The newly generated devices show up in the output of lsscsi and can now be accessed
by mount.
To edit the value of one of these variables, use the command iscsiadm with the
update operation. For example, if you want iscsid to log in to the iSCSI target when
it initializes, set the variable node.startup to the value automatic:
iscsiadm -m node -n iqn.2006-02.com.example.iserv:systems --op=update
--name=node.startup --value=automatic
Remove obsolete data sets with the operation delete. If the target
iqn.2006-02.com.example.iserv:systems is no longer a valid record,
To get a list of all discovered targets, run the command iscsiadm -m node.
• http://www.open-iscsi.org/
• http://www.open-iscsi.org/cgi-bin/wiki.pl
• http://www.novell.com/coolsolutions/appnote/15394.html
There is also some online documentation available. See the manual pages of iscsiadm,
iscsid, ietd.conf, and ietd and the example configuration file /etc/iscsid
.conf.
Using iSNS, you create iSNS discovery domains and discovery domain sets. You then
group or organize iSCSI targets and initiators into discovery domains and group the
discovery domains into discovery domain sets. By dividing storage nodes into domains,
you can limit the discovery process of each host to the most appropriate subset of targets
registered with iSNS, which allows the storage network to scale by reducing the number
of unnecessary discoveries and by limiting the amount of time each host spends estab-
Both, iSCSI targets and iSCSI initiators use iSNS clients to initiate transactions with
iSNS servers using the iSNS protocol. They then register device attribute information
in a common discovery domain, download information about other registered clients,
and receive asynchronous notification of events that occur in their discovery domain.
iSNS servers respond to iSNS protocol queries and requests made by iSNS clients using
the iSNS protocol. iSNS servers initiate iSNS protocol state change notifications and
store properly authenticated information submitted by a registration request in an iSNS
database.
An example of the benefits iSNS provides can be better understood through the following
scenario:
NOTE
iSNS can be installed on the same server as an iSCSI target or initiator. Using
an iSCSI target and initiator on the same machine is not supported.
3 Select both the isns and yast2-isns packages, then click Accept.
iSNS can also be configured to start automatically each time the server is rebooted. To
do this
2 With the Service tab selected, specify the IP address of your iSNS server, then
click Save Address.
You can also choose to start the iSNS server manually. You must then use the
rcisns start command to start the service each time the server is restarted.
2 Click the Discovery Domains tab, then click the Create Discovery Domain button.
You can also select an existing discovery domain and click the Delete button to
remove that discovery domain.
3 Specify the name of the discovery domain you are creating, then click OK.
2 Click the Discovery Domains Sets tab, then click the Create Discovery Domain
Set button.
You can also select an existing discovery domain set and click the Delete button
to remove that discovery domain set.
3 Specify the name of the discovery domain set you are creating, then click OK.
2 Click the iSCSI Nodes tab and ensure the iSCSI targets and initiators that you
want to use the iSNS service are listed.
If an iSCSI target or initiator is not listed, you might need to restart the iSCSI
service on the node. You can do this by running the rcopen-iscsi restart
command to restart an initiator or the rciscsitarget restart command
to restart a target.
You can select an iSCSI node and click the Delete button to remove that node
from the iSNS database. This is useful if you are no longer using an iSCSI node
or have renamed it.
The iSCSI node will be automatically added to the list (iSNS database) again
when you restart the iSCSI service or reboot the server unless you remove or
comment out the iSNS portion of the iSCSI configuration file.
3 Click the Discovery Domains tab, select the desired discovery domain, then click
the Display Members button.
4 Click Add existing iSCSI Node, select the node you want to add to the domain,
then click Add Node.
5 Repeat the last step for as many nodes as you want to add to the discovery domain,
then click Done when you are finished adding nodes.
3 Select Create Discovery Domain Set to add a new set to the list of discovery
domain sets.
5 Click Add Discovery Domain, select the discovery domain you want to add to
the discovery domain set, then click Add Discovery Domain.
6 Repeat the last step for as many discovery domains as you want to add to the
discovery domain set, then click Done.
A discovery domain can belong to more than one discovery domain set.
OCFS2 was added to SUSE Linux Enterprise Server 9 to support Oracle Real Application
Cluster (RAC) databases and its application files, Oracle Home. In SUSE Linux Enter-
prise Server 10 and later, OCFS2 can be used for any of the following storage solutions:
XEN virtual machines and virtual servers can be stored on OCFS2 volumes that
are mounted by cluster servers to provide quick and easy portability of XEN virtual
machines between servers.
• All nodes can concurrently read and write directly to storage via the standard file
system interface, enabling easy management of applications that run across a cluster.
DLM control is good for most cases, but an application’s design might limit scala-
bility if it contends with the DLM to coordinate file access.
• Metadata caching
• Metadata journaling
• Support for multiple-block sizes (each volume can have a different block size) up
to 4 KB, for a maximum volume size of 16 TB
• Asynchronous and direct I/O support for database files for improved database per-
formance
Service Description
Node Manager (NM) Keeps track of all the nodes in the /etc/ocfs2/
cluster.conf file
Distributed Lock Manager Keeps track of all locks and their owners and status
(DLM)
DLMFS User space interface to the kernel space DLM. For de-
tails, see Section 14.3, “In-Memory File Systems”
(page 290)
Each node reads the file and writes to its assigned block in the file at two-second inter-
vals. Changes to a node’s time stamp indicates the node is alive. A node is dead if it
does not write to the heartbeat file for a specified number of sequential intervals, called
the heartbeat threshold. Even if only a single node is alive, the O2CB cluster service
must perform this check, because another node could be added dynamically at any time.
You can modify the disk heartbeat threshold in the /etc/sysconfig/o2cb file,
using the O2CB_HEARTBEAT_THRESHOLD parameter. The wait time is calculated
as follows:
The ocfs2console utility is a GTK GUI-based interface for managing the configu-
ration of the OCFS2 services in the cluster. Use this utility to set up and save the /etc/
ocfs2/cluster.conf file to all member nodes of the cluster. In addition, you can
use it to format, tune, mount, and umount OCFS2 volumes.
IMPORTANT
The file browser column in the ocfs2console utility is prohibitively slow and
inconsistent across the cluster. We recommend that you use the ls(1) com-
mand to list files instead.
Additional OCFS2 utilities are described in the following table. For information about
syntax for these commands, see their man pages.
de- Examines the state of the OCFS file system for the purpose of debug-
bugfs.ocfs2 ging.
fsck.ocfs2 Checks the file system for errors and optionally repairs errors.
mount- Detects and lists all OCFS2 volumes on a clustered system. Detects
ed.ocfs2 and lists all nodes on the system that have mounted an OCFS2 device
or lists all OCFS2 devices.
tune.ocfs2 Changes OCFS2 file system parameters, including the volume label,
number of node slots, journal size for all node slots, and volume size.
Use the following commands to manage O2CB services. For more information about
the o2cb command syntax, see its man page.
Command Description
/etc/init.d/o2cb status Reports whether the o2cb services are loaded and mounted
/etc/init.d/o2cb load Loads the O2CB modules and in-memory file systems
/etc/init.d/o2cb unload Unloads the O2CB modules and in-memory file systems
/etc/init.d/o2cb start If the cluster is set up to load on boot, starts the cluster
ocfs2 named ocfs2 by loading o2cb and onlining the cluster
/etc/init.d/o2cb stop If the cluster is set up to load on boot, stops the cluster
ocfs2 named ocfs2 by offlining the cluster and unloading the
O2CB modules and in-memory file systems
1 Log in as the root user, then open the YaST Control Center.
4 If you need to install the packages, select them, then click Install and follow the
on-screen instructions.
14.6.1 Prerequisites
Before you begin, do the following:
We recommend that you store application files and data files on different OCFS2
volumes, but it is only mandatory to do so if your application volumes and data
volumes have different requirements for mounting. For example, the Oracle RAC
database volume requires the datavolume and nointr mounting options, but
the Oracle Home volume should never use these options.
• Make sure that the ocfs2console, and ocfs2-tools packages are installed.
Use YaST or command line methods to install them if they are not. For YaST in-
structions, see Section 14.5, “OCFS2 Packages” (page 293).
Follow the procedure in this section for one node in the cluster.
2 If the o2cb cluster service is not already enabled, enter chkconfig --add
o2cb.
When you add a new service, chkconfig ensures that the service has either a
start or a kill entry in every run level.
3 If the ocfs2 service is not already enabled, enter chkconfig --add ocfs2.
This file should be the same on all the nodes in the cluster. Use the following
steps to set up the first node. Later, you can use the ocfs2console to add new
nodes to the cluster dynamically and to propagate the modified cluster.conf
file to all nodes.
However, if you change other settings, such as the cluster name and IP address,
you must restart the cluster for the changes to take effect, as described in Step 6
(page 296).
If cluster.conf is not present, the console will create one with a default
cluster name of ocfs2. Modify the cluster name as desired.
5c In the Node Configuration dialog box, click Add to open the Add Node dialog
box.
5d In the Add Node dialog box, specify the unique name of your primary node,
a unique IP address (such as 192.168.1.1), and the port number (optional,
default is 7777), then click OK.
5e In the Node Configuration dialog box, click Apply, then click Close to dismiss
the Add Node dialog box.
/etc/init.d/o2cb stop
/etc/init.d/o2cb start
2 If the O2CB cluster service is offline, start it by entering the following command
then wait for the process to return a status of OK.
Replace ocfs2 with the actual cluster name of your OCFS2 cluster.
The OCFS2 cluster must be online, because the format operation must first ensure
that the volume is not mounted on any node in the cluster.
3 Create and format the volume using one of the following methods:
• In EVMSGUI, go to the Volumes page, select Make a file system > OCFS2,
then specify the configuration settings.
• Use the mkfs.ocfs2 utility. For information about the syntax for this
command, refer to the mkfs.ocfs2 man page.
Volume la- A descriptive name for the volume to make it uniquely identifi-
bel able when it is mounted on different nodes.
Cluster size Cluster size is the smallest unit of space allocated to a file to
hold the data.
Options are 4, 8, 16, 32, 64, 128, 256, 512, and 1024 KB. Cluster
size cannot be modified after the volume is formatted.
Block size The smallest unit of space addressable by the file system.
Specify the block size when you create the volume.
2 If the O2CB cluster service is offline, start it by entering the following command,
then wait for the process to return a status of OK.
Replace ocfs2 with the actual cluster name of your OCFS2 cluster.
The OCFS2 cluster must be online, because the format operation must ensure
that the volume is not mounted on any node in the cluster.
• Mount the volume from the command line, using the mount command.
When new nodes try to connect to the cluster, they are not allowed to
join because the nodes have not added them to their connection list. To
solve this issue, manually go to each node and issue the following com-
mand to update the respective connection list:
o2cb_ctl -H -n ocfs2 -t cluster -a online=yes
For information about mounting an OCFS2 volume using any of these methods,
see the OCFS2 User Guide [http://oss.oracle.com/projects/
ocfs2/documentation/] on the OCFS2 project at Oracle [http://oss
.oracle.com/projects/ocfs2/].
When running Oracle RAC, make sure to use the datavolume and nointr
mounting options for OCFS2 volumes that contain the Voting diskfile (CRS),
Cluster registry (OCR), Data files, Redo logs, Archive logs, and Control files.
Do not use these options when mounting the Oracle Home volume.
Option Description
Ensures that the Oracle processes open the files with the o_direct
datavolume
flag.
The term POSIX ACL suggests that this is a true POSIX (portable operating system
interface) standard. The respective draft standards POSIX 1003.1e and POSIX 1003.2c
have been withdrawn for several reasons. Nevertheless, ACLs as found on many systems
belonging to the UNIX family are based on these drafts and the implementation of file
system ACLs as described in this chapter follows these two standards as well. They
can be viewed at http://wt.xpilot.org/publications/posix.1e/.
You can see the s that denotes that the setuid bit is set for the user permission. By
means of the setuid bit, all users starting the passwd command execute it as root.
You can see the s that denotes that the setgid bit is set for the group permission. The
owner of the directory and members of the group archive may access this directory.
Users that are not members of this group are “mapped” to the respective group. The
effective group ID of all written files will be archive. For example, a backup program
that runs with the group ID archive is able to access this directory even without root
privileges.
ACLs can be used as an extension of the traditional file permission concept. They allow
assignment of permissions to individual users or groups even if these do not correspond
to the original owner or the owning group. Access control lists are a feature of the
Linux kernel and are currently supported by ReiserFS, Ext2, Ext3, JFS, and XFS. Using
ACLs, complex scenarios can be realized without implementing complex permission
models on the application level.
The advantages of ACLs are evident if you want to replace a Windows server with a
Linux server. Some of the connected workstations may continue to run under Windows
even after the migration. The Linux system offers file and print services to the Windows
clients with Samba. With Samba supporting access control lists, user permissions can
be configured both on the Linux server and in Windows with a graphical user interface
(only Windows NT and later). With winbindd, part of the samba suite, it is even
possible to assign permissions to users only existing in the Windows domain without
any account on the Linux server.
15.3 Definitions
user class
The conventional POSIX permission concept uses three classes of users for assign-
ing permissions in the file system: the owner, the owning group, and other users.
Three permission bits can be set for each user class, giving permission to read (r),
write (w), and execute (x).
access ACL
The user and group access permissions for all kinds of file system objects (files
and directories) are determined by means of access ACLs.
ACL entry
Each ACL consists of a set of ACL entries. An ACL entry contains a type, a qual-
ifier for the user or group to which the entry refers, and a set of permissions. For
some entry types, the qualifier for the group or users is undefined.
The mask entry further limits the permissions granted by named user, named group,
and owning group entries by defining which of the permissions in those entries are ef-
fective and which are masked. If permissions exist in one of the mentioned entries as
well as in the mask, they are effective. Permissions contained only in the mask or only
in the actual entry are not effective—meaning the permissions are not granted. All
permissions defined in the owner and owning group entries are always effective. The
example in Table 15.2, “Masking Access Permissions” (page 305) demonstrates this
mechanism.
There are two basic classes of ACLs: A minimum ACL contains only the entries for
the types owner, owning group, and other, which correspond to the conventional per-
mission bits for files and directories. An extended ACL goes beyond this. It must contain
a mask entry and may contain several entries of the named user and named group types.
owner user::rwx
mask mask::rwx
other other::rwx
In the case of a minimum ACL—without mask—the group class permissions are mapped
to the ACL entry owning group. This is shown in Figure 15.1, “Minimum ACL: ACL
Entries Compared to Permission Bits” (page 306). In the case of an extended ACL—with
mask—the group class permissions are mapped to the mask entry. This is shown in
Figure 15.2, “Extended ACL: ACL Entries Compared to Permission Bits” (page 306).
mkdir mydir creates the mydir directory with the default permissions as set by
umask. Use ls -dl mydir to check whether all permissions were assigned correctly.
The output for this example is:
drwxr-x--- ... tux project3 ... mydir
With getfacl mydir, check the initial state of the ACL. This gives information
like:
# file: mydir
# owner: tux
# group: project3
user::rwx
group::r-x
other::---
The first three output lines display the name, owner, and owning group of the directory.
The next three lines contain the three ACL entries owner, owning group, and other. In
fact, in the case of this minimum ACL, the getfacl command does not produce any
information you could not have obtained with ls.
Modify the ACL to assign read, write, and execute permissions to an additional user
geeko and an additional group mascots with:
setfacl -m user:geeko:rwx,group:mascots:rwx mydir
The option -m prompts setfacl to modify the existing ACL. The following argument
indicates the ACL entries to modify (multiple entries are separated by commas). The
final part specifies the name of the directory to which these modifications should be
applied. Use the getfacl command to take a look at the resulting ACL.
# file: mydir
# owner: tux
# group: project3
user::rwx
user:geeko:rwx
group::r-x
group:mascots:rwx
In addition to the entries initiated for the user geeko and the group mascots, a mask
entry has been generated. This mask entry is set automatically so that all permissions
are effective. setfacl automatically adapts existing mask entries to the settings
modified, unless you deactivate this feature with -n. mask defines the maximum effec-
tive access permissions for all entries in the group class. This includes named user,
named group, and owning group. The group class permission bits displayed by ls -dl
mydir now correspond to the mask entry.
drwxrwx---+ ... tux project3 ... mydir
The first column of the output contains an additional + to indicate that there is an ex-
tended ACL for this item.
According to the output of the ls command, the permissions for the mask entry include
write access. Traditionally, such permission bits would mean that the owning group
(here project3) also has write access to the directory mydir. However, the effective
access permissions for the owning group correspond to the overlapping portion of the
permissions defined for the owning group and for the mask—which is r-x in our ex-
ample (see Table 15.2, “Masking Access Permissions” (page 305)). As far as the effective
permissions of the owning group in this example are concerned, nothing has changed
even after the addition of the ACL entries.
Edit the mask entry with setfacl or chmod. For example, use chmod g-w mydir.
ls -dl mydir then shows:
drwxr-x---+ ... tux project3 ... mydir
After executing the chmod command to remove the write permission from the group
class bits, the output of the ls command is sufficient to see that the mask bits must
have changed accordingly: write permission is again limited to the owner of mydir.
• A subdirectory inherits the default ACL of the parent directory both as its default
ACL and as an access ACL.
All system calls that create file system objects use a mode parameter that defines the
access permissions for the newly created file system object. If the parent directory does
not have a default ACL, the permission bits as defined by the umask are subtracted
from the permissions as passed by the mode parameter, with the result being assigned
to the new object. If a default ACL exists for the parent directory, the permission bits
assigned to the new object correspond to the overlapping portion of the permissions of
the mode parameter and those that are defined in the default ACL. The umask is dis-
regarded in this case.
# file: mydir
# owner: tux
# group: project3
user::rwx
user:geeko:rwx
group::r-x
group:mascots:rwx
mask::rwx
other::---
default:user::rwx
default:group::r-x
default:group:mascots:r-x
default:mask::r-x
default:other::---
getfacl returns both the access ACL and the default ACL. The default ACL is
formed by all lines that start with default. Although you merely executed the
setfacl command with an entry for the mascots group for the default ACL,
setfacl automatically copied all other entries from the access ACL to create a
valid default ACL. Default ACLs do not have an immediate effect on access per-
missions. They only come into play when file system objects are created. These
new objects inherit permissions only from the default ACL of their parent directory.
2. In the next example, use mkdir to create a subdirectory in mydir, which inherits
the default ACL.
mkdir mydir/mysubdir
getfacl mydir/mysubdir
# file: mydir/mysubdir
# owner: tux
# group: project3
user::rwx
group::r-x
group:mascots:r-x
mask::r-x
other::---
default:user::rwx
default:group::r-x
default:group:mascots:r-x
3. Use touch to create a file in the mydir directory, for example, touch
mydir/myfile. ls -l mydir/myfile then shows:
-rw-r-----+ ... tux project3 ... mydir/myfile
touch uses a mode with the value 0666 when creating new files, which means
that the files are created with read and write permissions for all user classes, pro-
vided no other restrictions exist in umask or in the default ACL (see Section
“Effects of a Default ACL” (page 309)). In effect, this means that all access permis-
sions not contained in the mode value are removed from the respective ACL entries.
Although no permissions were removed from the ACL entry of the group class,
the mask entry was modified to mask permissions not set in mode.
Things are more complicated if a process belongs to more than one group and would
potentially suit several group entries. An entry is randomly selected from the suitable
entries with the required permissions. It is irrelevant which of the entries triggers the
final result “access granted”. Likewise, if none of the suitable group entries contains
the required permissions, a randomly selected entry triggers the final result “access
denied”.
Unfortunately, many editors and file managers still lack ACL support. When copying
files with Emacs, for instance, the ACLs of these files are lost. When modifying files
with an editor, the ACLs of files are sometimes preserved and sometimes not, depending
on the backup mode of the editor used. If the editor writes the changes to the original
file, the access ACL is preserved. If the editor saves the updated contents to a new file
that is subsequently renamed to the old filename, the ACLs may be lost, unless the ed-
itor supports ACLs. Except for the star archiver, there are currently no backup applica-
tions that preserve ACLs.
Essentially, rpm has five modes: installing, uninstalling, or updating software packages;
rebuilding the RPM database; querying RPM bases or individual RPM archives; integrity
checking of packages; and signing packages. rpmbuild can be used to build installable
packages from pristine sources.
Installable RPM archives are packed in a special binary format. These archives consist
of the program files to install and certain meta information used during the installation
by rpm to configure the software package or stored in the RPM database for documen-
tation purposes. RPM archives normally have the extension .rpm.
• If a configuration file was not changed by the system administrator, rpm installs
the new version of the appropriate file. No action by the system administrator is
required.
• .rpmnew files appear if the configuration file already exists and if the noreplace
label was specified in the .spec file.
Following an update, .rpmsave and .rpmnew files should be removed after compar-
ing them, so they do not obstruct future updates. The .rpmorig extension is assigned
if the file has not previously been recognized by the RPM database.
Otherwise, .rpmsave is used. In other words, .rpmorig results from updating from
a foreign format to RPM. .rpmsave results from updating from an older RPM to a
newer RPM. .rpmnew does not disclose any information as to whether the system
administrator has made any changes to the configuration file. A list of these files is
available in /var/adm/rpmconfigcheck. Some configuration files (like /etc/
httpd/httpd.conf) are not overwritten to allow continued operation.
The -U switch is not just an equivalent to uninstalling with the -e option and installing
with the -i option. Use -U whenever possible.
To remove a package, enter rpm -e package. rpm only deletes the package if there
are no unresolved dependencies. It is theoretically impossible to delete Tcl/Tk, for ex-
ample, as long as another application requires it. Even in this case, RPM calls for assis-
tance from the database. If such a deletion is—for whatever reason and under unusual
circumstances—impossible, even if no additional dependencies exist, it may be helpful
to rebuild the RPM database using the option --rebuilddb.
Then check if the patch RPM is suitable for this version of pine:
rpm -qp --basedon pine-4.44-224.i586.patch.rpm
pine = 4.44-188
pine = 4.44-195
pine = 4.44-207
This patch is suitable for three different versions of pine. The installed version in
the example is also listed, so the patch can be installed.
If, at a later date, you want to know which package version was originally installed,
this information is also available in the RPM database. For pine, this information
can be displayed with the following command:
rpm -q --basedon pine
pine = 4.44-188
More information, including information about the patch feature of RPM, is available
in the man pages of rpm and rpmbuild.
Finally, remove the temporary working files old.cpio, new.cpio, and delta.
Using applydeltarpm, you can reconstruct the new RPM from the file system if
the old package is already installed:
To derive it from the old RPM without accessing the file system, use the -r option:
applydeltarpm -r old.rpm new.delta.rpm new.rpm
-i Package information
-l File list
-f FILE Query the package that contains the file FILE (the full
path must be specified with FILE)
--dump File list with complete details (to be used with -l, -c, or
-d)
--provides List features of the package that another package can re-
quest with --requires
The option -f only works if you specify the complete filename with its full path. Provide
as many filenames as desired. For example, the following command
rpm -q -f /bin/rpm /usr/bin/wget
results in:
rpm-4.1.1-191
wget-1.9.1-50
If only part of the filename is known, use a shell script as shown in Example 16.2,
“Script to Search for Packages” (page 319). Pass the partial filename to the script shown
as a parameter when running it.
With the help of the installed RPM database, verification checks can be made. Initiate
these with -V, -y, or --verify. With this option, rpm shows all files in a package
that have been changed since installation. rpm uses eight character symbols to give
some hints about the following changes:
S File size
L Symbolic link
T Modification time
U Owner
G Group
In the case of configuration files, the letter c is printed. For example, for changes to
/etc/wgetrc (wget):
rpm -V wget
S.5....T c /etc/wgetrc
The files of the RPM database are placed in /var/lib/rpm. If the partition /usr
has a size of 1 GB, this database can occupy nearly 30 MB, especially after a complete
update. If the database is much larger than expected, it is useful to rebuild the database
with the option --rebuilddb. Before doing this, make a backup of the old database.
The cron script cron.daily makes daily copies of the database (packed with gzip)
and stores them in /var/adm/backup/rpmdb. The number of copies is controlled
TIP
Source packages can be copied from the installation medium to the hard disk
and unpacked with YaST. They are not, however, marked as installed ([i]) in
the package manager. This is because the source packages are not entered in
the RPM database. Only installed operating system software is listed in the RPM
database. When you “install” a source package, only the source code is added
to the system.
The following directories must be available for rpm and rpmbuild in /usr/src/
packages (unless you specified custom settings in a file like /etc/rpmrc):
SOURCES
for the original sources (.tar.bz2 or .tar.gz files, etc.) and for distribution-
specific adjustments (mostly .diff or .patch files)
SPECS
for the .spec files, similar to a meta Makefile, which control the build process
BUILD
all the sources are unpacked, patched, and compiled in this directory
RPMS
where the completed binary packages are stored
SRPMS
here are the source RPMs
WARNING
The following example uses the wget.src.rpm package. After installing the package
with YaST, you should have files similar to the following listing:
/usr/src/packages/SOURCES/nops_doc.diff
/usr/src/packages/SOURCES/toplev_destdir.diff
/usr/src/packages/SOURCES/wget-1.9.1+ipvmisc.patch
/usr/src/packages/SOURCES/wget-1.9.1-brokentime.patch
/usr/src/packages/SOURCES/wget-1.9.1-passive_ftp.diff
/usr/src/packages/SOURCES/wget-LFS-20040909.tar.bz2
/usr/src/packages/SOURCES/wget-wrong_charset.patch
/usr/src/packages/SPECS/wget.spec
-bp
Prepare sources in /usr/src/packages/BUILD: unpack and patch.
-bc
Do the same as -bp, but with additional compilation.
-bi
Do the same as -bp, but with additional installation of the built software. Caution:
if the package does not support the BuildRoot feature, you might overwrite confi-
guration files.
-bb
Do the same as -bi, but with the additional creation of the binary package. If the
compile was successful, the binary should be in /usr/src/packages/RPMS.
--short-circuit
Skip some steps.
The binary RPM created can now be installed with rpm -i or, preferably, with rpm
-U. Installation with rpm makes it appear in the RPM database.
The build script offers a number of additional options. For example, cause the script
to prefer your own RPMs, omit the initialization of the build environment, or limit the
rpm command to one of the above-mentioned stages. Access additional information
with build --help and by reading the build man page.
KDE offers the kpackage tool as a front-end for rpm. A full-featured package manager
is available as a YaST module (see Section 8.3.1, “Installing and Removing Software”
(page 132)).
For each of the commands introduced, examples of the relevant outputs are presented.
In these examples, the first line is the command itself (after the > or # sign prompt).
Omissions are indicated with square brackets ([...]) and long lines are wrapped
where necessary. Line breaks for long lines are indicated by a backslash (\).
# command -x -y
output line 1
output line 2
output line 3 is annoyingly long, so long that \
we have to break it
output line 3
[...]
output line 98
output line 99
The descriptions have been kept short to allow as many utilities as possible to be men-
tioned. Further information for all the commands can be found in the man pages. Most
of the commands also understand the parameter --help, which produces a brief list
of the possible parameters.
For example, to trace all attempts to open a particular file, use the following:
tux@mercury:~> strace -e open ls .bashrc
open("/etc/ld.so.cache", O_RDONLY) = 3
open("/lib/librt.so.1", O_RDONLY) = 3
open("/lib/libacl.so.1", O_RDONLY) = 3
open("/lib/libc.so.6", O_RDONLY) = 3
open("/lib/libpthread.so.0", O_RDONLY) = 3
open("/lib/libattr.so.1", O_RDONLY) = 3
[...]
To trace all the child processes, use the parameter -f. The behavior and output format
of strace can be largely controlled. For information, see man strace.
The parameter -f list specifies a file with a list of filenames to examine. The -z
allows file to look inside compressed files:
tux@mercury:~> file /usr/share/man/man1/file.1.gz
usr/share/man/man1/file.1.gz: gzip compressed data, from Unix, max compression
tux@mercury:~> file -z /usr/share/man/man1/file.1.gz
/usr/share/man/man1/file.1.gz: ASCII troff or preprocessor input text \
(gzip compressed data, from Unix, max compression)
Display the total size of all the files in a given directory and its subdirectories with the
command du. The parameter -s suppresses the output of detailed information. -h
again transforms the data into a human-readable form:
tux@mercury:~> du -sh /local
1.7M /local
The parameter --filesystem produces details of the properties of the file system
in which the specified file is located:
tux@mercury:~> stat /etc/profile --filesystem
File: "/etc/profile"
ID: 0 Namelen: 255 Type: reiserfs
Block size: 4096 Fundamental block size: 4096
Blocks: Total: 2622526 Free: 1809771 Available: 1809771
Inodes: Total: 0 Free: 0
Information about device name resolution is obtained from the file /usr/share/
pci.ids. PCI IDs not listed in this file are marked “Unknown device.”
The parameter -vv produces all the information that could be queried by the program.
To view the pure numeric values, use the parameter -n.
The option -d puts out a defects list with two tables of bad blocks of a hard disk: first
the one supplied by the vendor (manufacturer table) and second the list of bad blocks
that appeared in operation (grown table). If the number of entries in the grown table
increases, it might be a good idea to replace the hard disk.
When displaying network connections or statistics, you can specify the socket type to
display: TCP (-t), UDP (-u), or raw (-r). The -p option shows the PID and name
of the program to which each socket belongs.
The following example lists all TCP connections and the programs using these connec-
tions.
mercury:~ # netstat -t -p
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Pro
Query the allocation and use of interrupts with the following command:
tux@mercury:~> cat /proc/interrupts
CPU0
0: 3577519 XT-PIC timer
1: 130 XT-PIC i8042
2: 0 XT-PIC cascade
5: 564535 XT-PIC Intel 82801DB-ICH4
7: 1 XT-PIC parport0
8: 2 XT-PIC rtc
9: 1 XT-PIC acpi, uhci_hcd:usb1, ehci_hcd:usb4
10: 0 XT-PIC uhci_hcd:usb3
11: 71772 XT-PIC uhci_hcd:usb2, eth0
12: 101150 XT-PIC i8042
14: 33146 XT-PIC ide0
15: 149202 XT-PIC ide1
NMI: 0
LOC: 0
ERR: 0
MIS: 0
/proc/devices
Available devices
/proc/modules
Kernel modules loaded
/proc/cmdline
Kernel command line
/proc/meminfo
Detailed information about memory usage
/proc/config.gz
gzip-compressed configuration file of the kernel currently running
17.5.1 procinfo
Important information from the /proc file system is summarized by the command
procinfo:
tux@mercury:~> procinfo
Linux 2.6.18.8-0.5-default (geeko@buildhost) (gcc 4.1.2 20061115) #1 2CPU
Bootup: Tue Jul 10 10:29:15 2007 Load average: 0.86 1.10 1.11 3/118 21547
To see all the information, use the parameter -a. The parameter -nN produces updates
of the information every N seconds. In this case, terminate the program by pressing Q.
By default, the cumulative values are displayed. The parameter -d produces the differ-
ential values. procinfo -dn5 displays the values that have changed in the last five
seconds:
17.6 Processes
17.6.1 Interprocess Communication: ipcs
The command ipcs produces a list of the IPC resources currently in use:
------ Shared Memory Segments --------
key shmid owner perms bytes nattch status
0x00000000 58261504 tux 600 393216 2 dest
0x00000000 58294273 tux 600 196608 2 dest
0x00000000 83886083 tux 666 43264 2
0x00000000 83951622 tux 666 192000 2
0x00000000 83984391 tux 666 282464 2
0x00000000 84738056 root 644 151552 2 dest
To check how many sshd processes are running, use the option -p together with the
command pidof, which lists the process IDs of the given processes.
tux@mercury:~> ps -p `pidof sshd`
PID TTY STAT TIME COMMAND
3524 ? Ss 0:00 /usr/sbin/sshd -o PidFile=/var/run/sshd.init.pid
4813 ? Ss 0:00 sshd: tux [priv]
4817 ? R 0:00 sshd: tux@pts/0
The process list can be formatted according to your needs. The option -L returns a list
of all keywords. Enter the following command to issue a list of all processes sorted by
memory usage:
tux@mercury:~> ps ax --format pid,rss,cmd --sort rss
PID RSS CMD
2 0 [ksoftirqd/0]
3 0 [events/0]
4 0 [khelper]
5 0 [kthread]
11 0 [kblockd/0]
12 0 [kacpid]
472 0 [pdflush]
473 0 [pdflush]
[...]
4028 17556 nautilus --no-default-window --sm-client-id default2
4118 17800 ksnapshot
4114 19172 sound-juicer
4023 25144 gnome-panel --sm-client-id default1
4047 31400 mono-best --debug /usr/lib/beagle/Best.exe --autostarted
3973 31520 mono-beagled --debug /usr/lib/beagle/BeagleDaemon.exe --bg --aut
The parameter -p adds the process ID to a given name. To have the command lines
displayed as well, use the -a parameter:
If you press F while top is running, a menu opens with which to make extensive changes
to the format of the output.
The parameter -U UID monitors only the processes associated with a particular user.
Replace UID with the user ID of the user. top -U `id -u` returns the UID of the
user on the basis of the username and displays his processes.
sar can generate extensive reports on almost all important system activities, among
them CPU, memory, IRQ usage, IO, or networking. With its many options, it is too
complex to explain further here. Refer to the man page for extensive documentation
with examples.
The options -b,-k,-m,-g show output in bytes, KB, MB, or GB, respectively. The
parameter -d delay ensures that the display is refreshed every delay seconds. For
example, free -d 1.5 produces an update every 1.5 seconds.
The special shell variable $$, whose value is the process ID of the shell, has been used.
The command lsof lists all the files currently open when used without any parameters.
Because there are often thousands of open files, listing all of them is rarely useful.
However, the list of all files can be combined with search functions to generate useful
lists. For example, list all used character devices:
tux@mercury:~> lsof | grep CHR
bash 3838 tux 0u CHR 136,0 2 /dev/pts/0
bash 3838 tux 1u CHR 136,0 2 /dev/pts/0
bash 3838 tux 2u CHR 136,0 2 /dev/pts/0
bash 3838 tux 255u CHR 136,0 2 /dev/pts/0
bash 5552 tux 0u CHR 136,5 7 /dev/pts/5
bash 5552 tux 1u CHR 136,5 7 /dev/pts/5
bash 5552 tux 2u CHR 136,5 7 /dev/pts/5
bash 5552 tux 255u CHR 136,5 7 /dev/pts/5
X 5646 root mem CHR 1,1 1006 /dev/mem
lsof 5673 tux 0u CHR 136,5 7 /dev/pts/5
lsof 5673 tux 2u CHR 136,5 7 /dev/pts/5
grep 5674 tux 1u CHR 136,5 7 /dev/pts/5
grep 5674 tux 2u CHR 136,5 7 /dev/pts/5
res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
3e00000 385 36 1 751 107 18161K 13K 18175K ? NOVELL: SU
4600000 391 122 1 1182 889 4566K 33K 4600K ? amaroK - S
1600000 35 11 0 76 142 3811K 4K 3816K ? KDE Deskto
3400000 52 31 1 69 74 2816K 4K 2820K ? Linux Shel
2c00000 50 25 1 43 50 2374K 3K 2378K ? Linux Shel
2e00000 50 10 1 36 42 2341K 3K 2344K ? Linux Shel
2600000 37 24 1 34 50 1772K 3K 1775K ? Root - Kon
4800000 37 24 1 34 49 1772K 3K 1775K ? Root - Kon
2a00000 209 33 1 323 238 1111K 12K 1123K ? Trekstor25
1800000 182 32 1 302 285 1039K 12K 1052K ? kicker
1400000 157 121 1 231 477 777K 18K 796K ? kwin
3c00000 175 36 1 248 168 510K 9K 520K ? de.comp.la
3a00000 326 42 1 579 444 486K 20K 506K ? [opensuse-
0a00000 85 38 1 317 224 102K 9K 111K ? Kopete
4e00000 25 17 1 60 66 63K 3K 66K ? YaST Contr
2400000 11 10 0 56 51 53K 1K 55K 22061 suseplugge
0e00000 20 12 1 50 92 50K 3K 54K 22016 kded
If any users of other systems have logged in remotely, the parameter -f shows the
computers from which they have established the connection.
real 0m4.051s
user 0m0.042s
sys 0m0.205s
There are several shells for UNIX or Linux. The default shell in SUSE® Linux Enterprise
is Bash (GNU Bourne-Again Shell).
This chapter deals with a couple of basics you need to know for using the shell. This
includes the following topics: how to enter commands, the directory structure of Linux,
how to work with files and directories and how to use some basic functions, the user
and permission concept of Linux, an overview of important shell commands, and a
short introduction to the vi editor, which is a default editor always available in Unix
and Linux systems.
The Konsole or the GNOME Terminal window appears, showing the prompt on the
first line like in Figure 18.1, “Example of a Bash Terminal Window” (page 348). The
prompt usually shows your login name (in this example, tux), the hostname of your
computer (here, knox), and the current path (in this case, your home directory, indicated
by the tilde symbol, ~). When you are logged in on a remote computer this information
always shows you which system you are currently working on. When the cursor is after
this prompt, you can send commands directly to your computer system.
The shell is not verbose: in contrast to some graphical user interfaces, it usually
does not provide confirmation messages when commands have been executed.
Messages only appear in case of problems or errors.
Also keep this in mind for commands to delete objects. Before entering a
command like rm for removing a file, you should know if you really want to
get rid of the object: it will be deleted irretrievably, without enquiry.
Unlike in other operating systems, files in Linux may have a file extension, such as
.txt, but do not need to have one. This makes it difficult to differentiate between files
and folders in this output of the ls. By default, the colors can give you a hint: directories
are usually shown in blue, files in black.
On the left of each object name, information about the object is shown in several
columns. The most important are the following: The first column shows the file type
of the object (in this example, d for directory or - for normal files). The next nine
columns show the user permissions for the object. Columns 11 and 12 show the name
of the file owner and the group (in this case, tux and users). Find information about
user permissions and the user concept of Linux in Section 18.2, “Users and Access
Permissions” (page 359). The next column shows the file size in bytes. Then date and
time of the last change are displayed. The last column shows the object name.
If you want to see even more, you can combine two options for the ls command and
enter ls -la. The shell now also shows hidden files in the directory, indicated by a
dot in front (for example, .hiddenfile).
Getting Help
Nobody is expected to know all options of all commands by heart. If you remember
the command name but are not sure about the options, you can enter the command
followed by a blank and --help. This --help option exists for many commands.
Entering ls --help displays all the options for the ls command.
Figure 18.4 shows the standard directory tree in Linux, with the home directories of
the example users yxz, linux, and tux. The /home directory contains the directories
in which the individual users can store their personal files.
If you are working in a network environment, your home directory may not be
called /home. It can be mapped to any directory in the file system.
The following list provides a brief description of the standard directories in Linux.
bin boot dev etc home lib media mnt opt proc root sbin srv sys tmp usr var
ld.so
hda sda st0
yxz linux tux X11R6 bin etc lib local sbin share
/bin, /sbin Programs needed early in the boot process (/bin) and
for the administrator (/sbin)
/tmp, /var/tmp Temporary files (do not save files in this directory unless
you do not need them)
/sys System file system where all device information for the
kernel is gathered
• The entire (absolute) path from the root directory to the respective file
Absolute paths always start with a slash. Relative paths do not have a slash at the begin-
ning.
Linux distinguishes between uppercase and lowercase in the file system. For
example, entering test.txt or Test.txt makes a difference in Linux. Keep
this in mind when entering filenames or paths.
• Refer to the current directory with a dot (.). This is mainly useful for other com-
mands (cp, mv, …).
• The next higher level in the tree is represented by two dots (..). For example, to
switch to the parent directory of your current directory, enter cd ...
1c To check what happened, now enter ls -l /tmp. The new directory test
should appear in the list of contents of the /tmp directory.
2 Now create a new file in your home directory and copy it to the /tmp/test
directory by using a relative path.
2b Check this by entering ls -l. The new file should appear in the list of
contents.
To list the contents of home directories of other users, enter ls ~username . In the
example directory tree in Figure 18.4, “Excerpt from a Standard Directory Tree”
(page 351), one of the sample users is tux. In this case, ls ~tux would list the contents
of the home directory of tux.
If a filename contains a space, either escape the space using a back slash (\)
in front of the blank or enclose the filename in single or double quotes. Other-
wise Bash interprets a filename like My Documents as the names of two files
or directories. The difference between single and double quotes is that variable
expansion takes place within double quotes. Single quotes ensure that the shell
sees the quoted string literally.
You can edit the selected command, for example, changing the name of a file, before
you execute the command by pressing Enter. To edit the command line, just move the
cursor to the desired position using the arrow keys and start typing.
Completing a filename or directory name to its full length after typing its first letters
is another helpful feature of Bash. To do so, type the first letters then press →|. If the
filename or path can be uniquely identified, it is completed at once and the cursor moves
to the end of the filename. You can then enter the next option of the command, if nec-
essary. If the filename or path cannot be uniquely identified (because there are several
filenames starting with the same letters), the filename or path is only completed up to
the point where again several options are possible. You can then obtain a list of them
by pressing →| a second time. After this, you can enter the next letters of the file or
path then try completion again by pressing →|. When completing filenames and paths
with the help of →|, you can simultaneously check whether the file or path you want
to enter really exists (and you can be sure of getting the spelling right).
Wild Cards
Another convenience offered by the shell is wild cards for pathname expansion. Wild
cards are characters that can stand for other characters. There are three different types
of these in Bash:
?
Matches exactly one arbitrary character
*
Matches any number of characters
Using ! or ^ at the beginning of the group ([!set]) matches one character other
than those identified by set.
Assuming that your test directory contains the files Testfile, Testfile1,
Testfile2, and datafile.
• Use the set wild card to address all sample files whose last character is a number:
ls Testfile[1-9] or, using classes, ls Testfile[[:digit:]].
Of the four types of wild cards, the most inclusive one is the asterisk. It could be used
to copy all files contained in one directory to another one or to delete all files with one
command. The command rm *fil*, for instance, would delete all files in the current
directory whose name includes the string fil.
Instead of less, you can also use the older program more. However, it is less convenient
because it does not allow you to scroll backwards.
Sometimes it is also useful to use a file as the input for a command. For example, with
the tr command, you can replace characters redirected from a file and write the result
to the standard output, your screen. Suppose you want to replace all characters t of
your file.txt from the example above with x and print this to your screen. Do so
by entering tr t x < file.txt.
Just like the standard output, the standard error output is sent to the console. To redirect
the standard error output to a file named errors, append 2> errors to the corre-
sponding command. Both standard output and standard error are saved to one file named
alloutput if you append >& alloutput.
Using pipelines or pipes is also a sort redirection, although the use of the pipe is not
constrained to files. With a pipe (|), you can combine several commands, using the
output of one command as input for the next command. For example, to view the contents
or your current directory in less, enter ls | less. This only makes sense if the
normal output with ls would be too lengthy. For instance, if you view the contents of
the dev directory with ls /dev, you only see a small portion in the window. View
the entire list with ls /dev | less.
-c
(for create) Create a new archive.
-t
(for table) Display the contents of an archive.
-x
(for extract) Unpack the archive.
-v
(for verbose) Show all files on screen while creating the archive.
-f
(for file) Choose a filename for the archive file. When creating an archive, this
option must always be given as the last one.
To pack the test directory with all its files and subdirectories into an archive named
testarchive.tar, do the following:
1 Open a shell.
4 View the contents of the archive file with tar -tf testarchive.tar.
The test directory with all its files and directories has remained unchanged on your
hard disk. To unpack the archive, enter tar -xvf testarchive.tar, but do not
try this yet.
Now, unpack this file in the test2 directory created earlier. To do so, enter cp
testarchive.tar.gz test2 to copy the file to that directory. Change to the
directory with cd test2. A compressed archive with the .tar.gz extension can
be unzipped with the gunzip command. Enter gunzip testarchive.tar.gz,
which results in the file testarchive.tar, which then needs to be extracted or
untarred with tar -xvf testarchive.tar. You can also unzip and extract a
compressed archive in one step with tar -xvf testarchive.tar.gz (adding
the -z option is no longer required). With ls, you can see that a new test directory
has been created with the same contents as your test directory in your home directory.
18.1.6 Cleaning Up
After this crash course, you should be familiar with the basics of the Linux shell or
command line. You may want to clean up your home directory by deleting the various
test files and directories using the rm and rmdir commands. In Section 18.3, “Important
Linux Commands” (page 363), find a list of the most important commands and a brief
description of their functions.
A group, in this case, can be defined as a set of connected users with certain collective
rights. For example, call a group working on a certain project project3. Every user
in a Linux system is a member of at least one proprietary group, normally users.
There can be as many groups in a system as needed, but only root is able to add
groups. Every user can find out, with the command groups, of which groups he is a
member.
File Access
The organization of permissions in the file system differs for files and directories.
File permission information can be displayed with the command ls -l. The
output could appear as in Example 18.1, “Sample Output Showing File Permissions”
(page 360).
As shown in the third column, this file belongs to user tux. It is assigned to the
group project3. To discover the user permissions of the Roadmap file, the first
column must be examined more closely.
This column consists of one leading character followed by nine characters grouped
in threes. The first of the ten letters stands for the type of file system component.
The hyphen (–) shows that this is a file. A directory (d), a link (l), a block device
(b), or a character device could also be indicated.
In this example, tux has, as owner of the file Roadmap, read (r) and write access
(w) to it, but cannot execute it (x). The members of the group project3 can read
the file, but they cannot modify it or execute it. Other users do not have any access
to this file. Other permissions can be assigned by means of ACLs (access control
lists).
Directory Permissions
Access permissions for directories have the type d. For directories, the individual
permissions have a slightly different meaning.
In Example 18.2, “Sample Output Showing Directory Permissions” (page 361), the
owner (tux) and the owning group (project3) of the directory ProjectData
are easy to recognize. In contrast to the file access permissions from File Access
(page 360), the set reading permission (r) means that the contents of the directory
can be shown. The write permission (w) means that new files can be created. The
executable permission (x) means that the user can change to this directory. In the
above example, the user tux as well as the members of the group project3 can
change to the ProjectData directory (x), view the contents (r), and add or
delete files (w). The rest of the users, on the other hand, are given less access. They
may enter the directory (x) and browse through it (r), but not insert any new files
(w).
3. The abbreviations
• r—read
• w—write
• x—execute
If, for example, the user tux in Example 18.2, “Sample Output Showing Directory
Permissions” (page 361) also wants to grant other users write (w) access to the di-
rectory ProjectData, he can do this using the command chmod o+w
ProjectData.
If, however, he wants to deny all users other than himself write permissions, he
can do this by entering the command chmod go-w ProjectData. To prohibit
all users from adding a new file to the folder ProjectData, enter chmod -w
ProjectData. Now, not even the owner can create a new file in the directory
without first reestablishing write permissions.
Suppose the file Roadmap from Example 18.2, “Sample Output Showing Directory
Permissions” (page 361) should no longer belong to tux, but to the user geeko.
root should then enter chown geeko Roadmap.
In the man pages, move up and down with PgUp and PgDn. Move between the beginning
and the end of a document with Home and End. End this viewing mode by pressing Q.
Learn more about the man command itself with man man.
In the following overview, the individual command elements are written in different
typefaces. The actual command and its mandatory options are always printed as
command option. Specifications or parameters that are not required are placed in
[square brackets].
Adjust the settings to your needs. It makes no sense to write ls file if no file named
file actually exists. You can usually combine several parameters, for example, by
writing ls -la instead of ls -l -a.
File Administration
ls [options] [files]
If you run ls without any additional parameters, the program lists the contents of
the current directory in short form.
-a
Displays hidden files
-i
Waits for confirmation, if necessary, before an existing target is overwritten
-r
Copies recursively (includes subdirectories)
-b
Creates a backup copy of the source before moving
-i
Waits for confirmation, if necessary, before an existing targetfile is
overwritten
rm [options] files
Removes the specified files from the file system. Directories are not removed by
rm unless the option -r is used.
-r
Deletes any existing subdirectories
-i
Waits for confirmation before deleting each file
cd [options] [directory]
Changes the current directory. cd without any parameters changes to the user's
home directory.
-R
Changes files and directories in all subdirectories
The mode parameter has three parts: group, access, and access type.
group accepts the following characters:
u
User
g
Group
o
Others
r
Read
w
Write
x
Execute—executing files or changing to the directory
s
Setuid bit—the application or program is started as if it were started by the
owner of the file
As an alternative, a numeric code can be used. The four digits of this code are
composed of the sum of the values 4, 2, and 1—the decimal result of a binary mask.
The first digit sets the set user ID (SUID) (4), the set group ID (2), and the sticky
(1) bits. The second digit defines the permissions of the owner of the file. The third
digit defines the permissions of the group members and the last digit sets the per-
missions for all other users. The read permission is set with 4, the write permission
with 2, and the permission for executing a file is set with 1. The owner of a file
would usually receive a 6 or a 7 for executable files.
-d
Decompresses the packed gzip files so they return to their original size and
can be processed normally (like the command gunzip)
-f
Writes the output to a file and not to the screen as is usually the case
-r
Adds files to an existing archive
-t
Outputs the contents of an archive
-u
Adds files, but only if they are newer than the files already contained in the
archive
-x
Unpacks files from an archive (extraction)
-z
Packs the resulting archive with gzip
-j
Compresses the resulting archive with bzip2
-v
Lists files processed
The archive files created by tar end with .tar. If the tar archive was also com-
pressed using gzip, the ending is .tgz or .tar.gz. If it was compressed using
bzip2, the ending is .tar.bz2.
locate patterns
This command is only available if you have installed the findutils-locate
package. The locate command can find in which directory a specified file is lo-
cated. If desired, use wild cards to specify filenames. The program is very speedy,
because it uses a database specifically created for the purpose (rather than searching
through the entire file system). This very fact, however, also results in a major
drawback: locate is unable to find any files created after the latest update of its
database. The database can be generated by root with updatedb.
updatedb [options]
This command performs an update of the database used by locate. To include
files in all existing directories, run the program as root. It also makes sense to
find [options]
With find, search for a file in a given directory. The first argument specifies the
directory in which to start the search. The option -name must be followed by a
search string, which may also include wild cards. Unlike locate, which uses a
database, find scans the actual directory.
-z
Tries to look inside compressed files
-n
Numbers the output on the left margin
-i
Ignores case
-n
Additionally displays the numbers of the lines in which it found a hit
-l
Only lists the files in which searchstring does not occur
-q
Only reports whether the two files differ
-u
Produces a “unified” diff, which makes the output more readable
File Systems
mount [options] [device] mountpoint
This command can be used to mount any data media, such as hard disks, CD-ROM
drives, and other drives, to a directory of the Linux file system.
-r
Mount read-only
-t filesystem
Specify the file system, commonly ext2 for Linux hard disks, msdos for
MS-DOS media, vfat for the Windows file system, and iso9660 for CDs
For hard disks not defined in the file /etc/fstab, the device type must also be
specified. In this case, only root can mount it. If the file system should also be
mounted by other users, enter the option user in the appropriate line in the /etc/
fstab file (separated by commas) and save this change. Further information is
available in the mount(1) man page.
System Information
df [options] [directory]
The df (disk free) command, when used without any options, displays information
about the total disk space, the disk space currently in use, and the free space on all
the mounted drives. If a directory is specified, the information is limited to the
drive on which that directory is located.
-h
Shows the number of occupied blocks in gigabytes, megabytes, or kilobytes—in
human-readable format
-T
Type of file system (ext2, nfs, etc.)
du [options] [path]
This command, when executed without any parameters, shows the total disk space
occupied by files and subdirectories in the current directory.
-a
Displays the size of each individual file
-h
Output in human-readable form
-s
Displays only the calculated total size
-b
Output in bytes
-k
Output in kilobytes
-m
Output in megabytes
date [options]
This simple program displays the current system time. If run as root, it can also
be used to change the system time. Details about the program are available in the
date(1) man page.
Processes
top [options]
top provides a quick overview of the currently running processes. Press H to access
a page that briefly explains the main options for customizing the program.
aux
Displays a detailed list of all processes, independent of the owner
Network
ping [options] hostname or IP address
The ping command is the standard tool for testing the basic functionality of TCP/IP
networks. It sends a small data packet to the destination host, requesting an imme-
diate reply. If this works, ping displays a message to that effect, which indicates
that the network link is basically functioning.
-c number
Determines the total number of packages to send and ends after they have been
dispatched (by default, there is no limitation set)
-f
flood ping: sends as many data packages as possible; a popular means, reserved
for root, to test networks
-i value
Specifies the interval between two data packages in seconds (default: one
second)
nslookup
The domain name system resolves domain names to IP addresses. With this tool,
send queries to name servers (DNS servers).
Do not use telnet over a network on which third parties can “eavesdrop.”
Particularly on the Internet, use encrypted transfer methods, such as ssh,
to avoid the risk of malicious misuse of a password (see the man page for
ssh).
Miscellaneous
passwd [options] [username]
Users may change their own passwords at any time using this command. The ad-
ministrator root can use the command to change the password of any user on the
system.
su [options] [username]
The su command makes it possible to log in under a different username from a
running session. Specify a username and the corresponding password. The password
is not required from root, because root is authorized to assume the identity of
any user. When using the command without specifying a username, you are
prompted for the root password and change to the superuser (root).
-
Use su - to start a login shell for the different user
halt [options]
To avoid loss of data, you should always use this program to shut down your system.
reboot [options]
Does the same as halt except the system performs an immediate reboot.
clear
This command cleans up the visible area of the console. It has no options.
In the following, find several commands that you can enter in vi by just pressing
keys. These appear in uppercase as on a keyboard. If you need to enter a key
in uppercase, this is stated explicitly by showing a key combination including
the Shift key.
Basically, vi makes use of three operating modes: insert mode, command mode, and
extended mode. The keys have different functions depending on the mode. On start-up,
vi is normally set to the command mode. The first thing to learn is how to switch between
the modes:
vi, like other editors, has its own procedure for terminating the program. You cannot
terminate vi while in insert mode. First, exit insert mode by pressing Esc. Subsequently,
you have two options:
1. Exit without saving: To terminate the editor without saving the changes, enter : –
Q – ! in command mode. The exclamation mark (!) causes vi to ignore any changes.
2. Save and exit: There are several possibilities to save your changes and terminate
the editor. In command mode, use Shift + Z Shift + Z. To exit the program saving
all changes using the extended mode, enter : – W – Q. In extended mode, w stands
for write and q for quit.
18.4.2 vi in Action
vi can be used as a normal editor. In insert mode, enter text and delete text with the <—
and Del keys. Use the arrow keys to move the cursor.
However, these control keys often cause problems, because there are many terminal
types that use special key codes. This is where the command mode comes into play.
Press Esc to switch from insert mode to command mode. In command mode, move the
cursor with H, J, K, and L. The keys have the following functions:
H
Move one character to the left
J
Move one line down
K
Move one line up
L
Move one character to the right
Shift + A Change to insert mode (characters are added at the end of the
line)
Shift + O Change to insert mode (a new line is inserted before the cur-
rent one)
C–W Change to insert mode (the rest of the current word is over-
written by the next entries you make)
• In vim, enter the command :help to get help for many subjects.
• The Web pages of the vim project at http://www.vim.org feature all kinds
of news, mailing lists, and other documentation.
vim is “charityware,” which means that the authors do not charge any money
for the software but encourage you to support a nonprofit project with a
monetary contribution. This project solicits help for poor children in Uganda.
More information is available online at http://iccf-holland.org/index
.html, http://www.vim.org/iccf/, and http://www.iccf.nl/.
SUSE Linux Enterprise for the 64-bit platforms ia64, ppc64, s390x, and x86_64 is de-
signed so that existing 32-bit applications run in the 64-bit environment “out-of-the-
box.” The corresponding 32-bit platforms are x86 for ia64, ppc for ppc64, s390 for
s390x, and x86 for x86_64. This support means that you can continue to use your pre-
ferred 32-bit applications without waiting for a corresponding 64-bit port to become
available. The current ppc64 system runs most applications in 32-bit mode, but you
can run 64-bit applications.
The same approach is used for the 64-bit platforms ppc64, s390x, and x86_64: To retain
compatibility with the 32-bit version, the libraries are stored at the same place in the
system as in the 32-bit environment. The 32-bit version of libc.so.6 is located under
/lib/libc.so.6 in both the 32-bit and 64-bit environments.
All 64-bit libraries and object files are located in directories called lib64. The 64-bit
object files you would normally expect to find under /lib, /usr/lib, and /usr/
X11R6/lib are now found under /lib64, /usr/lib64, and /usr/X11R6/
lib64. This means that there is space for the 32-bit libraries under /lib, /usr/lib
and /usr/X11R6/lib, so the filename for both versions can remain unchanged.
Subdirectories of 32-bit /lib directories whose data content does not depend on the
word size are not moved. For example, the X11 fonts are still found in the usual location
under /usr/X11R6/lib/X11/fonts. This scheme conforms to LSB (Linux
Standards Base) and FHS (File System Hierarchy Standard).
►ipf: The 64-bit libraries for ia64 are located in the standard lib directories. In such
cases, there is neither a lib64 directory or a lib32 directory. ia64 executes the 32-
bit x86 code under an emulation. A set of basic libraries is installed in /emul/
ia32-linux/lib and /emul/ia32-linux/usr/X11R6/lib. ◄
Biarch Compiler
Both 32-bit and 64-bit objects can be generated with a biarch development tool
chain. The compilation of 64-bit objects is the default on almost all platforms. 32-
bit objects can be generated if special flags are used. This special flag is -m32 for
GCC (-m31 for generating s390 binaries). The flags for the binutils are architecture-
dependent, but GCC transfers the correct flags to linkers and assemblers. A biarch
development tool chain currently exists for amd64 (supports development for x86
and amd64 instructions), for s390x, and for ppc64. 32-bit objects are normally
created on the ppc64 platform. The -m64 flag must be used to generate 64-bit ob-
jects.
No Support
SUSE Linux Enterprise does not support the direct development of 32-bit software
on all platforms. To develop applications for x86 under ia64, use the corresponding
32-bit version of SUSE Linux Enterprise.
All header files must be written in an architecture-independent form. The installed 32-
bit and 64-bit libraries must have an API (application programming interface) that
matches the installed header files. The normal SUSE Linux Enterprise environment is
designed according to this principle. In the case of manually updated libraries, resolve
these issues yourself.
For example, to compile a program that uses libaio on a system whose second archi-
tecture is a 32-bit architecture (x86_64 or s390x), you need the following RPMs:
libaio-32bit
32-bit runtime package
libaio-devel-32bit
Headers and libraries for 32-bit development
libaio
64-bit runtime package
libaio-devel
64-bit development headers and libraries
The following example refers to an x86_64 system with x86 as the second architecture.
Examples for s390x with s390 as the second architecture or ppc64 with ppc as the second
architecture would be similar. This example does not apply to ia64 where you do not
build 32-bit packages.
When using s390 as second architecture, you have to use -m31 instead of
-m32, because this is a 31 bit system.
2 Instruct the linker to process 32-bit objects (always use gcc as the linker front-
end):
LD="gcc -m32"
4 Determine that the libraries for libtool and so on come from /usr/lib:
LDFLAGS="-L/usr/lib"
Not all of these variables are needed for every program. Adapt them to the respective
program.
CC="gcc -m32" \
LDFLAGS="-L/usr/lib;" \
.configure \
--prefix=/usr \
--libdir=/usr/lib
make
make install
The 32-bit emulation of system calls for a 64-bit kernel does not support all the APIs
used by system programs. This depends on the platform. For this reason, a small number
of applications, like lspci, must be compiled on non-ppc64 platforms as 64-bit pro-
grams to function properly. On IBM System z, not all ioctls are available in the 32-bit
kernel ABI.
A 64-bit kernel can only load 64-bit kernel modules that have been specially compiled
for this kernel. It is not possible to use 32-bit kernel modules.
TIP
1. BIOS After the computer has been turned on, the BIOS initializes the screen
and keyboard and tests the main memory. Up to this stage, the machine does not
access any mass storage media. Subsequently, the information about the current
date, time, and the most important peripherals are loaded from the CMOS values.
When the first hard disk and its geometry are recognized, the system control
passes from the BIOS to the boot loader. If the BIOS supports network booting,
it is also possible to configure a boot server that provides the boot loader. On x86
systems, PXE boot is needed. Other architectures commonly use the BOOTP
protocol to get the boot loader.
2. Boot Loader The first physical 512-byte data sector of the first hard disk is
loaded into the main memory and the boot loader that resides at the beginning of
this sector takes over. The commands executed by the boot loader determine the
3. Kernel and initramfs To pass system control, the boot loader loads both the
kernel and an initial RAM–based file system (initramfs) into memory. The contents
of the initramfs can be used by the kernel directly. initramfs contains a small exe-
cutable called init that handles the mounting of the real root file system. If special
hardware drivers are needed before the mass storage can be accessed, they must
be in initramfs. For more information about initramfs, refer to Section 20.1.1,
“initramfs” (page 388). If the system does not have a local hard disk, initramfs must
provide the root file system to the kernel. This can be done with the help of a net-
work block device like iSCSI or SAN, but it is also possible to use NFS as the root
device.
4. init on initramfs This program performs all actions needed to mount the
proper root file system, like providing kernel functionality for the needed file
system and device drivers for mass storage controllers with udev. After the root
file system has been found, it is checked for errors and mounted. If this has been
successful, the initramfs is cleaned and the init program on the root file system is
executed. For more information about init, refer to Section 20.1.2, “init on
initramfs” (page 389). Find more information about udev in Chapter 24, Dynamic
Kernel Device Management with udev (page 461).
5. init init handles the actual booting of the system through several different levels
providing different functionality. init is described in Section 20.2, “The init Process”
(page 391).
20.1.1 initramfs
initramfs is a small cpio archive that the kernel can load to a RAM disk. It provides a
minimal Linux environment that enables the execution of programs before the actual
root file system is mounted. This minimal Linux environment is loaded into memory
by BIOS routines and does not have specific hardware requirements other than sufficient
Before the root file system can be mounted and the operating system can be started,
the kernel needs the corresponding drivers to access the device on which the root file
system is located. These drivers may include special drivers for certain kinds of hard
drives or even network drivers to access a network file system. The needed modules
for the root file system may be loaded by init on initramfs. After the modules are loaded,
udev provides the initramfs with the needed devices. Later in the boot process, after
changing the root file system, it is necessary to regenerate the devices. This is done by
boot.udev with the command udevtrigger.
If you need to change hardware (e.g. hard disks) in an installed system and this hardware
requires different drivers to be present in the kernel at boot time, you must update the
initramfs file. This is done in the same way as with its predecessor, initrd—by
calling mkinitrd. Calling mkinitrd without any argument creates an initramfs.
Calling mkinitrd -R creates an initrd. In SUSE Linux Enterprise®, the modules to
load are specified by the variable INITRD_MODULES in /etc/sysconfig/
kernel. After installation, this variable is automatically set to the correct value. The
modules are loaded in exactly the order in which they appear in INITRD_MODULES.
This is only important if you rely on the correct setting of the device files /dev/sd?.
However, in current systems you also may use the device files below /dev/disk/
that are sorted in several subdirectories, named by-id, by-path and by-uuid, and
always represent the same disk. This is also possible at install time by specifying the
respective mount option.
The boot loader loads initramfs or initrd in the same way as the kernel. It is
not necessary to reinstall GRUB after updating initramfs or initrd, because GRUB
searches the directory for the right file when booting.
If the file system resides on a networked block device like iSCSI or SAN, connection
to the storage server is also set up by the initramfs.
When init is called during the initial boot as part of the installation process, its tasks
differ from those mentioned earlier:
Starting YaST
Finally, init starts YaST, which starts package installation and system configuration.
init is centrally configured in the /etc/inittab file where the runlevels are defined
(see Section 20.2.1, “Runlevels” (page 391)). The file also specifies which services and
daemons are available in each of the levels. Depending on the entries in /etc/
inittab, several scripts are run by init. For reasons of clarity, these scripts, called
init scripts, all reside in the directory /etc/init.d (see Section 20.2.2, “Init Scripts”
(page 394)).
The entire process of starting the system and shutting it down is maintained by init.
From this point of view, the kernel can be considered a background process whose task
is to maintain all other processes and adjust CPU time and hardware access according
to requests from other programs.
20.2.1 Runlevels
In Linux, runlevels define how the system is started and what services are available in
the running system. After booting, the system starts as defined in /etc/inittab in
Runlevel Description
0 System halt
4 Not used
6 System reboot
You should not use runlevel 2 if your system mounts a partition like /usr via
NFS. The system might behave unexpectedly if program files or libraries are
missing because the NFS service is not available in runlevel 2 (local multiuser
mode without remote network).
To change runlevels while the system is running, enter telinit and the corresponding
number as an argument. Only the system administrator is allowed to do this. The fol-
lowing list summarizes the most important commands in the runlevel area.
telinit 5
The graphical environment is enabled. Usually a display manager like XDM, GDM,
or KDM is started. If autologin is enabled, the local user is logged in to the prese-
lected window manager (GNOME or KDE or any other window manager).
Runlevel 5 is the default runlevel in all SUSE Linux Enterprise standard installations.
Users are prompted for login with a graphical interface or the default user is logged in
automatically. If the default runlevel is 3, the X Window System must be configured
properly, as described in Chapter 26, The X Window System (page 481), before the run-
level can be switched to 5. If this is done, check whether the system works in the desired
way by entering telinit 5. If everything turns out as expected, you can use YaST
to set the default runlevel to 5.
Generally, two things happen when you change runlevels. First, stop scripts of the
current runlevel are launched, closing down some programs essential for the current
runlevel. Then start scripts of the new runlevel are started. Here, in most cases, a number
of programs are started. For example, the following occurs when changing from runlevel
3 to 5:
3. Now rc calls the stop scripts of the current runlevel for which there is no start
script in the new runlevel. In this example, these are all the scripts that reside in
/etc/init.d/rc3.d (old runlevel was 3) and start with a K. The number
following K specifies the order to run the scripts with the stop parameter, because
there are some dependencies to consider.
4. The last things to start are the start scripts of the new runlevel. In this example,
these are in /etc/init.d/rc5.d and begin with an S. Again, the number that
follows the S determines the sequence in which the scripts are started.
When changing into the same runlevel as the current runlevel, init only checks /etc/
inittab for changes and starts the appropriate steps, for example, for starting a
getty on another interface. The same functionality may be achieved with the command
telinit q.
All scripts are located in /etc/init.d. Scripts that are run at boot time are called
through symbolic links from /etc/init.d/boot.d. Scripts for changing the run-
level are called through symbolic links from one of the subdirectories (/etc/init
.d/rc0.d to /etc/init.d/rc6.d). This is just for clarity reasons and avoids
duplicate scripts if they are used in several runlevels. Because every script can be exe-
cuted as both a start and a stop script, these scripts must understand the parameters
Option Description
All of these settings may also be changed with the help of the YaST module. If you
need to check the status on the command line, use the tool chkconfig, described in the
chkconfig(8) man page.
A short introduction to the boot and stop scripts launched first or last, respectively,
follows as well as an explanation of the maintaining script.
boot
Executed while starting the system directly using init. It is independent of the
chosen runlevel and is only executed once. Here, the /proc and /dev/pts file
systems are mounted and blogd (boot logging daemon) is activated. If the system
The blogd daemon is a service started by boot and rc before any other one. It is
stopped after the actions triggered by these scripts (running a number of subscripts,
for example, making block special files available) are completed. blogd writes any
screen output to the log file /var/log/boot.msg, but only if and when /var
is mounted read-write. Otherwise, blogd buffers all screen data until /var becomes
available. Get further information about blogd on the blogd(8) man page.
The script boot is also responsible for starting all the scripts in /etc/init.d/
boot.d with a name that starts with S. There, the file systems are checked and
loop devices are configured if needed. The system time is also set. If an error occurs
while automatically checking and repairing the file system, the system administrator
can intervene after first entering the root password. Last executed is the script
boot.local.
boot.local
Here, enter additional commands to execute at boot before changing into a runlevel.
It can be compared to AUTOEXEC.BAT on DOS systems.
boot.setup
This script is executed when changing from single user mode to any other runlevel
and is responsible for a number of basic settings, such as the keyboard layout and
initialization of the virtual consoles.
halt
This script is only executed while changing into runlevel 0 or 6. Here, it is executed
either as halt or as reboot. Whether the system shuts down or reboots depends
on how halt is called.
rc
This script calls the appropriate stop scripts of the current runlevel and the start
scripts of the newly selected runlevel.
You can create your own scripts and easily integrate them into the scheme described
above. For instructions about formatting, naming, and organizing custom scripts, refer
to the specifications of the LSB and to the man pages of init, init.d, chkconfig,
and insserv. Additionally consult the man pages of startproc and killproc.
Faulty init scripts may hang your machine. Edit such scripts with great care and,
if possible, subject them to heavy testing in the multiuser environment. Find
some useful information about init scripts in Section 20.2.1, “Runlevels”
(page 391).
To create a custom init script for a given program or service, use the file /etc/init
.d/skeleton as a template. Save a copy of this file under the new name and edit
the relevant program and filenames, paths, and other details as needed. You may also
need to enhance the script with your own parts, so the correct actions are triggered by
the init procedure.
The INIT INFO block at the top is a required part of the script and must be edited.
See Example 20.1, “A Minimal INIT INFO Block” (page 397).
In the first line of the INFO block, after Provides:, specify the name of the program
or service controlled by this init script. In the Required-Start: and
Required-Stop: lines, specify all services that need to be started or stopped before
the service itself is started or stopped. This information is used later to generate the
numbering of script names, as found in the runlevel directories. After
Default-Start: and Default-Stop:, specify the runlevels in which the service
should automatically be started or stopped. Finally, for Description:, provide a
short description of the service in question.
Do not set these links manually. If something is wrong in the INFO block, problems
will arise when insserv is run later for some other service. The manually-added
service will be removed with the next run of insserv for this script.
For detailed control over the runlevels in which a service is started or stopped or to
change the default runlevel, first select Expert Mode. The current default runlevel or
“initdefault” (the runlevel into which the system boots by default) is displayed at the
top. Normally, the default runlevel of a SUSE Linux Enterprise system is runlevel 5
(full multiuser mode with network and X). A suitable alternative might be runlevel 3
(full multiuser mode with network).
This YaST dialog allows the selection of one of the runlevels (as listed in Table 20.1,
“Available Runlevels” (page 392)) as the new default. Additionally use the table in this
window to enable or disable individual services and daemons. The table lists the services
and daemons available, shows whether they are currently enabled on your system, and,
if so, for which runlevels. After selecting one of the rows with the mouse, click the
check boxes representing the runlevels (B, 0, 1, 2, 3, 5, 6, and S) to define the runlevels
in which the selected service or daemon should be running. Runlevel 4 is undefined to
allow creation of a custom runlevel. A brief description of the currently selected service
or daemon is provided below the table overview.
With Start, Stop, or Refresh, decide whether a service should be activated. Refresh
status checks the current status. Set or Reset lets you select whether to apply your
changes to the system or to restore the settings that existed before starting the runlevel
editor. Selecting Finish saves the changed settings to disk.
Faulty runlevel settings may render a system unusable. Before applying your
changes, make absolutely sure that you know their consequences.
There are two ways to edit the system configuration. Either use the YaST sysconfig
Editor or edit the configuration files manually.
The YaST sysconfig dialog is split into three parts. The left part of the dialog shows a
tree view of all configurable variables. When you select a variable, the right part displays
both the current selection and the current setting of this variable. Below, a third window
displays a short description of the variable's purpose, possible values, the default value,
and the actual configuration file from which this variable originates. The dialog also
provides information about which configuration script is executed after changing the
variable and which new service is started as a result of the change. YaST prompts you
to confirm your changes and informs you which scripts will be executed after you leave
the dialog by selecting Finish. Also select the services and scripts to skip for now, so
they are started later. YaST applies all changes automatically and restarts any services
involved for your changes to take an effect.
1 Become root.
5 Bring your system back to the previous runlevel with a command like init
default_runlevel. Replace default_runlevel with the default run-
level of the system. Choose 5 if you want to return to full multiuser with network
and X or choose 3 if you prefer to work in full multiuser with network.
This procedure is mainly relevant when changing systemwide settings, such as the
network configuration. Small changes should not require going into single user mode,
but you may still do so to make absolutely sure that all the programs concerned are
correctly restarted.
This chapter focuses on boot management and the configuration of the boot loader
GRUB. The boot procedure as a whole is outlined in Chapter 20, Booting and Config-
uring a Linux System (page 387). A boot loader represents the interface between machine
(BIOS) and the operating system (SUSE Linux Enterprise). The configuration of the
boot loader directly impacts the start of the operating system.
The following terms appear frequently in this chapter and might need some explanation:
Information about the installation and configuration of LILO is available in the Support
Database under the keyword LILO and in /usr/share/doc/packages/lilo.
In some configurations, an intermediate stage 1.5 can be used, which locates and loads
stage 2 from an appropriate file system. If possible, this method is chosen by default
on installation or when initially setting up GRUB with YaST.
stage2 is able to access many file systems. Currently, Ext2, Ext3, ReiserFS, Minix, and
the DOS FAT file system used by Windows are supported. To a certain extent, XFS,
and UFS and FFS used by BSD systems are also supported. Since version 0.95, GRUB
is also able to boot from a CD or DVD containing an ISO 9660 standard file system
pursuant to the “El Torito” specification. Even before the system is booted, GRUB can
The actual configuration of GRUB is based on three files that are described below:
/boot/grub/menu.lst
This file contains all information about partitions or operating systems that can be
booted with GRUB. Without this information, the GRUB command line prompts
the user for how to proceed (see Section “Editing Menu Entries during the Boot
Procedure” (page 410) for details).
/boot/grub/device.map
This file translates device names from the GRUB and BIOS notation to Linux device
names.
/etc/grub.conf
This file contains the commands, parameters, and options the GRUB shell needs
for installing the boot loader correctly.
GRUB can be controlled in various ways. Boot entries from an existing configuration
can be selected from the graphical menu (splash screen). The configuration is loaded
from the file menu.lst.
In GRUB, all boot parameters can be changed prior to booting. For example, errors
made when editing the menu file can be corrected in this way. Boot commands can also
be entered interactively at a kind of input prompt (see Section “Editing Menu Entries
during the Boot Procedure” (page 410)). GRUB offers the possibility of determining
the location of the kernel and the initrd prior to booting. In this way, you can even
boot an installed operating system for which no entry exists in the boot loader configu-
ration.
GRUB actually exists in two versions: as a boot loader and as a normal Linux program
in /usr/sbin/grub. This program is referred to as the GRUB shell. It provides an
emulation of GRUB in the installed system and can be used to install GRUB or test
new settings before applying them. The functionality to install GRUB as the boot
loader on a hard disk or floppy disk is integrated in GRUB in the form of the commands
install and setup. This is available in the GRUB shell when Linux is loaded.
Every time the system is booted, GRUB loads the menu file from the file system. For
this reason, GRUB does not need to be reinstalled after every change to the file. Use
the YaST boot loader to modify the GRUB configuration as described in Section 21.3,
“Configuring the Boot Loader with YaST” (page 414).
The menu file contains commands. The syntax is very simple. Every line contains a
command followed by optional parameters separated by spaces like in the shell. For
historical reasons, some commands permit an = in front of the first parameter. Comments
are introduced by a hash (#).
To identify the menu items in the menu overview, set a title for every entry. The
text (including any spaces) following the keyword title is displayed as a selectable
option in the menu. All commands up to the next title are executed when this menu
item is selected.
The simplest case is the redirection to boot loaders of other operating systems. The
command is chainloader and the argument is usually the boot block of another
partition, in GRUB block notation. For example:
chainloader (hd0,3)+1
The device names in GRUB are explained in Section “Naming Conventions for Hard
Disks and Partitions” (page 407). This example specifies the first block of the fourth
partition of the first hard disk.
Use the command kernel to specify a kernel image. The first argument is the path to
the kernel image in a partition. The other arguments are passed to the kernel on its
command line.
If the kernel does not have built-in drivers for access to the root partition or a recent
Linux system with advanced hotplug features is used, initrd must be specified with
a separate GRUB command whose only argument is the path to the initrd file. Be-
cause the loading address of the initrd is written into the loaded kernel image, the
command initrd must follow after the kernel command.
The boot command is implied at the end of every menu entry, so it does not need to
be written into the menu file. However, if you use GRUB interactively for booting, you
must enter the boot command at the end. The command itself has no arguments. It
merely boots the loaded kernel image or the specified chain loader.
After writing all menu entries, define one of them as the default entry. Otherwise,
the first one (entry 0) is used. You can also specify a time-out in seconds after which
the default entry should boot. timeout and default usually precede the menu entries.
An example file is described in Section “An Example Menu File” (page 408).
The four possible primary partitions are assigned the partition numbers 0 to 3. The
logical partitions are numbered from 4:
Being dependent on BIOS devices, GRUB does not distinguish between IDE, SATA,
SCSI, and hardware RAID devices. All hard disks recognized by the BIOS or other
controllers are numbered according to the boot sequence preset in the BIOS.
Unfortunately, it is often not possible to map the Linux device names to BIOS device
names exactly. It generates this mapping with the help of an algorithm and saves it to
A complete GRUB path consists of a device name written in parentheses and the path
to the file in the file system in the specified partition. The path begins with a slash. For
example, the bootable kernel could be specified as follows on a system with a single
IDE hard disk containing Linux in its first partition:
(hd0,0)/boot/vmlinuz
gfxmenu (hd0,4)/message
color white/blue black/light-gray
default 0
timeout 8
title linux
kernel (hd0,4)/vmlinuz root=/dev/hda7 vga=791
initrd (hd0,4)/initrd
title windows
chainloader(hd0,0)+1
title floppy
chainloader(fd0)+1
title failsafe
kernel (hd0,4)/vmlinuz.shipped root=/dev/hda7 ide=nodma \
apm=off acpi=off vga=normal nosmp maxcpus=0 3
initrd (hd0,4)/initrd.shipped
gfxmenu (hd0,4)/message
The background image message is located in the top directory of the /dev/
hda5 partition.
default 0
The first menu entry title linux is the one to boot by default.
timeout 8
After eight seconds without any user input, GRUB automatically boots the default
entry. To deactivate automatic boot, delete the timeout line. If you set timeout
0, GRUB boots the default entry immediately.
The second and largest block lists the various bootable operating systems. The sections
for the individual operating systems are introduced by title.
• The first entry (title linux) is responsible for booting SUSE Linux Enterprise.
The kernel (vmlinuz) is located in the first logical partition (the boot partition)
of the first hard disk. Kernel parameters, such as the root partition and VGA mode,
are appended here. The root partition is specified according to the Linux naming
convention (/dev/hda7/), because this information is read by the kernel and
has nothing to do with GRUB. The initrd is also located in the first logical
partition of the first hard disk.
• The second entry is responsible for loading Windows. Windows is booted from the
first partition of the first hard disk (hd0,0). The command chainloader +1
causes GRUB to read and execute the first sector of the specified partition.
• The next entry enables booting from floppy disk without modifying the BIOS set-
tings.
• The boot option failsafe starts Linux with a selection of kernel parameters that
enables Linux to boot even on problematic systems.
The menu file can be changed whenever necessary. GRUB then uses the modified set-
tings during the next boot. Edit the file permanently using YaST or an editor of your
choice. Alternatively, make temporary changes interactively using the edit function of
GRUB. See Section “Editing Menu Entries during the Boot Procedure” (page 410).
The US keyboard layout is the only one available when booting. See Figure 51.1,
“US Keyboard Layout” (page 916) for a figure.
Editing menu entries facilitates the repair of a defective system that can no longer be
booted, because the faulty configuration file of the boot loader can be circumvented by
manually entering parameters. Manually entering parameters during the boot procedure
is also useful for testing new settings without impairing the native system.
After activating the editing mode, use the arrow keys to select the menu entry of the
configuration to edit. To make the configuration editable, press E again. In this way,
edit incorrect partitions or path specifications before they have a negative effect on the
boot process. Press Enter to exit the editing mode and return to the menu. Then press
B to boot this entry. Further possible actions are displayed in the help text at the bottom.
To enter changed boot options permanently and pass them to the kernel, open the file
menu.lst as the user root and append the respective kernel parameters to the existing
line, separated by spaces:
title linux
kernel (hd0,0)/vmlinuz root=/dev/hda3 additional parameter
initrd (hd0,0)/initrd
GRUB automatically adopts the new parameters the next time the system is booted.
Alternatively, this change can also be made with the YaST boot loader module. Append
the new parameters to the existing line, separated by spaces.
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/sda
Because the order of IDE, SCSI, and other hard disks depends on various factors and
Linux is not able to identify the mapping, the sequence in the file device.map can
be set manually. If you encounter problems when booting, check if the sequence in this
file corresponds to the sequence in the BIOS and use the GRUB prompt to modify it
temporarily if necessary. After the Linux system has booted, the file device.map
can be edited permanently with the YaST boot loader module or an editor of your
choice.
Depending on the controller, SATA disks are either recognized as IDE (/dev/hdx)
or SCSI (/dev/sdx) devices.
root (hd0,4)
install /grub/stage1 (hd0,3) /grub/stage2 0x8000 (hd0,4)/grub/menu.lst
quit
root (hd0,4)
This command tells GRUB to apply the following commands to the first logical
partition of the first hard disk (the location of the boot files).
install parameter
The command grub should be run with the parameter install. stage1 of the
boot loader should be installed in the the extended partition container
(/grub/stage1 (hd0,3)). This is a slightly esoteric configuration, but it is
known to work in many cases. stage2 should be loaded to the memory address
0x8000 (/grub/stage2 0x8000). The last entry
((hd0,4)/grub/menu.lst) tells GRUB where to look for the menu file.
If you use a boot password for GRUB, the usual splash screen is not displayed.
# grub-md5-crypt
Password: ****
Retype password: ****
Encrypted: $1$lS2dv/$JOYcdxIn7CJk9xShzzJVw/
2 Paste the encrypted string into the global section of the file menu.lst:
gfxmenu (hd0,4)/message
color white/blue black/light-gray
default 0
timeout 8
password --md5 $1$lS2dv/$JOYcdxIn7CJk9xShzzJVw/
Now GRUB commands can only be executed at the boot prompt after pressing
P and entering the password. However, users can still boot all operating systems
from the boot menu.
3 To prevent one or several operating systems from being booted from the boot
menu, add the entry lock to every section in menu.lst that should not be
bootable without entering a password. For example:
title linux
kernel (hd0,4)/vmlinuz root=/dev/hda7 vga=791
initrd (hd0,4)/initrd
lock
After rebooting the system and selecting the Linux entry from the boot menu,
the following error message is displayed:
Error 32: Must be authenticated
Press Enter to enter the menu. Then press P to get a password prompt. After en-
tering the password and pressing Enter, the selected operating system (Linux in
this case) should boot.
Use the Section Management tab to edit, change, and delete boot loader sections for
the individual operating systems. To add an option, click Add. To change the value of
an existing option, select it with the mouse and click Edit. To remove an existing entry,
select it and click Delete. If you are not familiar with boot loader options, read Sec-
tion 21.2, “Booting with GRUB” (page 404) first.
Use the Boot Loader Installation tab to view and change settings related to type, location,
and advanced loader settings.
Access advanced configuration options from the drop-down menu that opens after you
click on Other. The build-in editor lets you change the GRUB configuration files (see
3 In the dialog box that opens, select one of the following actions:
To use a boot loader other than GRUB or LILO, select Do Not Install Any Boot
Loader. Read the documentation of your boot loader carefully before choosing
this option.
1 Select the Boot Loader Installation tab then select one of the following options
for Boot Loader Location:
3 Change the value of Timeout in Seconds by typing in a new value, clicking the
appropriate arrow key with your mouse, or by using the arrow keys on the key-
board.
4 Click OK.
4 Click OK.
To uninstall GRUB, start the YaST boot loader module (System > Boot Loader). Select
Other > Restore MBR of Hard Disk and confirm with Yes, Rewrite.
Creating a bootable CD-ROM with GRUB merely requires a special form of stage2
called stage2_eltorito and, optionally, a customized menu.lst. The classic
files stage1 and stage2 are not required.
1 Change into a directory in which to create the ISO image, for example: cd /tmp
title Linux
root (cd)
kernel /boot/vmlinuz root=/dev/sda5 vga=794 resume=/dev/sda1 \
splash=verbose showopts
initrd /boot/initrd
6 Write the resulting file grub.iso to a CD using your preferred utility. Do not
burn the ISO image as data file, but use the option for burning a CD image in
your burning utility.
TIP
21.7 Troubleshooting
This section lists some of the problems frequently encountered when booting with
GRUB and a short description of possible solutions. Some of the problems are covered
in articles in the Knowledge base at http://support.novell.com/. Use the
search dialog to search for keywords like GRUB, boot, and boot loader.
GRUB also returns this error message if Linux was installed on an additional hard
disk that is not registered in the BIOS. stage1 of the boot loader is found and
loaded correctly, but stage2 is not found. This problem can be remedied by regis-
tering the new hard disk in the BIOS.
System Containing IDE and SCSI Hard Disks Does Not Boot
During the installation, YaST may have incorrectly determined the boot sequence
of the hard disks. For example, GRUB may regard /dev/hda as hd0 and /dev/
sda as hd1, although the boot sequence in the BIOS is reversed (SCSI before
IDE).
In this case, correct the hard disks during the boot process with the help of the
GRUB command line. After the system has booted, edit device.map to apply
the new mapping permanently. Then check the GRUB device names in the files
/boot/grub/menu.lst and /boot/grub/device.map and reinstall the
boot loader with the following command:
grub --batch < /etc/grub.conf
...
title windows
map (hd0) (hd1)
map (hd1) (hd0)
chainloader(hd1,0)+1
...
In this example, Windows is started from the second hard disk. For this purpose,
the logical order of the hard disks is changed with map. This change does not affect
the logic within the GRUB menu file. Therefore, the second hard disk must be
specified for chainloader.
1. /etc/profile
3. /etc/bash.bashrc
4. ~/.bashrc
You cannot edit /etc/crontab by calling the command crontab -e. This file
must be loaded directly into an editor, modified, then saved.
To run the hourly, daily, or other periodic maintenance scripts at custom times,
remove the time stamp files regularly using /etc/crontab entries (see Example 22.2,
“/etc/crontab: Remove Time Stamp Files” (page 425), which removes the hourly one
before every full hour, the daily one once a day at 2:14 a.m., etc.).
The daily system maintenance jobs are distributed to various scripts for reasons of
clarity. They are contained in the package aaa_base. /etc/cron.daily contains,
for example, the components suse.de-backup-rpmdb, suse.de-clean-tmp,
or suse.de-cron-local.
IMPORTANT
The create option reads all settings made by the administrator in /etc/
permissions*. Ensure that no conflicts arise from any personal modifications.
ulimit can be used with various options. To limit memory usage, use the options
listed in Table 22.1, “ulimit: Setting Resources for the User” (page 427).
Memory amounts must be specified in KB. For more detailed information, see man
bash.
Not all shells support ulimit directives. PAM (for instance, pam_limits)
offers comprehensive adjustment possibilities if you depend on encompassing
settings for these restrictions.
Basically, the kernel does not have direct knowledge of any applications or user data.
Instead, it manages applications and user data in a page cache. If memory runs short,
parts of it are written to the swap partition or to files, from which they can initially be
read with the help of the mmap command (see man mmap).
The kernel also contains other caches, such as the slab cache, where the caches used
for network access are stored. This may explain differences between the counters in
/proc/meminfo. Most, but not all of them, can be accessed via /proc/slabinfo.
On start-up, Emacs reads several files containing the settings of the user, system admin-
istrator, and distributor for customization or preconfiguration. The initialization file ~/
.emacs is installed to the home directories of the individual users from /etc/skel.
.emacs, in turn, reads the file /etc/skel/.gnu-emacs. To customize the program,
copy .gnu-emacs to the home directory (with cp /etc/skel/.gnu-emacs
~/.gnu-emacs) and make the desired settings there.
With SUSE® Linux Enterprise, the emacs package installs the file site-start.el
in the directory /usr/share/emacs/site-lisp. The file site-start.el is
loaded before the initialization file ~/.emacs. Among other things, site-start
.el ensures that special configuration files distributed with Emacs add-on packages,
such as psgml, are loaded automatically. Configuration files of this type are located
in /usr/share/emacs/site-lisp, too, and always begin with suse-start-.
The local system administrator can specify systemwide settings in default.el.
More information about these files is available in the Emacs info file under Init File:
info:/emacs/InitFile. Information about how to disable loading these files (if
necessary) is also provided at this location.
• emacs-el: the uncompiled library files in Emacs Lisp. These are not required at
runtime.
To switch to a console from X without shutting it down, use Ctrl + Alt + F1 to Ctrl +
Alt + F6. To return to X, press Alt + F7.
These changes only affect applications that use terminfo entries or whose configu-
ration files are changed directly (vi, less, etc.). Applications not shipped with the
system should be adapted to these defaults.
Under X, the compose key (multikey) can be accessed using Ctrl + Shift (right). Also
see the corresponding entry in /etc/X11/Xmodmap.
Further settings are possible using the X Keyboard Extension (XKB). This extension
is also used by the desktop environments GNOME (gswitchit) and KDE (kxkb).
Detailed information about the input of Chinese, Japanese, and Korean (CJK)
is available at Mike Fabian's page: http://www.suse.de/~mfabian/
suse-cjk/input.html.
Settings are made with LC_ variables defined in the file /etc/sysconfig/
language. This refers not only to native language support, but also to the categories
Messages (Language), Character Set, Sort Order, Time and Date, Numbers, and Money.
Each of these categories can be defined directly with its own variable or indirectly with
a master variable in the file language (see the locale man page).
RC_LC_ALL
This variable, if set, overwrites the values of the variables already mentioned.
RC_LANG
If none of the previous variables are set, this is the fallback. By default, only
RC_LANG is set. This makes it easier for users to enter their own values.
ROOT_USES_LANG
A yes or no variable. If it is set to no, root always works in the POSIX environ-
ment.
The variables can be set with the YaST sysconfig editor (see Section 20.3.1, “Changing
the System Configuration Using the YaST sysconfig Editor” (page 400)). The value of
such a variable contains the language code, country code, encoding, and modifier. The
individual components are connected by special characters:
LANG=<language>[[_<COUNTRY>].<Encoding>[@<Modifier>]]
It only makes sense to set values for which usable description files can be found in
/usr/lib/locale. Additional description files can be created from the files in
/usr/share/i18n using the command localedef. The description files are part
of the glibc-i18ndata package. A description file for en_US.UTF-8 (for English
and United States) can be created with:
LANG=en_US.UTF-8
This is the default setting if American English is selected during installation. If you
selected another language, that language is enabled but still with UTF-8 as the
character encoding.
LANG=en_US.ISO-8859-1
This sets the language to English, country to United States, and the character set
to ISO-8859-1. This character set does not support the Euro sign, but it can be
useful sometimes for programs that have not been updated to support UTF-8. The
string defining the charset (ISO-8859-1 in this case) is then evaluated by pro-
grams like Emacs.
LANG=en_IE@euro
The above example explicitly includes the Euro sign in a language setting. Strictly
speaking, this setting is obsolete now, because UTF-8 also covers the Euro symbol.
It is only useful if an application does not support UTF-8, but ISO-8859-15.
Users can override the system defaults by editing their ~/.bashrc accordingly. For
instance, if you do not want to use the systemwide en_US for program messages, include
LC_MESSAGES=es_ES so messages are displayed in Spanish instead.
A fallback chain can also be defined, for example, for Breton to French or for Galician
to Spanish to Portuguese:
LANGUAGE="br_FR:fr_FR"
LANGUAGE="gl_ES:es_ES:pt_PT"
If desired, use the Norwegian variants Nynorsk and Bokmål instead (with additional
fallback to no):
LANG="nn_NO"
LANGUAGE="nn_NO:nb_NO:no"
or
LANG="nb_NO"
LANGUAGE="nb_NO:nn_NO:no"
One problem that can arise is a separator used to delimit groups of digits not being
recognized properly. This occurs if LANG is set to only a two-letter language code like
de, but the definition file glibc uses is located in /usr/share/lib/de_DE/LC
_NUMERIC. Thus LC_NUMERIC must be set to de_DE to make the separator definition
visible to the system.
CUPS is the standard print system in SUSE Linux Enterprise. CUPS is highly user-
oriented. In many cases, it is compatible with LPRng or can be adapted with relatively
little effort. LPRng is included in SUSE Linux Enterprise only for reasons of compati-
bility.
Printers can be distinguished by interface, such as USB or network, and printer language.
When buying a printer, make sure that the printer has an interface (like USB or parallel
port) that is available on your hardware and a suitable printer language. Printers can be
categorized on the basis of the following three classes of printer languages:
PostScript Printers
PostScript is the printer language in which most print jobs in Linux and Unix are
generated and processed by the internal print system. This language is already quite
old and very efficient. If PostScript documents can be processed directly by the
printer and do not need to be converted in additional stages in the print system, the
number of potential error sources is reduced. Because PostScript printers are subject
to substantial license costs, these printers usually cost more than printers without
a PostScript interpreter.
Before you buy a new printer, refer to the following sources to check how well the
printer you intend to buy is supported:
http://www.linuxprinting.org/
The LinuxPrinting.org printer database.
http://www.cs.wisc.edu/~ghost/
The Ghostscript Web page.
/usr/share/doc/packages/ghostscript/catalog.devices
List of included drivers.
The online databases always show the latest Linux support status. However, a Linux
distribution can only integrate the drivers available at production time. Accordingly, a
printer currently rated as “perfectly supported” may not have had this status when the
latest SUSE Linux Enterprise version was released. Thus, the databases may not neces-
sarily indicate the correct status, but only provide an approximation.
At least one dedicated printer queue exists for every printer. The spooler holds the print
job in the queue until the desired printer is ready to receive data. When the printer is
ready, the spooler sends the data through the filter and back-end to the printer.
The filter converts the data generated by the application that is printing (usually
PostScript or PDF, but also ASCII, JPEG, etc.) into printer-specific data (PostScript,
PCL, ESC/P, etc.). The features of the printer are described in the PPD files. A PPD
file contains printer-specific options with the parameters needed to enable them on the
printer. The filter system makes sure that options selected by the user are enabled.
If you use a PostScript printer, the filter system converts the data into printer-specific
PostScript. This does not require a printer driver. If you use a non-PostScript printer,
the filter system converts the data into printer-specific data using Ghostscript. This re-
quires a Ghostscript printer driver suitable for your printer. The back-end receives the
printer-specific data from the filter then passes it to the printer.
►zseries: Printers and similar devices provided by the z/VM that you can connect
locally with the IBM System z mainframes are not supported by CUPS or LPRng. On
When connecting the printer to the machine, do not forget that only USB de-
vices can be plugged in or unplugged during operation. To avoid damaging
your system or printer, shut down the system before changing any connections
that are not USB.
To configure a PostScript printer, the best approach is to get a suitable PPD file. Many
PPD files are available in the package manufacturer-PPDs, which is automatically
installed within the scope of the standard installation. See Section 23.8.3, “PPD Files
in Various Packages” (page 450) and Section 23.9.2, “No Suitable PPD File Available
for a PostScript Printer” (page 454).
• The printer does not identify itself correctly. This may apply to very old devices.
Try to configure your printer as described in Section “Configuring Manually”
(page 441).
• If the manual configuration does not work, communication between printer and
computer is not possible. Check the cable and the plugs to make sure that the
printer is properly connected. If this is the case, the problem may not be printer-
related, but rather a USB or parallel port–related problem.
Configuring Manually
To manually configure the printer, select Hardware > Printer in the YaST control
center. This opens the main Printer Configuration window, where the detected devices
are listed in the upper part. The lower part lists any queues configured so far (refer to
Section 23.1, “The Workflow of the Printing System” (page 439) for more information
about print queues). If no printer was detected, both parts of the configuration window
are empty. Use Edit to change the configuration of a listed printer or Add to set up a
printer not automatically detected. Editing an existing configuration uses the same di-
alogs as in Adding a Local Printer Manually (page 442).
In Printer Configuration, you can also Delete an existing entry. Clicking Other opens
a list with advanced options. Select Restart Detection, to manually start the automatic
To make sure that everything works correctly, the crucial configuration steps
can be checked with the print test function of YaST. The test page also pro-
vides important information about the configuration tested. If the output is
garbled, for example, with several pages almost empty, you can stop the
printer by first removing all paper then stopping the test from YaST.
1 Start YaST and choose Hardware > Printer to open the Printer Configuration
dialog.
4 Select the port to which the printer is connected (usually USB or parallel port)
and choose the device in the next configuration screen. It is recommended to
Test the Printer Connection at this point. If problems occur, select the correct
device or choose Back to return to the previous dialog.
5 In Queue Name, set up a print queue. Specifying a Name for Printing is manda-
tory. It is recommended to choose a recognizable name—with this name, you
can later identify the printer in the printing dialogs of applications. Use Printer
Description and Printer Location to further describe the printer. This is optional,
but useful if you have more than one printer connected to the machine or if you
set up a print server. Do Local Filtering should be checked—it is needed for local
printers.
6 In Printer Model, specify the printer by Manufacturer and Model. If your printer
is not listed, you can try UNKNOWN MANUFACTURER from the manufacturer
list and select an appropriate standard language (the set of commands controlling
the printer) from the model list (refer to your printer's documentation to find out
7 The Configuration screen lists a summary of the printer setup. This dialog is also
shown when editing an existing printer configuration from the start screen of this
YaST module.
The summary contains the following entries, which you can also modify with
Edit:
• Name and basic settings, Printer Model, and Connection let you change en-
tries made while following this procedure.
• Refer to Section “Choosing an Alternative PPD File with YaST” (page 444)
for details on PPD file.
• With Filter settings fine-tune the printer setup. Configure options like Page
Size, Color Mode, and Resolution here.
• By default, every user is able to use the printer. With Restriction settings,
list users that are forbidden to use the printer or list users that are allowed to
use it.
Get PPD files directly from your printer vendor or from the driver CD of the printer
(see Section 23.9.2, “No Suitable PPD File Available for a PostScript Printer” (page 454)
for details). An alternative source for PPD files is http://www.linuxprinting
.org/, the “Linux Printing Database”. When downloading PPD files from linuxprint-
ing.org, keep in mind that it always shows the latest Linux support status, which is not
necessarily met by SUSE Linux Enterprise.
Normally it should not be necessary to change the PPD file—the PPD file chosen by
YaST should produce the best results. However, if you want a color printer to print
only in black and white, for example, it is most convenient to use a PPD file that does
not support color printing. If you experience performance problems with a PostScript
printer when printing graphics, it may help to switch from a PostScript PPD file to a
PCL PPD file (provided your printer understands PCL).
1 Start YaST and choose Hardware > Printer to open the Printer Configuration
dialog.
3 Choose Network Printers to open a dialog in which to specify further details that
should be provided by your network administrator.
The protocol supported by the printer must be determined before configuration. If the
manufacturer does not provide the needed information, the command nmap, which
comes with the nmap package, can be used to guess the protocol. nmap checks a host
for open ports. For example:
nmap -p 35,137-139,515,631,9100-10000 printerIP
With lpadmin, the CUPS server administrator can add, remove, or manage class and
print queues. To add a print queue, use the following syntax:
lpadmin -p queue -v device-URI -P PPD-file -E
Then the device (-v) is available as queue (-p), using the specified PPD file (-P).
This means that you must know the PPD file and the name of the device to configure
the printer manually.
Do not use -E as the first option. For all CUPS commands, -E as the first argument
sets use of an encrypted connection. To enable the printer, -E must be used as shown
in the following example:
lpadmin -p ps -v parallel:/dev/lp0 -P \
/usr/share/cups/model/Postscript.ppd.gz -E
During printer setup, certain options are set as default. These options can be modified
for every print job (depending on the print tool used). Changing these default options
with YaST is also possible. Using command line tools, set default options as follows:
Example:
Resolution/Output Resolution: 150dpi *300dpi 600dpi
When a normal user runs lpoptions, the settings are written to ~/.lpoptions.
However, root settings are written to /etc/cups/lpoptions.
Some applications rely on the lp command for printing. In this case, enter the correct
command in the application's print dialog, usually without specifying filename, for
example, lp -d queuename.
CUPS Client
Normally a CUPS client runs on a regular workstation located in a network behind a
firewall. In this case it is recommended to configure the external network devices to
be in the Internal Zone, so the workstation is reachable from within the network.
CUPS Server
If the CUPS server is part of network protected by a firewall, the external network device
should be configured to be in the Internal Zone of the firewall. When being part
of the external zone, the TCP and UDP port 631 needs to be opened in order to make
the CUPS server available in the network.
and
<Location />
Order Deny,Allow
Deny From All
Allow From 127.0.0.1
Allow From 127.0.0.2
Allow From @LOCAL
</Location>
In this way, only LOCAL hosts can access cupsd on a CUPS server. LOCAL hosts are
hosts whose IP addresses belong to a non-PPP interface (interfaces whose
IFF_POINTOPOINT flags are not set) and whose IP addresses belong to the same
network as the CUPS server. Packets from all other hosts are rejected immediately.
The configuration using only PPD files and no other information sources has the advan-
tage that the PPD files in /usr/share/cups/model can be modified freely. The
YaST printer configuration recognizes changes and regenerates the vendor and model
database. For example, if you only have PostScript printers, normally you do not need
the Foomatic PPD files in the cups-drivers package or the Gimp-Print PPD files
in the cups-drivers-stp package. Instead, the PPD files for your PostScript
printers can be copied directly to /usr/share/cups/model (if they do not already
exist in the manufacturer-PPDs package) to achieve an optimum configuration
for your printers.
• /usr/share/cups/model/Postscript-level1.ppd.gz
• /usr/share/cups/model/Postscript-level2.ppd.gz
YaST prefers a Foomatic PPD file if a Foomatic PPD file with the entry *NickName:
... Foomatic ... (recommended) matches the printer model and the
manufacturer-PPDs package does not contain a more suitable PPD file.
• The vendor and model determined during the hardware detection match the vendor
and model in a PPD file from the manufacturer-PPDs package.
• The PPD file from the manufacturer-PPDs package is the only suitable PPD
file for the printer model or a there is a Foomatic PPD file with a *NickName:
... Foomatic/Postscript (recommended) entry that also matches the
printer model.
Accordingly, YaST does not use any PPD file from the manufacturer-PPDs
package in the following cases:
• The PPD file from the the manufacturer-PPDs package does not match the
vendor and model. This may happen if the manufacturer-PPDs package con-
tains only one PPD file for similar models, for example, if there is no separate PPD
file for the individual models of a model series, but the model name is specified in
a form like Funprinter 1000 series in the PPD file.
• The Foomatic PostScript PPD file is not recommended. This may be because the
printer model does not operate efficiently enough in PostScript mode, for example,
the printer may be unreliable in this mode because it has too little memory or the
23.9 Troubleshooting
The following sections cover some of the most frequently encountered printer hardware
and software problems and ways to solve or circumvent these problems. Among the
topics covered are GDI printers, PPD files, and port configuration. Common network
printer problems, defective printouts, and queue handling are also addressed.
Some GDI printers can be switched to operate either in GDI mode or one of the standard
printer languages. See the manual of the printer whether it is possible. Some models
require a special Windows software to do the switch (note that the Windows printer
driver may always switch the printer back into GDI mode when printing from Windows).
For other GDI printers there are extension modules for a standard printer language
available.
Some manufacturers provide proprietary drivers for their printers. The disadvantage of
proprietary printer drivers is that there is no guarantee that these work with the installed
print system and that they are suitable for the various hardware platforms. In contrast,
Instead of spending time trying to make a proprietary Linux driver work, it may be
more cost-effective to purchase a supported printer. This would solve the driver problem
once and for all, eliminating the need to install and configure special driver software
and obtain driver updates that may be required due to new developments in the print
system.
If the PPD file is provided as a zip archive (.zip) or a self-extracting zip archive (.exe),
unpack it with unzip. First, review the license terms of the PPD file. Then use the
cupstestppd utility to check if the PPD file complies with “Adobe PostScript
Printer Description File Format Specification, version 4.3.” If the utility returns “FAIL,”
the errors in the PPD files are serious and are likely to cause major problems. The
problem spots reported by cupstestppd should be eliminated. If necessary, ask the
printer manufacturer for a suitable PPD file.
• Interrupt: irrelevant
• DMA: disabled
If interrupt 7 is free, it can be activated with the entry shown in Example 23.1, “ /etc/
modprobe.conf: Interrupt Mode for the First Parallel Port ” (page 455). Before acti-
vating the interrupt mode, check the file /proc/interrupts to see which interrupts
are already in use. Only the interrupts currently being used are displayed. This may
change depending on which hardware components are active. The interrupt for the
parallel port must not be used by any other device. If you are not sure, use the polling
mode with irq=none.
Example 23.1 /etc/modprobe.conf: Interrupt Mode for the First Parallel Port
alias parport_lowlevel parport_pc
options parport_pc io=0x378 irq=7
If the connection to lpd cannot be established, lpd may not be active or there
may be basic network problems.
As the user root, use the following command to query a (possibly very long)
status report for queue on remote host, provided the respective lpd is active
and the host accepts queries:
echo -e "\004queue" \
| netcat -w 2 -p 722 host 515
If lpd does not respond, it may not be active or there may be basic network prob-
lems. If lpd responds, the response should show why printing is not possible on
the queue on host. If you receive a response like that in Example 23.2, “Error
Message from lpd” (page 456), the problem is caused by the remote lpd.
If a broadcasting CUPS network server exists, the output appears as shown in Ex-
ample 23.3, “Broadcast from the CUPS Network Server” (page 456).
►zseries: Take into account that IBM System z ethernet devices do not receive
broadcasts by default. ◄
The next command can be used to test if the queue on host accepts a print job
consisting of a single carriage-return character. Nothing should be printed. Possibly,
a blank page may be ejected.
echo -en "\r" \
| lp -d queue -h host
In this way, the print server box is reduced to a converter between the various forms
of data transfer (TCP/IP network and local printer connection). To use this method,
you need to know the TCP port on the print server box. If the printer is connected
to the print server box and powered on, this TCP port can usually be determined
with the nmap utility from the nmap package some time after the print server box
is powered on. For example, nmap IP-address may deliver the following
output for a print server box:
Port State Service
23/tcp open telnet
80/tcp open http
515/tcp open printer
631/tcp open cups
9100/tcp open jetdirect
This output indicates that the printer connected to the print server box can be ad-
dressed via TCP socket on port 9100. By default, nmap only checks a number of
commonly known ports listed in /usr/share/nmap/nmap-services. To
check all possible ports, use the command nmap
to send character strings or files directly to the respective port to test if the printer
can be addressed on this port.
To delete the print job on the server, use a command such as lpstat -h
cups.example.com -o to determine the job number on the server, provided the
server has not already completed the print job (that is, sent it completely to the printer).
Using this job number, the print job on the server can be deleted:
cancel -h cups.example.com queue-jobnnumber
If a print job is defective or an error occurs in the communication between the host and
the printer, the printer prints numerous sheets of paper with unintelligible characters,
because it is unable to process the data correctly. To deal with this, follow these steps:
1 To stop printing, remove all paper from ink jet printers or open the paper trays
of laser printers. High-quality printers have a button for canceling the current
printout.
2 The print job may still be in the queue, because jobs are only removed after they
are sent completely to the printer. Use lpstat -o or lpstat -h
cups.example.com -o to check which queue is currently printing. Delete
the print job with cancel queue-jobnumber or cancel -h
cups.example.com queue-jobnumber.
3 Some data may still be transferred to the printer even though the print job has
been deleted from the queue. Check if a CUPS back-end process is still running
for the respective queue and terminate it. For example, for a printer connected
to the parallel port, the command fuser -k /dev/lp0 can be used to termi-
nate all processes that are still accessing the printer (more precisely: the parallel
port).
2 Stop cupsd.
4 Start cupsd.
The content of the /dev directory is kept on a temporary file system and all files are
created from scratch at every system start-up. Manually created or changed files inten-
tionally do not survive a reboot. Static files and directories that should always be present
in the /dev directory regardless of the state of the corresponding kernel device can be
placed in the /lib/udev/devices directory. At system start-up, the contents of
that directory is copied to the /dev directory with the same ownership and permissions
as the files in /lib/udev/devices.
The udev daemon reads and parses all provided rules from the /etc/udev/rules
.d/*.rules files once at start-up and keeps them in memory. If rules files are
changed, added, or removed, the daemon receives an event and updates the in-memory
representation of the rules.
Every received event is matched against the set of provides rules. The rules can add or
change event environment keys, request a specific name for the device node to create,
add symlinks pointing to the node, or add programs to run after the device node is cre-
ated. The driver core uevents are received from a kernel netlink socket.
Every device driver carries a list of known aliases for devices it can handle. The list is
contained in the kernel module file itself. The program depmod reads the ID lists and
creates the file modules.alias in the kernel's /lib/modules directory for all
currently available modules. With this infrastructure, module loading is as easy as
calling modprobe for every event that carries a MODALIAS key. If modprobe
$MODALIAS is called, it matches the device alias composed for the device with the
As an example, a USB mouse present during boot may not be initialized by the early
boot logic, because the driver is not available that time. The event for the device discov-
ery was lost and failed to find a kernel module for the device. Instead of manually
searching for possibly connected devices, udev just requests all device events from the
kernel after the root file system is available, so the event for the USB mouse device
just runs again. Now it finds the kernel module on the mounted root file system and the
USB mouse can be initialized.
From userspace, there is no visible difference between a device coldplug sequence and
a device discovery during runtime. In both cases, the same rules are used to match and
the same configured programs are run.
UEVENT[1132632714.285362] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2
UEVENT[1132632714.288166] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0
UEVENT[1132632714.309485] add@/class/input/input6
UEVENT[1132632714.309511] add@/class/input/input6/mouse2
UEVENT[1132632714.309524] add@/class/usb_device/usbdev2.12
UDEV [1132632714.348966] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2
UDEV [1132632714.420947] add@/devices/pci0000:00/0000:00:1d.1/usb2/2-2/2-2:1.0
UDEV [1132632714.427298] add@/class/input/input6
UDEV [1132632714.434223] add@/class/usb_device/usbdev2.12
UDEV [1132632714.439934] add@/class/input/input6/mouse2
udev also sends messages to syslog. The default syslog priority that controls which
messages are sent to syslog is specified in the udev configuration file /etc/udev/
udev.conf. The log priority of the running daemon can be changed with
udevcontrol log_priority=level/number.
/dev/disk
|-- by-id
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B -> ../../sda
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part1 -> ../../sda1
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part6 -> ../../sda6
| |-- scsi-SATA_HTS726060M9AT00_MRH453M4HWHG7B-part7 -> ../../sda7
| |-- usb-Generic_STORAGE_DEVICE_02773 -> ../../sdd
| `-- usb-Generic_STORAGE_DEVICE_02773-part1 -> ../../sdd1
|-- by-label
| |-- Photos -> ../../sdd1
| |-- SUSE10 -> ../../sda7
| `-- devel -> ../../sda6
|-- by-path
| |-- pci-0000:00:1f.2-scsi-0:0:0:0 -> ../../sda
| |-- pci-0000:00:1f.2-scsi-0:0:0:0-part1 -> ../../sda1
| |-- pci-0000:00:1f.2-scsi-0:0:0:0-part6 -> ../../sda6
| |-- pci-0000:00:1f.2-scsi-0:0:0:0-part7 -> ../../sda7
| |-- pci-0000:00:1f.2-scsi-1:0:0:0 -> ../../sr0
| |-- usb-02773:0:0:2 -> ../../sdd
| |-- usb-02773:0:0:2-part1 -> ../../sdd1
`-- by-uuid
|-- 159a47a4-e6e6-40be-a757-a629991479ae -> ../../sda7
|-- 3e999973-00c9-4917-9442-b7633bd95b9e -> ../../sda6
`-- 4210-8F8C -> ../../sdd1
/etc/hotplug/*.agent
No longer needed or moved to /lib/udev
/etc/hotplug/*.rc
Replaced by the /sys/*/uevent trigger
/etc/hotplug/blacklist
Replaced by the blacklist option in modprobe.conf
/etc/dev.d/*
Replaced by the udev rule RUN key
/etc/hotplug.d/*
Replaced by the udev rule RUN key
/sbin/hotplug
Replaced by udevd listening to netlink; only used in the initial RAM file system
until the root file system can be mounted, then it is disabled
/dev/*
Replaced by dynamic udev and static content in /lib/udev/devices/*
The following files and directories contain the crucial elements of the udev infrastructure:
/etc/udev/udev.conf
Main udev configuration file
/etc/udev/rules.d/*
udev event matching rules
/lib/udev/devices/*
Static /dev content
udev
General information about udev, keys, rules, and other important configuration is-
sues.
udevinfo
udevinfo can be used to query device information from the udev database.
udevd
Information about the udev event managing daemon.
udevmonitor
udevmonitor prints the kernel and udev event sequence to the console. This tool is
mainly used for debugging purposes.
25.1 Terminology
metadata
A file system–internal data structure that assures all the data on disk is properly
organized and accessible. Essentially, it is “data about the data.” Almost every file
system has its own structure of metadata, which is part of why the file systems
show different performance characteristics. It is extremely important to maintain
metadata intact, because otherwise all data on the file system could become inac-
cessible.
inode
Inodes contain various information about a file, including size, number of links,
pointers to the disk blocks where the file contents are actually stored, and date and
time of creation, modification, and access.
journal
In the context of a file system, a journal is an on-disk structure containing a kind
of log in which the file system stores what it is about to change in the file system's
metadata. Journaling greatly reduces the recovery time of a Linux system because
It is very important to bear in mind that there may be no file system that best suits all
kinds of applications. Each file system has its particular strengths and weaknesses,
which must be taken into account. Even the most sophisticated file system cannot replace
a reasonable backup strategy, however.
The terms data integrity and data consistency, when used in this chapter, do not refer
to the consistency of the user space data (the data your application writes to its files).
Whether this data is consistent must be controlled by the application itself.
Unless stated otherwise in this chapter, all the steps required to set up or
change partitions and file systems can be performed using YaST.
25.2.1 ReiserFS
Officially one of the key features of the 2.4 kernel release, ReiserFS has been available
as a kernel patch for 2.2.x SUSE kernels since version 6.4. ReiserFS was designed by
Hans Reiser and the Namesys development team. It has proven itself to be a powerful
alternative to Ext2. Its key assets are better disk space utilization, better disk access
performance, and faster crash recovery.
25.2.2 Ext2
The origins of Ext2 go back to the early days of Linux history. Its predecessor, the
Extended File System, was implemented in April 1992 and integrated in Linux 0.96c.
The Extended File System underwent a number of modifications and, as Ext2, became
the most popular Linux file system for years. With the creation of journaling file systems
and their astonishingly short recovery times, Ext2 became less important.
A brief summary of Ext2's strengths might help understand why it was—and in some
areas still is—the favorite Linux file system of many Linux users.
Solidity
Being quite an “old-timer,” Ext2 underwent many improvements and was heavily
tested. This may be the reason why people often refer to it as rock-solid. After a
system outage when the file system could not be cleanly unmounted, e2fsck starts
to analyze the file system data. Metadata is brought into a consistent state and
pending files or data blocks are written to a designated directory (called lost
Easy Upgradability
The code for Ext2 is the strong foundation on which Ext3 could become a highly-
acclaimed next-generation file system. Its reliability and solidity were elegantly
combined with the advantages of a journaling file system.
25.2.3 Ext3
Ext3 was designed by Stephen Tweedie. Unlike all other next-generation file systems,
Ext3 does not follow a completely new design principle. It is based on Ext2. These two
file systems are very closely related to each other. An Ext3 file system can be easily
built on top of an Ext2 file system. The most important difference between Ext2 and
Ext3 is that Ext3 supports journaling. In summary, Ext3 has three major advantages to
offer:
To decide yourself how large the journal should be and on which device it should
reside, run tune2fs -J instead together with the desired journal options
size= and device=. More information about the tune2fs program is available
in the tune2fs manual page.
2 To ensure that the Ext3 file system is recognized as such, edit the file /etc/
fstab as root, changing the file system type specified for the corresponding
partition from ext2 to ext3. The change takes effect after the next reboot.
3 To boot a root file system set up as an Ext3 partition, include the modules ext3
and jbd in the initrd. To do this, edit /etc/sysconfig/kernel as
root, adding ext3 and jbd to the INITRD_MODULES variable. After saving
the changes, run the mkinitrd command. This builds a new initrd and prepares
it for use.
A quick review of XFS's key features explains why it may prove a strong competitor
for other journaling file systems in high-end computing.
Every node in an OCFS2 setup has concurrent read and write access to all data. This
requires OCFS2 to be cluster-aware, meaning that OCFS2 must include a means to
determine of which nodes the cluster consists and whether these nodes are actually
alive and available. To compute a cluster's membership, OCFS2 includes a node man-
ager (NM). To monitor the availability of the nodes in a cluster, OCFS2 includes a
simple heartbeat implementation. To avoid chaos arising from various nodes directly
accessing the file system, OCFS2 also contains a lock manager, DLM (distributed lock
manager). Communication between the nodes is handled via a TCP-based messaging
system.
• Asynchronous and direct I/O support for database files for improved database per-
formance
• Support for multiple block sizes (where each volume can have a different block
size) up to 4 KB, for a maximum volume size of 16 TB
For more in-depth information about OCFS2, refer to Chapter 14, Oracle Cluster File
System 2 (page 287).
hpfs High Performance File System: The IBM OS/2 standard file
system—only supported in read-only mode.
msdos fat, the file system originally used by DOS, is today used by
various operating systems.
nfs Network File System: Here, data can be stored on any machine
in a network and access may be granted via a network.
vfat Virtual FAT: Extension of the fat file system (supports long
filenames).
Ext2 or Ext3 (8 KB block size) 246 (64 TB) 245 (32 TB)
(systems with 8 KB pages, like
Alpha)
Table 25.2, “Maximum Sizes of File Systems (On-Disk Format)” (page 477) de-
scribes the limitations regarding the on-disk format. The 2.6 kernel imposes its
own limits on the size of files and file systems handled by it. These are as follows:
File Size
41
On 32-bit systems, files may not exceed the size of 2 TB (2 bytes).
• http://e2fsprogs.sourceforge.net/
• http://www.zipworld.com.au/~akpm/linux/ext3/
• http://chichkin_i.zelnet.ru/namesys/
• http://oss.sgi.com/projects/xfs/
• http://oss.oracle.com/projects/ocfs2/
IBM System z do not have any input and output devices supported by X.Org.
Therefore, none of the configuration procedures described in this section apply.
More relevant information for IBM System z can be found in Section 8.6,
“Network Devices” (page 164).
Be very careful when configuring your X Window System. Never start the X
Window System until the configuration is finished. A misconfigured system can
cause irreparable damage to your hardware (this applies especially to fixed-
frequency monitors). The creators of this book and SUSE Linux Enterprise
cannot be held responsible for any resulting damage. This information has been
carefully researched, but this does not guarantee that all methods presented
here are correct and cannot damage your hardware.
The command sax2 creates the /etc/X11/xorg.conf file. This is the primary
configuration file of the X Window System. Find all the settings here concerning your
graphics card, mouse, and monitor.
The following sections describe the structure of the configuration file /etc/X11/
xorg.conf. It consists of several sections, each one dealing with a certain aspect of
the configuration. Each section starts with the keyword Section <designation>
and ends with EndSection. The following convention applies to all sections:
Section "designation"
entry 1
entry 2
entry n
EndSection
The section types available are listed in Table 26.1, “Sections in /etc/X11/xorg.conf”
(page 483).
Type Meaning
Files The paths used for fonts and the RGB color table.
InputDevice Input devices, like keyboards and special input devices (touch-
pads, joysticks, etc.), are configured in this section. Important
parameters in this section are Driver and the options defining
the Protocol and Device. You normally have one
InputDevice section per device attached to the computer.
Monitor The monitor used. Important elements of this section are the
Identifier, which is referred to later in the Screen defini-
tion, the refresh rate VertRefresh, and the synchronization
frequency limits (HorizSync and VertRefresh). Settings
are given in MHz, kHz, and Hz. Normally, the server refuses
any modeline that does not correspond with the specification of
the monitor. This prevents too high frequencies from being sent
to the monitor by accident.
Monitor, Device, and Screen are explained in more detail. Further information
about the other sections can be found in the manual pages of X.Org and xorg.conf.
There can be several different Monitor and Device sections in xorg.conf. Even
multiple Screen sections are possible. The ServerLayout section determines
which of these sections is used.
The first resolution found is the Default mode. With Ctrl + Alt + + (on the
number pad), switch to the next resolution in the list to the right. With Ctrl + Alt
+ – (on the number pad), switch to the previous. This enables you to vary the
resolution while X is running.
❶ The BusID refers to the PCI or AGP slot in which the graphics card is installed.
This matches the ID displayed by the command lspci. The X server needs details
The behavior of the X server or of the driver can also be influenced through additional
options. An example of this is the option sw_cursor, which is set in the device section.
This deactivates the hardware mouse cursor and depicts the mouse cursor using software.
Depending on the driver module, there are various options available, which can be
found in the description files of the driver modules in the directory /usr/share/
doc/package_name. Generally valid options can also be found in the manual pages
(man xorg.conf, man X.Org, and man 4 chips).
If the graphics card has multiple video connectors, it is possible to configure the different
devices of this single card as one single view. Use SaX2 to set up your graphics interface
this way.
Monitor definitions should only be set by experienced users. The modelines are an
important part of the Monitor sections. Modelines set horizontal and vertical timings
for the respective resolution. The monitor properties, especially the allowed frequencies,
are stored in the Monitor section.
Unless you have in-depth knowledge of monitor and graphics card functions,
do not change the modelines, because this could severely damage your monitor.
Those who try to develop their own monitor descriptions should be very familiar with
the documentation in /usr/X11R6/lib/X11/doc/ (the package xorg-x11-doc
must be installed).
Manual specification of modelines is rarely required today. If you are using a modern
multisync monitor, the allowed frequencies and optimal resolutions can, as a rule, be
read directly from the monitor by the X server via DDC, as described in the SaX2
configuration section. If this is not possible for some reason, use one of the VESA
modes included in the X server. This will work with almost all graphics card and
monitor combinations.
To install additional fonts systemwide, manually copy the font files to a suitable direc-
tory (as root), such as /usr/share/fonts/truetype. Alternatively, the task
can be performed with the KDE font installer in the KDE Control Center. The result is
the same.
Instead of copying the actual fonts, you can also create symbolic links. For example,
you may want to do this if you have licensed fonts on a mounted Windows partition
and want to use them. Subsequently, run SuSEconfig --module fonts .
The procedure is the same for bitmap fonts, TrueType and OpenType fonts, and Type1
(PostScript) fonts. All these font types can be installed into any directory.
X.Org contains two completely different font systems: the old X11 core font system
and the newly designed Xft and fontconfig system. The following sections briefly de-
scribe these two systems.
For its operation, the X server needs to know which fonts are available and where in
the system it can find them. This is handled by a FontPath variable, which contains
the path to all valid system font directories. In each of these directories, a file named
fonts.dir lists the available fonts in this directory. The FontPath is generated
by the X server at start-up. It searches for a valid fonts.dir file in each of the
FontPath entries in the configuration file /etc/X11/xorg.conf. These entries
are found in the Files section. Display the actual FontPath with xset q. This
path may also be changed at runtime with xset. To add an additional path, use
xset +fp <path>. To remove an unwanted path, use xset -fp <path>.
If the X server is already active, newly installed fonts in mounted directories can be
made available with the command xset fp rehash. This command is executed by
SuSEconfig --module fonts. Because the command xset needs access to the
running X server, this only works if SuSEconfig --module fonts is started from
a shell that has access to the running X server. The easiest way to achieve this is to as-
sume root permissions by entering su and the root password. su transfers the access
permissions of the user who started the X server to the root shell. To check if the
fonts were installed correctly and are available by way of the X11 core font system,
use the command xlsfonts to list all available fonts.
By default, SUSE Linux Enterprise uses UTF-8 locales. Therefore, Unicode fonts should
be preferred (font names ending with iso10646-1 in xlsfonts output). All available
Unicode fonts can be listed with xlsfonts | grep iso10646-1. Nearly all
Unicode fonts available in SUSE Linux Enterprise contain at least the glyphs needed
for European languages (formerly encoded as iso-8859-*).
26.2.2 Xft
From the outset, the programmers of Xft made sure that scalable fonts including an-
tialiasing are supported well. If Xft is used, the fonts are rendered by the application
using the fonts, not by the X server as in the X11 core font system. In this way, the re-
spective application has access to the actual font files and full control of how the glyphs
are rendered. This constitutes the basis for the correct display of text in a number of
In SUSE Linux Enterprise, the two desktop environments KDE and GNOME, Mozilla,
and many other applications already use Xft by default. Xft is already used by more
applications than the old X11 core font system.
Xft uses the fontconfig library for finding fonts and influencing how they are rendered.
The properties of fontconfig are controlled by the global configuration file /etc/
fonts/fonts.conf and the user-specific configuration file ~/.fonts.conf.
Each of these fontconfig configuration files must begin with
<?xml version="1.0"?>
<!DOCTYPE fontconfig SYSTEM "fonts.dtd">
<fontconfig>
To add directories to search for fonts, append lines such as the following:
<dir>/usr/local/share/fonts/</dir>
However, this is usually not necessary. By default, the user-specific directory ~/.fonts
is already entered in /etc/fonts/fonts.conf. Accordingly, all you need to do
to install additional fonts is to copy them to ~/.fonts.
You can also insert rules that influence the appearance of the fonts. For example, enter
<match target="font">
<edit name="antialias" mode="assign">
<bool>false</bool>
</edit>
</match>
By default, most applications use the font names sans-serif (or the equivalent
sans), serif, or monospace. These are not real fonts but only aliases that are re-
solved to a suitable font, depending on the language setting.
Users can easily add rules to ~/.fonts.conf to resolve these aliases to their favorite
fonts:
<alias>
<family>sans-serif</family>
<prefer>
<family>FreeSans</family>
</prefer>
</alias>
<alias>
<family>serif</family>
<prefer>
<family>FreeSerif</family>
</prefer>
</alias>
<alias>
<family>monospace</family>
<prefer>
<family>FreeMono</family>
</prefer>
</alias>
Because nearly all applications use these aliases by default, this affects almost the entire
system. Thus, you can easily use your favorite fonts almost everywhere without having
to modify the font settings in the individual applications.
Use the command fc-list to find out which fonts are installed and available for use.
For instance, the command fc-list returns a list of all fonts. To find out which of
the available scalable fonts (:scalable=true) contain all glyphs required for Hebrew
(:lang=he), their font names (family), their style (style), their weight (weight),
and the name of the files containing the fonts, enter the following command:
fc-list ":lang=he:scalable=true" family style weight
lang The language that the font supports, for example, de for
German, ja for Japanese, zh-TW for traditional Chinese,
or zh-CN for simplified Chinese.
weight The font weight, such as 80 for regular or 200 for bold.
slant The slant, usually 0 for none and 100 for italic.
System administrators and programmers often want to restrict access to certain parts
of the system or to limit the use of certain functions of an application. Without PAM,
applications must be adapted every time a new authentication mechanism, such as
LDAP, Samba or, Kerberos, is introduced. This process, however, is rather time-con-
suming and error-prone. One way to avoid these drawbacks is to separate applications
from the authentication mechanism and delegate authentication to centrally managed
modules. Whenever a newly required authentication scheme is needed, it is sufficient
to adapt or write a suitable PAM module for use by the program in question.
Every program that relies on the PAM mechanism has its own configuration file in the
directory /etc/pam.d/programname. These files define the PAM modules used
for authentication. In addition, there are global configuration files for PAM modules
under /etc/security, which define the exact behavior of these modules (examples
include pam_env.conf, pam_pwcheck.conf, pam_unix2.conf, and time
.conf). Every application that uses a PAM module actually calls a set of PAM func-
tions, which then process the information in the various configuration files and return
the result to the calling application.
PAM modules are processed as stacks. Different types of modules have different pur-
poses, for example, one module checks the password, another one verifies the location
from which the system is accessed, and yet another one reads user-specific settings.
PAM knows about four different types of modules:
auth
The purpose of this type of module is to check the user's authenticity. This is tradi-
tionally done by querying a password, but it can also be achieved with the help of
a chip card or through biometrics (fingerprints or iris scan).
account
Modules of this type check whether the user has general permission to use the re-
quested service. As an example, such a check should be performed to ensure that
no one can log in under the username of an expired account.
password
The purpose of this type of module is to enable the change of an authentication
token. In most cases, this is a password.
session
Modules of this type are responsible for managing and configuring user sessions.
They are started before and after authentication to register login attempts in system
logs and configure the user's specific environment (mail accounts, home directory,
system limits, etc.).
The second column contains control flags to influence the behavior of the modules
started:
required
A module with this flag must be successfully processed before the authentication
may proceed. After the failure of a module with the required flag, all other
requisite
Modules having this flag must also be processed successfully, in much the same
way as a module with the required flag. However, in case of failure a module
with this flag gives immediate feedback to the user and no further modules are
processed. In case of success, other modules are subsequently processed, just like
any modules with the required flag. The requisite flag can be used as a
basic filter checking for the existence of certain conditions that are essential for a
correct authentication.
sufficient
After a module with this flag has been successfully processed, the calling application
receives an immediate message about the success and no further modules are pro-
cessed, provided there was no preceding failure of a module with the required
flag. The failure of a module with the sufficient flag has no direct conse-
quences, in the sense that any subsequent modules are processed in their respective
order.
optional
The failure or success of a module with this flag does not have any direct conse-
quences. This can be useful for modules that are only intended to display a message
(for example, to tell the user that mail has arrived) without taking any further action.
include
If this flag is given, the file specified as argument is inserted at this place.
The module path does not need to be specified explicitly, as long as the module is lo-
cated in the default directory /lib/security (for all 64-bit platforms supported by
SUSE Linux Enterprise®, the directory is /lib64/security). The fourth column
may contain an option for the given module, such as debug (enables debugging) or
nullok (allows the use of empty passwords).
The typical PAM configuration of an application (sshd, in this case) contains four include
statements referring to the configuration files of four module types: common-auth,
common-account, common-password, and common-session. These four
files hold the default configuration for each module type. By including them instead of
calling each module separately for each PAM application, automatically get an updated
PAM configuration if the administrator changes the defaults. In former times, you had
to adjust all configuration files manually for all applications when changes to PAM
occurred or a new application was installed. Now the PAM configuration is made with
central configuration files and all changes are automatically inherited by the PAM
configuration of each service.
The first include file (common-auth) calls two modules of the auth type: pam_env
and pam_unix2. See Example 27.2, “Default Configuration for the auth Section”
(page 498).
After the modules specified in common-auth have been successfully called, a third
module called pam_nologin checks whether the file /etc/nologin exists. If it
does, no user other than root may log in. The whole stack of auth modules is pro-
cessed before sshd gets any feedback about whether the login has succeeded. Given
that all modules of the stack have the required control flag, they must all be processed
successfully before sshd receives a message about the positive result. If one of the
As soon as all modules of the auth type have been successfully processed, another
include statement is processed, in this case, that in Example 27.3, “Default Configuration
for the account Section” (page 499). common-account contains just one module,
pam_unix2. If pam_unix2 returns the result that the user exists, sshd receives a
message announcing this success and the next stack of modules (password) is pro-
cessed, shown in Example 27.4, “Default Configuration for the password Section”
(page 499).
Again, the PAM configuration of sshd involves just an include statement referring to
the default configuration for password modules located in common-password.
These modules must successfully be completed (control flag required) whenever
the application requests the change of an authentication token. Changing a password
or another authentication token requires a security check. This is achieved with the pam
_pwcheck module. The pam_unix2 module used afterwards carries over any old
and new passwords from pam_pwcheck, so the user does not need to authenticate
again. This also makes it impossible to circumvent the checks carried out by pam
_pwcheck. The modules of the password type should be used wherever the preceding
modules of the account or the auth type are configured to complain about an expired
password.
As the final step, the modules of the session type, bundled in the common-session
file are called to configure the session according to the settings for the user in question.
Although pam_unix2 is processed again, it has no practical consequences due to its
none option specified in the respective configuration file of this module, pam_unix2
27.3.1 pam_unix2.conf
The traditional password-based authentication method is controlled by the PAM module
pam_unix2. It can read the necessary data from /etc/passwd, /etc/shadow,
NIS maps, NIS+ tables, or an LDAP database. The behavior of this module can be in-
fluenced by configuring the PAM options of the individual application itself or globally
by editing /etc/security/pam_unix2.conf. A very basic configuration file
for the module is shown in Example 27.6, “pam_unix2.conf” (page 500).
The nullok option for module types auth and password specifies that empty
passwords are permitted for the corresponding type of account. Users are also allowed
to change passwords for their accounts. The none option for the module type session
specifies that no messages are logged on its behalf (this is the default). Learn about
additional configuration options from the comments in the file itself and from the
manual page pam_unix2(8).
VARIABLE
Name of the environment variable to set.
[DEFAULT=[value]]
Default value the administrator wants set.
[OVERRIDE=[value]]
Values that may be queried and set by pam_env, overriding the default value.
A typical example of how pam_env can be used is the adaptation of the DISPLAY
variable, which is changed whenever a remote login takes place. This is shown in Ex-
ample 27.7, “pam_env.conf” (page 501).
The first line sets the value of the REMOTEHOST variable to localhost, which is
used whenever pam_env cannot determine any other value. The DISPLAY variable
in turn contains the value of REMOTEHOST. Find more information in the comments
in the file /etc/security/pam_env.conf.
27.3.3 pam_pwcheck.conf
This configuration file is for the pam_pwcheck module, which reads options from it
for all password type modules. Settings stored in this file take precedence over the
PAM settings of an individual application. If application-specific settings have not been
defined, the application uses the global settings. Example 27.8, “pam_pwcheck.conf”
(page 502) tells pam_pwcheck to allow empty passwords and modification of pass-
words. More options for the module are mentioned in the file /etc/security/pam
_pwcheck.conf.
27.3.4 limits.conf
System limits can be set on a user or group basis in the file limits.conf, which is
read by the pam_limits module. The file allows you to set hard limits, which may
not be exceeded at all, and soft limits, which may be exceeded temporarily. To learn
about the syntax and the available options, read the comments included in the file.
READMEs
In the top level of this directory, there are some general README files. The sub-
directory modules holds README files about the available PAM modules.
Thorsten Kukuk has developed a number of PAM modules and made some information
available about them at http://www.suse.de/~kukuk/pam/.
►zseries: The features and hardware described in this chapter do not exist on IBM
System z, making this chapter irrelevant for these platforms. ◄
APM had been used in many older computers. Because APM largely consists of a
function set implemented in the BIOS, the level of APM support may vary depending
on the hardware. This is even more true of ACPI, which is even more complex. For
this reason, it is virtually impossible to recommend one over the other. Simply test the
various procedures on your hardware then select the technology that is best supported.
Standby
This operating mode turns off the display. On some computers, the processor per-
formance is throttled. This function corresponds to the ACPI state S1 or S2.
Battery Monitor
ACPI and APM check the battery charge status and provide information about it.
Additionally, both systems coordinate actions to perform when a critical charge
status is reached.
Automatic Power-Off
Following a shutdown, the computer is powered off. This is especially important
when an automatic shutdown is performed shortly before the battery is empty.
28.2 APM
Some of the power saving functions are performed by the APM BIOS itself. On many
laptops, standby and suspend states can be activated with key combinations or by
closing the lid without any special operating system function. However, to activate
these modes with a command, certain actions must be triggered before the system is
suspended. To view the battery charge level, you need special program packages and
a suitable kernel.
SUSE Linux Enterprise® kernels have built-in APM support. However, APM is only
activated if ACPI is not implemented in the BIOS and an APM BIOS is detected. To
activate APM support, ACPI must be disabled with acpi=off at the boot prompt.
Enter cat /proc/apm to check if APM is active. An output consisting of various
numbers indicates that everything is OK. You should now be able to shut down the
computer with the command shutdown -h.
BIOS implementations that are not fully standard-compliant can cause problems with
APM. Some problems can be circumvented with special boot parameters. All parameters
are entered at the boot prompt in the form of apm=parameter with parameter
being one of:
(no-)allow-ints
Allow interrupts during the execution of BIOS functions.
(no-)broken-psr
The “GetPowerStatus” function of the BIOS does not work properly.
(no-)realmode-power-off
Reset processor to real mode prior to shutdown.
(no-)debug
Log APM events in system log.
(no-)power-off
Power system off after shutdown.
bounce-interval=n
Time in hundredths of a second after a suspend event during which additional
suspend events are ignored.
idle-threshold=n
System inactivity percentage from which the BIOS function idle is executed
(0=always, 100=never).
idle-period=n
Time in hundredths of a second after which the system activity is measured.
The APM daemon (apmd) is no longer used. Its functionality is now handled by the
new powersaved, which also supports ACPI and provides many other features.
The BIOS provides tables containing information about the individual components and
hardware access methods. The operating system uses this information for tasks like
assigning interrupts or activating and deactivating components. Because the operating
system executes commands stored in the BIOS, the functionality depends on the BIOS
implementation. The tables ACPI can detect and load are reported in /var/log/boot
.msg. See Section 28.3.4, “Troubleshooting” (page 512) for more information about
troubleshooting ACPI problems.
Subsequently, a number of modules must be loaded. This is done by the start script of
acpid. If any of these modules cause problems, the respective module can be excluded
from loading or unloading in /etc/sysconfig/powersave/common. The system
log (/var/log/messages) contains the messages of the modules, enabling you to
see which components were detected.
/proc/acpi now contains a number of files that provide information about the system
state or can be used to change some of the states. Some features do not work yet because
they are still under development and the support of some functions largely depends on
the implementation of the manufacturer.
All files (except dsdt and fadt) can be read with cat. In some files, settings can be
modified with echo, for example, echo X > file to specify suitable values for
X. One possibility for easy access to those values is the powersave command, which
acts as a front-end for the Powersave daemon. The following describes the most impor-
tant files:
/proc/acpi/alarm
Here, specify when the system should wake from a sleep state. Currently, this feature
is not fully supported.
/proc/acpi/sleep
Provides information about possible sleep states.
/proc/acpi/event
All events are reported here and processed by the Powersave daemon
(powersaved). If no daemon accesses this file, events, such as a brief click on
the power button or closing the lid, can be read with cat /proc/acpi/event
(terminate with Ctrl + C).
/proc/acpi/ac_adapter/AC/state
Shows whether the AC adapter is connected.
/proc/acpi/battery/BAT*/{alarm,info,state}
Detailed information about the battery state. The charge level is read by comparing
the last full capacity from info with the remaining capacity
from state. A more comfortable way to do this is to use one of the special pro-
grams introduced in Section 28.3.3, “ACPI Tools” (page 512). The charge level at
which a battery event (such as warning, low and critical) is triggered can be specified
in alarm.
/proc/acpi/button
This directory contains information about various switches, like the laptop lid and
buttons.
/proc/acpi/fan/FAN/state
Shows if the fan is currently active. Activate or deactivate the fan manually by
writing 0 (on) or 3 (off) into this file. However, both the ACPI code in the kernel
/proc/acpi/processor/*
A separate subdirectory is kept for each CPU included in your system.
/proc/acpi/processor/*/info
Information about the energy saving options of the processor.
/proc/acpi/processor/*/power
Information about the current processor state. An asterisk next to C2 indicates that
the processor is idle. This is the most frequent state, as can be seen from the usage
value.
/proc/acpi/processor/*/throttling
Can be used to set the throttling of the processor clock. Usually, throttling is possible
in eight levels. This is independent of the frequency control of the CPU.
/proc/acpi/processor/*/limit
If the performance (outdated) and the throttling are automatically controlled by a
daemon, the maximum limits can be specified here. Some of the limits are deter-
mined by the system. Some can be adjusted by the user.
/proc/acpi/thermal_zone/
A separate subdirectory exists for every thermal zone. A thermal zone is an area
with similar thermal properties whose number and names are designated by the
hardware manufacturer. However, many of the possibilities offered by ACPI are
rarely implemented. Instead, the temperature control is handled conventionally by
the BIOS. The operating system is not given much opportunity to intervene, because
the life span of the hardware is at stake. Therefore, some of the files only have a
theoretical value.
/proc/acpi/thermal_zone/*/temperature
Current temperature of the thermal zone.
/proc/acpi/thermal_zone/*/state
The state indicates if everything is ok or if ACPI applies active or passive
cooling. In the case of ACPI-independent fan control, this state is always ok.
/proc/acpi/thermal_zone/*/trip_points
Enables the determination of temperature limits for triggering specific actions, like
passive or active cooling, suspension (hot), or a shutdown (critical). The
possible actions are defined in the DSDT (device-dependent). The trip points deter-
mined in the ACPI specification are critical, hot, passive, active1, and
active2. Even if not all of them are implemented, they must always be entered
in this file in this order. For example, the entry echo 90:0:70:0:0 >
trip_points sets the temperature for critical to 90 and the temperature
for passive to 70 (all temperatures measured in degrees Celsius).
/proc/acpi/thermal_zone/*/polling_frequency
If the value in temperature is not updated automatically when the temperature
changes, toggle the polling mode here. The command echo X >
/proc/acpi/thermal_zone/*/polling_frequency causes the temper-
ature to be queried every X seconds. Set X=0 to disable polling.
None of these settings, information, and events need to be edited manually. This can
be done with the Powersave daemon (powersaved) and its various front-ends, like
powersave, kpowersave, and wmpowersave. See Section 28.3.3, “ACPI Tools”
(page 512).
userspace governor
If the userspace governor is set, the kernel gives the control of CPU frequency
scaling to a userspace application, usually a daemon. In SUSE Linux Enterprise
distributions, this daemon is the powersaved package. When this implemen-
tation is used, the CPU frequency is adjusted in regard to the current system
load. By default, one of the kernel implementations is used. However, on some
hardware or in regard to specific processors or drivers, the userspace implemen-
tation is still the only working solution.
ondemand governor
This is the kernel implementation of a dynamic CPU frequency policy and
should work on most systems. As soon as there is a high system load, the CPU
frequency is immediately increased. It is lowered on a low system load.
conservative governor
This governor is similar to the on demand implementation, except that a more
conservative policy is used. The load of the system must be high for a specific
amount of time before the CPU frequency is increased.
powersave governor
The cpu frequency is statically set to the lowest possible.
performance governor
The cpu frequency is statically set to the highest possible.
Frequency scaling and throttling are only relevant if the processor is busy, because the
most economic C state is applied anyway when the processor is idle. If the CPU is busy,
frequency scaling is the recommended power saving method. Often the processor only
works with a partial load. In this case, it can be run with a lower frequency. Usually,
dynamic frequency scaling controlled by the kernel on demand governor or a daemon,
such as powersaved, is the best approach. A static setting to a low frequency is useful
for battery operation or if you want the computer to be cool or quiet.
Throttling should be used as the last resort, for example, to extend the battery operation
time despite a high system load. However, some systems do not run smoothly when
they are throttled too much. Moreover, CPU throttling does not make sense if the CPU
has little to do.
In SUSE Linux Enterprise these technologies are controlled by the powersave daemon.
The configuration is explained in Section 28.5, “The powersave Package” (page 515).
28.3.4 Troubleshooting
There are two different types of problems. On one hand, the ACPI code of the kernel
may contain bugs that were not detected in time. In this case, a solution will be made
available for download. More often, however, the problems are caused by the BIOS.
Sometimes, deviations from the ACPI specification are purposely integrated in the
BIOS to circumvent errors in the ACPI implementation in other widespread operating
systems. Hardware components that have serious errors in the ACPI implementation
are recorded in a blacklist that prevents the Linux kernel from using ACPI for these
components.
pci=noacpi
Do not use ACPI for configuring the PCI devices.
acpi=ht
Only perform a simple resource configuration. Do not use ACPI for other purposes.
acpi=off
Disable ACPI.
Some newer machines (especially SMP systems and AMD64 systems) need ACPI
for configuring the hardware correctly. On these machines, disabling ACPI can
cause problems.
Monitor the boot messages of the system with the command dmesg | grep -2i
acpi (or all messages, because the problem may not be caused by ACPI) after booting.
If an error occurs while parsing an ACPI table, the most important table—the DS-
DT—can be replaced with an improved version. In this case, the faulty DSDT of the
BIOS is ignored. The procedure is described in Section 28.5.4, “Troubleshooting”
(page 522).
In the kernel configuration, there is a switch for activating ACPI debug messages. If a
kernel with ACPI debugging is compiled and installed, experts searching for an error
can be supported with detailed information.
• http://www.intel.com/technology/iapc/acpi/faq.htm (ACPI
FAQ @Intel)
The hdparm application can be used to modify various hard disk settings. The option
-y instantly switches the hard disk to the standby mode. -Y puts it to sleep. hdparm
-S x causes the hard disk to be spun down after a certain period of inactivity. Replace
x as follows: 0 disables this mechanism, causing the hard disk to run continuously.
Values from 1 to 240 are multiplied by 5 seconds. Values from 241 to 251 correspond
to 1 to 11 times 30 minutes.
Internal power saving options of the hard disk can be controlled with the option -B.
Select a value from 0 to 255 for maximum saving to maximum throughput. The result
depends on the hard disk used and is difficult to assess. To make a hard disk quieter,
use the option -M. Select a value from 128 to 254 for quiet to fast.
Often, it is not so easy to put the hard disk to sleep. In Linux, numerous processes write
to the hard disk, waking it up repeatedly. Therefore, it is important to understand how
Linux handles data that needs to be written to the hard disk. First, all data is buffered
Changes to the kernel update daemon settings endanger the data integrity.
Apart from these processes, journaling file systems, like ReiserFS and Ext3, write their
metadata independently from bdflush, which also prevents the hard disk from spinning
down. To avoid this, a special kernel extension has been developed for mobile devices.
See /usr/src/linux/Documentation/laptop-mode.txt for details.
Another important factor is the way active programs behave. For example, good editors
regularly write hidden backups of the currently modified file to the hard disk, causing
the disk to wake up. Features like this can be disabled at the expense of data integrity.
In this connection, the mail daemon postfix makes use of the variable
POSTFIX_LAPTOP. If this variable is set to yes, postfix accesses the hard disk far
less frequently. However, this is irrelevant if the interval for kupdated was increased.
This package contains all power management features of your computer. It supports
hardware using ACPI, APM, IDE hard disks, and PowerNow! or SpeedStep technologies.
The functions from the packages apmd, acpid, ospmd, and cpufreqd (now
cpuspeed) have been consolidated in the powersave package. Daemons from these
Even if your system does not contain all the hardware elements listed above, use the
powersave daemon for controlling the power saving function. Because ACPI and APM
are mutually exclusive, you can only use one of these systems on your computer. The
daemon automatically detects any changes in the hardware configuration.
/etc/sysconfig/powersave/common
This file contains general settings for the powersave daemon. For example, the
amount of debug messages in /var/log/messages can be increased by increas-
ing the value of the variable DEBUG.
/etc/sysconfig/powersave/events
The powersave daemon needs this file for processing system events. An event can
be assigned external actions or actions performed by the daemon itself. For external
actions, the daemon tries to run an executable file (usually a Bash script) in /usr/
lib/powersave/scripts/. Predefined internal actions are:
• ignore
• throttle
• dethrottle
• suspend_to_disk
• suspend_to_ram
• standby
• do_suspend_to_disk
• do_suspend_to_ram
• notify
• screen_saver
• reread_cpu_capabilities
switch_vt
Useful if the screen is displaced after a suspend or standby.
wm_logout
Saves the settings and logs out from GNOME, KDE, or other window managers.
wm_shutdown
Saves the GNOME or KDE settings and shuts down the system.
set_disk_settings
Executes the disk settings made in /etc/sysconfig/powersave/disk.
/etc/sysconfig/powersave/cpufreq
Contains variables for optimizing the dynamic CPU frequency settings and whether
the user space or the kernel implementation should be used.
/etc/sysconfig/powersave/battery
Contains battery limits and other battery-specific settings.
/etc/sysconfig/powersave/sleep
In this file, activate the sleep modes and determine which critical modules should
be unloaded and which services should be stopped prior to a suspend or standby
event. When the system is resumed, these modules are reloaded and the services
are restarted. You can even delay a triggered sleep mode, for example, to save files.
The default settings mainly concern USB and PCMCIA modules. A failure of
suspend or standby is usually caused by certain modules. See Section 28.5.4,
“Troubleshooting” (page 522) for more information about identifying the error.
/etc/sysconfig/powersave/thermal
Activates cooling and thermal control. Details about this subject are available in
the file /usr/share/doc/packages/powersave/README.thermal.
/etc/sysconfig/powersave/disk
This configuration file controls the actions and settings made regarding the hard
disk.
/etc/sysconfig/powersave/scheme_*
These are the various schemes that adapt the power consumption to certain deploy-
ment scenarios. A number of schemes are preconfigured and can be used as they
are. Custom schemes can be saved here.
This sleep mode is enabled by default, but it is only executed if the current machine
is listed in a database as capable of supporting this mode. This database is contained
in the /usr/sbin/s2ram binary provided by the suspend package.
To modify the default parameters (for example, to generally disable the suspend
to ram sleep mode or to force it even for machines not listed in the database),
find more information about available options in the /etc/sysconfig/
powersave/sleep configuration file.
To learn more about the s2ram binary, refer to the README files in /usr/
share/doc/packages/suspend.
Make sure that the following default options are set in the file /etc/sysconfig/
powersave/events for the correct processing of suspend, standby, and resume
(default settings following the installation of SUSE Linux Enterprise):
EVENT_GLOBAL_SUSPEND2DISK=
"prepare_suspend_to_disk screen_saver do_suspend_to_disk"
EVENT_GLOBAL_SUSPEND2RAM=
"prepare_suspend_to_ram screen_saver do_suspend_to_ram"
EVENT_GLOBAL_STANDBY=
"prepare_standby screen_saver do_standby"
BATTERY_WARNING=12
BATTERY_LOW=7
BATTERY_CRITICAL=2
The actions or scripts to execute when the charge levels drop under the specified limits
are defined in the configuration file /etc/sysconfig/powersave/events.
The standard actions for buttons can be modified as described in Section 28.5.1,
“Configuring the powersave Package” (page 516).
EVENT_BATTERY_NORMAL="ignore"
EVENT_BATTERY_WARNING="notify"
EVENT_BATTERY_LOW="notify"
EVENT_BATTERY_CRITICAL="wm_shutdown"
The actions to execute when the computer is disconnected from or connected to the AC
power supply are defined in /etc/sysconfig/powersave/events. Select the
schemes to use in /etc/sysconfig/powersave/common:
AC_SCHEME="performance"
BATTERY_SCHEME="powersave"
EVENT_BUTTON_POWER="wm_shutdown"
When the power button is pressed, the system responds by shutting down the re-
spective window manager (KDE, GNOME, fvwm, etc.).
EVENT_BUTTON_SLEEP="suspend_to_disk"
When the sleep button is pressed, the system is set to the suspend-to-disk mode.
EVENT_BUTTON_LID_OPEN="ignore"
Nothing happens when the lid is opened.
EVENT_BUTTON_LID_CLOSED="screen_saver"
When the lid is closed, the screen saver is activated.
EVENT_OTHER="ignore"
This event happens if an unknown event is encountered by the daemon. Unknown
events include ACPI hot keys on some machines.
Further throttling of the CPU performance is possible if the CPU load does not exceed
a specified limit for a specified time. Specify the load limit in
PROCESSOR_IDLE_LIMIT and the time-out in CPU_IDLE_TIMEOUT. If the CPU
load stays below the limit longer than the time-out, the event configured in
EVENT_PROCESSOR_IDLE is activated. If the CPU is busy again,
EVENT_PROCESSOR_BUSY is executed.
2 If the file extension of the downloaded table is .asl (ACPI source language),
compile it with iasl (package pmtools). Enter the command iasl -sa
file.asl. The latest version of iasl (Intel ACPI compiler) is available at
http://developer.intel.com/technology/iapc/acpi/
downloads.htm.
On ACPI and APM systems: When the system tries to unload faulty modules, the system
is arrested or the suspend event is not triggered. The same can also happen if you do
not unload modules or stop services that prevent a successful suspend. In both cases,
try to identify the faulty module that prevented the sleep mode. The log files generated
by the powersave daemon in /var/log/suspend2ram.log and /var/log/
suspend2disk.log are very helpful in this regard. If the computer does not enter
the sleep mode, the cause lies in the last module unloaded. Manipulate the following
settings in /etc/sysconfig/powersave/sleep to unload problematic modules
prior to a suspend or standby.
UNLOAD_MODULES_BEFORE_SUSPEND2DISK=""
UNLOAD_MODULES_BEFORE_SUSPEND2RAM=""
UNLOAD_MODULES_BEFORE_STANDBY=""
SUSPEND2DISK_RESTART_SERVICES=""
SUSPEND2RAM_RESTART_SERVICES=""
STANDBY_RESTART_SERVICES=""
• http://www.opensuse.org/Projects_Powersave—Project page in
the openSUSE wiki
In the scheme overview, select the scheme to modify then click Edit. To create a new
scheme, click Add. The dialog that opens is the same in both cases and is shown in
Figure 28.3, “Configuring a Scheme” (page 526).
First, enter a suitable name and description for the new or edited scheme. Determine if
and how the CPU performance should be controlled for this scheme. Decide if and to
what extent frequency scaling and throttling should be used and whether processes with
low priority (niced processes) should be ignored when adjusting the CPU frequency.
In the following dialog for the hard disk, define a Standby Policy for maximum perfor-
mance or for energy saving. The Acoustic Policy controls the noise level of the hard
disk (supported by few hard disks). The Cooling Policy determines the cooling method
to use. Unfortunately, this type of thermal control is rarely supported by the BIOS.
Read /usr/share/doc/packages/powersave/powersave_manual.html
#Thermal to learn how you can use the fan and passive cooling methods.
Global power management settings can also be made from the initial dialog using Battery
Warning, ACPI Settings, or Suspend Permissions. Access these controls by clicking
Other Settings and selecting the appropriate item from the menu. Click Battery Warning
to access the dialog for the battery charge level, shown in Figure 28.4, “Battery Charge
Level” (page 527).
The BIOS of your system notifies the operating system whenever the charge level drops
under certain configurable limits. In this dialog, define three limits: Warning Capacity,
Low Capacity, and Critical Capacity. Specific actions are triggered when the charge
level drops under these limits. Usually, the first two states merely trigger a notification
to the user. The third critical level triggers a shutdown, because the remaining energy
is not sufficient for continued system operation. Select suitable charge levels and the
desired actions then click OK to return to the start dialog.
Access the dialog for configuring the ACPI buttons using ACPI Settings. It is shown
in Figure 28.5, “ACPI Settings” (page 528). The settings for the ACPI buttons determine
how the system should respond to certain switches. Configure the system response to
pressing the power button, pressing the sleep button, and closing the laptop lid. Click
OK to complete the configuration and return to the start dialog.
Click Enable Suspend to enter a dialog in which to determine if and how users of this
system may use the suspend or standby functionality. Click OK to return to the main
dialog. Click OK again to exit the module and confirm your power management settings.
Additionally, there are proprietary standards, like the 802.11b variation of Texas Instru-
ments with a maximum transmission rate of 22 Mbit/s (sometimes referred to as
802.11b+). However, the popularity of cards using this standard is limited.
29.1.1 Hardware
802.11 cards are not supported by SUSE Linux Enterprise®. Most cards using 802.11a,
802.11b, and 802.11g are supported. New cards usually comply with the 802.11g
standard, but cards using 802.11b are still available. Normally, cards with the following
chips are supported:
• Intersil Prism2/2.5/3
• Intersil PrismGT
• Lucent/Agere Hermes
• ZyDAS zd1201
A number of older cards that are rarely used and no longer available are also supported.
An extensive list of WLAN cards and the chips they use is available at the Web site of
AbsoluteValue Systems at http://www.linux-wlan.org/docs/wlan
_adapters.html.gz. Find an overview of the various WLAN chips at http://
wiki.uni-konstanz.de/wiki/bin/view/Wireless/ListeChipsatz.
Some cards need a firmware image that must be loaded into the card when the driver
is initialized. This is the case with Intersil PrismGT, Atmel, and TI ACX100 and
ACX111. The firmware can easily be installed with the YaST Online Update. The
firmware for Intel PRO/Wireless cards ships with SUSE Linux Enterprise and is auto-
matically installed by YaST as soon as a card of this type is detected. More information
about this subject is available in the installed system in /usr/share/doc/
packages/wireless-tools/README.firmware.
29.1.2 Function
In wireless networking, various techniques and configurations are used to ensure fast,
high-quality, and secure connections. Different operating types suit different setups. It
can be difficult to choose the right authentication method. The available encryption
methods have different advantages and pitfalls.
Operating Mode
Basically, wireless networks can be classified as managed networks and ad-hoc networks.
Managed networks have a managing element: the access point. In this mode (also re-
ferred to as infrastructure mode), all connections of the WLAN stations in the network
run over the access point, which may also serve as a connection to an ethernet. Ad-hoc
networks do not have an access point. The stations communicate directly with each
other. The transmission range and number of participating stations are greatly limited
in ad-hoc networks. Therefore, an access point is usually more efficient. It is even
possible to use a WLAN card as an access point. Most cards support this functionality.
Because a wireless network is much easier to intercept and compromise than a wired
network, the various standards include authentication and encryption methods. In the
original version of the IEEE 802.11 standard, these are described under the term WEP.
Authentication
To make sure that only authorized stations can connect, various authentication mecha-
nisms are used in managed networks:
Open
An open system is a system that does not require authentication. Any station can
join the network. Nevertheless, WEP encryption (see Section “Encryption”
(page 533)) can be used.
WPA-EAP needs a Radius server to authenticate users. EAP offers three different
methods for connecting and authenticating to the server: TLS (Transport Layer
Security), TTLS (Tunneled Transport Layer Security), and PEAP (Protected Exten-
sible Authentication Protocol). In a nutshell, these options work as follows:
EAP-TLS
TLS authentication relies on the mutual exchange of certificates both for
server and client. First, the server presents its certificate to the client where it
is evaluated. If the certificate is considered valid, the client in turn presents its
certificate to the server. While TLS is secure, it requires a working certification
management infrastructure in your network. This infrastructure is rarely found
in private networks.
Encryption
There are various encryption methods to ensure that no unauthorized person can read
the data packets that are exchanged in a wireless network or gain access to the network:
Operating Mode
A station can be integrated in a WLAN in three different modes. The suitable mode
depends on the network in which to communicate: Ad-hoc (peer-to-peer network
without access point), Managed (network is managed by an access point), or
Master (your network card should be used as the access point). To use any of the
WPA-PSK or WPA-EAP modes, the operating mode must be set to managed.
Authentication Mode
Select a suitable authentication method for your network: Open, Shared Key, WPA-
PSK, or WPA-EAP. If you select WPA authentication, a network name must be
set.
Expert Settings
This button opens a dialog for the detailed configuration of your WLAN connection.
A detailed description of this dialog is provided later.
After completing the basic settings, your station is ready for deployment in the WLAN.
Depending on the selected authentication method, YaST prompts you to fine-tune the
settings in another dialog. For Open, there is nothing to configure, because this setting
implements unencrypted operation without authentication.
Shared Key
Set a key input type. Choose from Passphrase, ASCII, or Hexadecimal. You may
keep up to four different keys to encrypt the transmitted data. Click WEP Keys to
enter the key configuration dialog. Set the length of the key: 128 bit or 64 bit. The
default setting is 128 bit. In the list area at the bottom of the dialog, up to four dif-
ferent keys can be specified for your station to use for the encryption. Press Set as
Default to define one of them as the default key. Unless you change this, YaST
uses the first entered key as the default key. If the standard key is deleted, one of
the other keys must be marked manually as the default key. Click Edit to modify
existing list entries or create new keys. In this case, a pop-up window prompts you
to select an input type (Passphrase, ASCII, or Hexadecimal). If you select
Passphrase, enter a word or a character string from which a key is generated ac-
WPA-PSK
To enter a key for WPA-PSK, select the input method Passphrase or Hexadecimal.
In the Passphrase mode, the input must be 8 to 63 characters. In the Hexadecimal
mode, enter 64 characters.
WPA-EAP
Enter the credentials you have been given by your network administrator. For TLS,
provide Identity, Client Certificate, Client Key, and Server Certificate. TTLS and
PEAP require Identity and Password. Server Certificate and Anonymous Identity
are optional. YaST searches for any certificate under /etc/cert, so save the
certificates given to you to this location and restrict access to these files to 0600
(owner read and write).
Click Details to enter the advanced authentication dialog for your WPA-EAP setup.
Select the authentication method for the second stage of EAP-TTLS or EAP-PEAP
communication. If you selected TTLS in the previous dialog, choose any, MD5,
GTC, CHAP, PAP, MSCHAPv1, or MSCHAPv2. If you selected PEAP, choose any,
MD5, GTC, or MSCHAPv2. PEAP version can be used to force the use of a certain
PEAP implementation if the automatically-determined setting does not work for
you.
Click Expert Settings to leave the dialog for the basic configuration of the WLAN
connection and enter the expert configuration. The following options are available in
this dialog:
Channel
The specification of a channel on which the WLAN station should work is only
needed in Ad-hoc and Master modes. In Managed mode, the card automatically
searches the available channels for access points. In Ad-hoc mode, select one of
the 12 offered channels for the communication of your station with the other stations.
In Master mode, determine on which channel your card should offer access point
functionality. The default setting for this option is Auto.
Bit Rate
Depending on the performance of your network, you may want to set a certain bit
rate for the transmission from one point to another. In the default setting Auto, the
Access Point
In an environment with several access points, one of them can be preselected by
specifying the MAC address.
29.1.4 Utilities
hostap (package hostap) is used to run a WLAN card as an access point. More infor-
mation about this package is available at the project home page (http://hostap
.epitest.fi/).
kismet (package kismet) is a network diagnosis tool with which to listen to the WLAN
packet traffic. In this way, you can also detect any intrusion attempts in your network.
More information is available at http://www.kismetwireless.net/ and in
the manual page.
29.1.6 Troubleshooting
If your WLAN card fails to respond, check if you have downloaded the needed firmware.
Refer to Section 29.1.1, “Hardware” (page 530). The following paragraphs cover some
known problems.
WPA
WPA support is quite new in SUSE Linux Enterprise and still under development. Thus,
YaST does not support the configuration of all WPA authentication methods. Not all
wireless LAN cards and drivers support WPA. Some cards need a firmware update to
enable WPA. If you want to use WPA, read /usr/share/doc/packages/
wireless-tools/README.wpa.
Linux and other Unix operating systems use the TCP/IP protocol. It is not a single
network protocol, but a family of network protocols that offer various services. The
protocols listed in Table 30.1, “Several Protocols in the TCP/IP Protocol Family”
(page 544) are provided for the purpose of exchanging data between two machines via
TCP/IP. Networks combined by TCP/IP, comprising a worldwide network are also re-
ferred to, in their entirety, as “the Internet.”
RFC stands for Request for Comments. RFCs are documents that describe various In-
ternet protocols and implementation procedures for the operating system and its appli-
cations. The RFC documents describe the setup of Internet protocols. To expand your
knowledge about any of the protocols, refer to the appropriate RFC documents. They
are available online at http://www.ietf.org/rfc.html.
Protocol Description
As shown in Figure 30.1, “Simplified Layer Model for TCP/IP” (page 545), data ex-
change takes place in different layers. The actual network layer is the insecure data
transfer via IP (Internet protocol). On top of IP, TCP (transmission control protocol)
guarantees, to a certain extent, security of the data transfer. The IP layer is supported
by the underlying hardware-dependent protocol, such as ethernet.
Data Transfer
The diagram provides one or two examples for each layer. The layers are ordered ac-
cording to abstraction levels. The lowest layer is very close to the hardware. The upper-
most layer, however, is almost a complete abstraction from the hardware. Every layer
has its own special function. The special functions of each layer are mostly implicit in
their description. The data link and physical layers represent the physical network used,
such as ethernet.
Almost all hardware protocols work on a packet-oriented basis. The data to transmit is
packaged in packets, because it cannot be sent all at once. The maximum size of a
TCP/IP packet is approximately 64 KB. Packets are normally quite a bit smaller, because
the network hardware can be a limiting factor. The maximum size of a data packet on
an ethernet is about fifteen hundred bytes. The size of a TCP/IP packet is limited to this
amount when the data is sent over an ethernet. If more data is transferred, more data
packets need to be sent by the operating system.
For the layers to serve their designated functions, additional information regarding each
layer must be saved in the data packet. This takes place in the header of the packet.
Every layer attaches a small block of data, called the protocol header, to the front of
each emerging packet. A sample TCP/IP data packet traveling over an ethernet cable
is illustrated in Figure 30.2, “TCP/IP Ethernet Packet” (page 546). The proof sum is
When an application sends data over the network, the data passes through each layer,
all implemented in the Linux kernel except the physical layer. Each layer is responsible
for preparing the data so it can be passed to the next layer. The lowest layer is ultimately
responsible for sending the data. The entire procedure is reversed when data is received.
Like the layers of an onion, in each layer the protocol headers are removed from the
transported data. Finally, the transport layer is responsible for making the data available
for use by the applications at the destination. In this manner, one layer only communi-
cates with the layer directly above or below it. For applications, it is irrelevant whether
data is transmitted via a 100 Mbit/s FDDI network or via a 56-Kbit/s modem line.
Likewise, it is irrelevant for the data line which kind of data is transmitted, as long as
packets are in the correct format.
In decimal form, the four bytes are written in the decimal number system, separated by
periods. The IP address is assigned to a host or a network interface. It cannot be used
anywhere else in the world. There are exceptions to this rule, but these are not relevant
in the following passages.
The points in IP addresses indicate the hierarchical system. Until the 1990s, IP addresses
were strictly categorized in classes. However, this system has proven too inflexible and
was discontinued. Now, classless routing (CIDR, classless interdomain routing) is used.
To understand how the netmask works, look at Example 30.2, “Linking IP Addresses
to the Netmask” (page 548). The netmask consists of 32 bits that identify how much of
an IP address belongs to the network. All those bits that are 1 mark the corresponding
bit in the IP address as belonging to the network. All bits that are 0 mark bits inside
the subnetwork. This means that the more bits are 1, the smaller the subnetwork is.
Because the netmask always consists of several successive 1 bits, it is also possible to
just count the number of bits in the netmask. In Example 30.2, “Linking IP Addresses
to the Netmask” (page 548) the first net with 24 bits could also be written as
192.168.0.0/24.
To give another example: all machines connected with the same ethernet cable are
usually located in the same subnetwork and are directly accessible. Even when the
subnet is physically divided by switches or bridges, these hosts can still be reached di-
rectly.
IP addresses outside the local subnet can only be reached if a gateway is configured
for the target network. In the most common case, there is only one gateway that handles
all traffic that is external. However, it is also possible to configure several gateways
for different subnets.
If a gateway has been configured, all external IP packets are sent to the appropriate
gateway. This gateway then attempts to forward the packets in the same manner—from
host to host—until it reaches the destination host or the packet's TTL (time to live) ex-
pires.
Base Network Ad- This is the netmask AND any address in the network, as shown
dress in Example 30.2, “Linking IP Addresses to the Netmask”
(page 548) under Result. This address cannot be assigned to
any hosts.
Broadcast Address This basically says, “Access all hosts in this subnetwork.” To
generate this, the netmask is inverted in binary form and linked
to the base network address with a logical OR. The above ex-
Because IP addresses must be unique all over the world, you cannot just select random
addresses. There are three address domains to use if you want to set up a private IP-
based network. These cannot get any connection from the rest of the Internet, because
they cannot be transmitted over the Internet. These address domains are specified in
RFC 1597 and listed in Table 30.3, “Private IP Address Domains” (page 549).
Network/Netmask Domain
10.0.0.0/255.0.0.0 10.x.x.x
192.168.0.0/255.255.0.0 192.168.x.x
IPv6 is not supported by the CTC and IUCV network connections of the IBM
System z hardware.
Due to the emergence of the WWW (World Wide Web), the Internet has experienced
explosive growth with an increasing number of computers communicating via TCP/IP
in the past fifteen years. Since Tim Berners-Lee at CERN (http://public.web
As mentioned, an IPv4 address consists of only 32 bits. Also, quite a few IP addresses
are lost—they cannot be used due to the way in which networks are organized. The
number of addresses available in your subnet is two to the power of the number of bits,
minus two. A subnetwork has, for example, 2, 6, or 14 addresses available. To connect
128 hosts to the Internet, for example, you need a subnetwork with 256 IP addresses,
from which only 254 are usable, because two IP addresses are needed for the structure
of the subnetwork itself: the broadcast and the base network address.
Under the current IPv4 protocol, DHCP or NAT (network address translation) are the
typical mechanisms used to circumvent the potential address shortage. Combined with
the convention to keep private and public address spaces separate, these methods can
certainly mitigate the shortage. The problem with them lies in their configuration, which
is a chore to set up and a burden to maintain. To set up a host in an IPv4 network, you
need a number of address items, such as the host's own IP address, the subnetmask, the
gateway address, and maybe a name server address. All these items need to be known
and cannot be derived from somewhere else.
With IPv6, both the address shortage and the complicated configuration should be a
thing of the past. The following sections tell more about the improvements and benefits
brought by IPv6 and about the transition from the old protocol to the new one.
30.2.1 Advantages
The most important and most visible improvement brought by the new protocol is the
enormous expansion of the available address space. An IPv6 address is made up of 128
bit values instead of the traditional 32 bits. This provides for as many as several
quadrillion IP addresses.
However, IPv6 addresses are not only different from their predecessors with regard to
their length. They also have a different internal structure that may contain more specific
information about the systems and the networks to which they belong. More details
about this are found in Section 30.2.2, “Address Types and Structure” (page 552).
Mobility
IPv6 makes it possible to assign several addresses to one network interface at the
same time. This allows users to access several networks easily, something that
could be compared with the international roaming services offered by mobile phone
companies: when you take your mobile phone abroad, the phone automatically
logs in to a foreign service as soon as it enters the corresponding area, so you can
be reached under the same number everywhere and are able to place an outgoing
call just like in your home area.
Secure Communication
With IPv4, network security is an add-on function. IPv6 includes IPsec as one of
its core features, allowing systems to communicate over a secure tunnel to avoid
eavesdropping by outsiders on the Internet.
Backward Compatibility
Realistically, it would be impossible to switch the entire Internet from IPv4 to IPv6
at one time. Therefore, it is crucial that both protocols are able to coexist not only
on the Internet, but also on one system. This is ensured by compatible addresses
(IPv4 addresses can easily be translated into IPv6 addresses) and through the use
of a number of tunnels. See Section 30.2.3, “Coexistence of IPv4 and IPv6”
(page 556). Also, systems can rely on a dual stack IP technique to support both
protocols at the same time, meaning that they have two network stacks that are
completely separate, such that there is no interference between the two protocol
versions.
When dealing with IPv6, it is useful to know about three different types of addresses:
Unicast
Addresses of this type are associated with exactly one network interface. Packets
with such an address are delivered to only one destination. Accordingly, unicast
addresses are used to transfer packets to individual hosts on the local network or
the Internet.
Multicast
Addresses of this type relate to a group of network interfaces. Packets with such
an address are delivered to all destinations that belong to the group. Multicast ad-
dresses are mainly used by certain network services to communicate with certain
groups of hosts in a well-directed manner.
Anycast
Addresses of this type are related to a group of interfaces. Packets with such an
address are delivered to the member of the group that is closest to the sender, ac-
cording to the principles of the underlying routing protocol. Anycast addresses are
used to make it easier for hosts to find out about servers offering certain services
in the given network area. All servers of the same type have the same anycast ad-
dress. Whenever a host requests a service, it receives a reply from the server with
the closest location, as determined by the routing protocol. If this server should fail
for some reason, the protocol automatically selects the second closest server, then
the third one, and so forth.
Each part of an IPv6 address has a defined function. The first bytes form the prefix and
specify the type of address. The center part is the network portion of the address, but
it may be unused. The end of the address forms the host part. With IPv6, the netmask
is defined by indicating the length of the prefix after a slash at the end of the address.
An address, as shown in Example 30.4, “IPv6 Address Specifying the Prefix Length”
(page 553), contains the information that the first 64 bits form the network part of the
address and the last 64 form its host part. In other words, the 64 means that the netmask
is filled with 64 1-bit values from the left. Just like with IPv4, the IP address is combined
with AND with the values from the netmask to determine whether the host is located
in the same subnetwork or in another one.
IPv6 knows about several predefined types of prefixes. Some of these are shown in
Table 30.4, “Various IPv6 Prefixes” (page 553).
2 or 3 as the first Aggregatable global unicast addresses. As is the case with IPv4,
digit an interface can be assigned to form part of a certain subnetwork.
Currently, there are the following address spaces: 2001::/16
(production quality address space) and 2002::/16 (6to4 address
space).
fec0::/10 Site-local addresses. These may be routed, but only within the
network of the organization to which they belong. In effect, they
are the IPv6 equivalent of the current private network address
space, such as 10.x.x.x.
Public Topology
The first part (which also contains one of the prefixes mentioned above) is used to
route packets through the public Internet. It includes information about the company
or institution that provides the Internet access.
Site Topology
The second part contains routing information about the subnetwork to which to
deliver the packet.
Interface ID
The third part identifies the interface to which to deliver the packet. This also allows
for the MAC to form part of the address. Given that the MAC is a globally unique,
fixed identifier coded into the device by the hardware maker, the configuration
procedure is substantially simplified. In fact, the first 64 address bits are consoli-
dated to form the EUI-64 token, with the last 48 bits taken from the MAC, and
the remaining 24 bits containing special information about the token type. This also
makes it possible to assign an EUI-64 token to interfaces that do not have a MAC,
such as those based on PPP or ISDN.
:: (unspecified)
This address is used by the host as its source address when the interface is initialized
for the first time—when the address cannot yet be determined by other means.
::1 (loopback)
The address of the loopback device.
Local Addresses
There are two address types for local use:
link-local
This type of address can only be used in the local subnetwork. Packets with a
source or target address of this type should not be routed to the Internet or
other subnetworks. These addresses contain a special prefix (fe80::/10)
and the interface ID of the network card, with the middle part consisting of
zero bytes. Addresses of this type are used during automatic configuration to
communicate with other hosts belonging to the same subnetwork.
site-local
Packets with this type of address may be routed to other subnetworks, but not
to the wider Internet—they must remain inside the organization's own network.
Such addresses are used for intranets and are an equivalent of the private address
space defined by IPv4. They contain a special prefix (fec0::/10), the inter-
face ID, and a 16 bit field specifying the subnetwork ID. Again, the rest is
filled with zero bytes.
As a completely new feature introduced with IPv6, each network interface normally
gets several IP addresses, with the advantage that several networks can be accessed
through the same interface. One of these networks can be configured completely auto-
For a host to go back and forth between different networks, it needs at least two address-
es. One of them, the home address, not only contains the interface ID but also an iden-
tifier of the home network to which it normally belongs (and the corresponding prefix).
The home address is a static address and, as such, it does not normally change. Still,
all packets destined to the mobile host can be delivered to it, regardless of whether it
operates in the home network or somewhere outside. This is made possible by the
completely new features introduced with IPv6, such as stateless autoconfiguration and
neighbor discovery. In addition to its home address, a mobile host gets one or more
additional addresses that belong to the foreign networks where it is roaming. These are
called care-of addresses. The home network has a facility that forwards any packets
destined to the host when it is roaming outside. In an IPv6 environment, this task is
performed by the home agent, which takes all packets destined to the home address and
relays them through a tunnel. On the other hand, those packets destined to the care-of
address are directly transferred to the mobile host without any special detours.
IPv6 hosts that are more or less isolated in the (worldwide) IPv4 network can commu-
nicate through tunnels: IPv6 packets are encapsulated as IPv4 packets to move them
across an IPv4 network. Such a connection between two IPv4 hosts is called a tunnel.
To achieve this, packets must include the IPv6 destination address (or the corresponding
prefix) as well as the IPv4 address of the remote host at the receiving end of the tunnel.
A basic tunnel can be configured manually according to an agreement between the
hosts' administrators. This is also called static tunneling.
6over4
IPv6 packets are automatically encapsulated as IPv4 packets and sent over an IPv4
network capable of multicasting. IPv6 is tricked into seeing the whole network
(Internet) as a huge local area network (LAN). This makes it possible to determine
the receiving end of the IPv4 tunnel automatically. However, this method does not
scale very well and is also hampered by the fact that IP multicasting is far from
widespread on the Internet. Therefore, it only provides a solution for smaller cor-
porate or institutional networks where multicasting can be enabled. The specifica-
tions for this method are laid down in RFC 2529.
6to4
With this method, IPv4 addresses are automatically generated from IPv6 addresses,
enabling isolated IPv6 hosts to communicate over an IPv4 network. However, a
number of problems have been reported regarding the communication between
those isolated IPv6 hosts and the Internet. The method is described in RFC 3056.
Because of the autoconfiguration concept of IPv6, the network card is assigned an ad-
dress in the link-local network. Normally, no routing table management takes place on
a workstation. The network routers can be queried by the workstation, using the router
advertisement protocol, for what prefix and gateways should be implemented. The
radvd program can be used to set up an IPv6 router. This program informs the worksta-
Consult the ifup(8) man page to get information about how to set up various types of
tunnels using the /etc/sysconfig/network files.
http://www.ipv6.org/
The starting point for everything about IPv6.
http://www.ipv6day.org
All information needed to start your own IPv6 network.
http://www.ipv6-to-standard.org/
The list of IPv6-enabled products.
http://www.bieringer.de/linux/IPv6/
Here, find the Linux IPv6-HOWTO and many links related to the topic.
RFC 2640
The fundamental RFC about IPv6.
IPv6 Essentials
A book describing all the important aspects of the topic is IPv6 Essentials by Silvia
Hagen (ISBN 0-596-00125-8).
TLD assignment has become quite confusing for historical reasons. Traditionally, three-
letter domain names are used in the USA. In the rest of the world, the two-letter ISO
national codes are the standard. In addition to that, longer TLDs were introduced in
2000 that represent certain spheres of activity (for example, .info, .name, .museum).
In the early days of the Internet (before 1990), the file /etc/hosts was used to store
the names of all the machines represented over the Internet. This quickly proved to be
impractical in the face of the rapidly growing number of computers connected to the
Internet. For this reason, a decentralized database was developed to store the hostnames
in a widely distributed manner. This database, similar to the name server, does not have
the data pertaining to all hosts in the Internet readily available, but can dispatch requests
to other name servers.
The top of the hierarchy is occupied by root name servers. These root name servers
manage the top level domains and are run by the Network Information Center (NIC).
Each root name server knows about the name servers responsible for a given top level
domain. Information about top level domain NICs is available at http://www
.internic.net.
DNS can do more than just resolve hostnames. The name server also knows which host
is receiving e-mails for an entire domain—the mail exchanger (MX).
For your machine to resolve an IP address, it must know about at least one name server
and its IP address. Easily specify such a name server with the help of YaST. If you have
a modem dial-up connection, you may not need to configure a name server manually
at all. The dial-up protocol provides the name server address as the connection is made.
The configuration of name server access with SUSE Linux Enterprise® is described in
Chapter 33, The Domain Name System (page 611).
The protocol whois is closely related to DNS. With this program, quickly find out
who is responsible for any given domain.
The .local top level domain is treated as link-local domain by the resolver.
DNS requests are send as multicast DNS requests instead of normal DNS re-
quests. If you already use the .local domain in your nameserver configuration,
you must switch this option off in /etc/host.conf. Also read the host
.conf manual page.
If you want to switch off MDNS during installation, use nomdns=1 as a boot
parameter.
During installation, YaST can be used to configure automatically all interfaces that
have been detected. Additional hardware can be configured any time after installation
in the installed system. The following sections describe the network configuration for
all types of network connections supported by SUSE Linux Enterprise.
NetworkManager does not work with Xen. Only Traditional Method with ifup
is available in Xen.
The upper part of the next dialog shows a list with all the network cards available for
configuration. Any card properly detected is listed with its name. To change the confi-
guration of the selected device, click Edit. Devices that could not be detected can be
configured using Add as described in Section “Configuring an Undetected Network
Card” (page 567).
Configuring IP Addresses
When possible, wired network cards available during installation are automatically
configured to use automatic address setup, DHCP.
DHCP is a good choice for client configuration but it is not ideal for server configuration.
To set a static IP address, proceed as follows:
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
4 Click Next.
If you use the static address, name servers and a default gateway are not configured
automatically. To configure a gateway, click Routing and add the default gateway. To
configure name servers, click Hostname and Name Server and add addresses of name
servers and domains.
Configuring Aliases
One network device can have multiple IP addresses, called aliases. To set an alias for
your network card, proceed as follows:
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
3 Click Add.
6 Click OK again.
7 Click Next.
To change the name of your computer and adjust the name server search list, proceed
as follows:
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
5 To disable DHCP driven updates of the name server list, deselect Update Name
Servers and Search List via DHCP.
7 Click OK.
8 Click Next.
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
4 Click OK.
5 Click Next.
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
3 In Options, enter the parameters for your network card. If two cards are configured
that use the same module, these parameters are used for both.
4 Click OK.
5 Click Next.
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
2 In the General tab, select the desired entry from Device Activation.
3 Click Next.
1 Select a card from the list of detected cards in the YaST network card configura-
tion module and click Edit.
3 Determine the firewall zone to which your interface should be assigned. The
following options are available:
Demilitarized Zone
A demilitarized zone is an additional line of defense in front of an internal
network and the (hostile) Internet. Hosts assigned to this zone can be reached
External Zone
The firewall is run on this interface and fully protects it against other (pre-
sumably hostile) network traffic. This is the default option.
4 Click Next.
1 Click Add.
2 Set the Device Type of the interface from the available options, Configuration
Name, and Module Name. If the network card is a PCMCIA or USB device, ac-
tivate the respective check box and exit this dialog with Next. Otherwise, select
your network card model from Select from List. YaST then automatically selects
the appropriate kernel module for the card.
3 Click Next.
4 In the Address tab, set the device type of the interface, the configuration name,
and IP address. To use a static address, choose Static Address Setup then complete
IP Address and Subnet Mask. Here, you can also select to configure the hostname,
name server, and routing details (see Section “Configuring Hostname and DNS”
(page 564) and Section “Configuring Routing” (page 565)).
5 In the General tab, set the Firewall Zone and Device Activation. With User
Controlled, grant connection control to ordinary users.
6 Click Next.
30.4.2 Modem
TIP: IBM System z: Modem
In the YaST Control Center, access the modem configuration with Network Devices >
Modem. If your modem was not automatically detected, open the dialog for manual
configuration by clicking Add. In the dialog that opens, enter the interface to which the
modem is connected for Modem Device.
Configure supported CDMA and GPRS modems with the YaST modem module
just as you would configure regular modems.
If behind a private branch exchange (PBX), you may need to enter a dial prefix. This
is often a zero. Consult the instructions that came with the PBX to find out. Also select
whether to use tone or pulse dialing, whether the speaker should be on, and whether
the modem should wait until it detects a dial tone. The last option should not be enabled
if the modem is connected to an exchange.
Under Details, set the baud rate and the modem initialization strings. Only change these
settings if your modem was not detected automatically or if it requires special settings
for data transmission to work. This is mainly the case with ISDN terminal adapters.
Leave this dialog by clicking OK. To delegate control over the modem to the normal
user without root permissions, activate User Controlled. In this way, a user without
administrator permissions can activate or deactivate an interface. Under Dial Prefix
Regular Expression, specify a regular expression. The Dial Prefix in KInternet, which
can be modified by the normal user, must match this regular expression. If this field is
left empty, the user cannot set a different Dial Prefix without administrator permissions.
In the next dialog, select the ISP (Internet service provider). To choose from a predefined
list of ISPs operating in your country, select Country. Alternatively, click New to open
a dialog in which to provide the data for your ISP. This includes a name for the dial-up
connection and ISP as well as the login and password provided by your ISP. Enable
Always Ask for Password to be prompted for the password each time you connect.
Dial on Demand
If you enable dial on demand, set at least one name server.
Stupid Mode
This option is enabled by default. With it, input prompts sent by the ISP's server
are ignored to prevent them from interfering with the connection process.
IP Details
This opens the address configuration dialog. If your ISP does not assign a dynamic
IP address to your host, disable Dynamic IP Address then enter your host's local
IP address and the remote IP address. Ask your ISP for this information. Leave
Default Route enabled and close the dialog by selecting OK.
Selecting Next returns to the original dialog, which displays a summary of the modem
configuration. Close this dialog with Finish.
Use this module to configure one or several ISDN cards for your system. If YaST did
not detect your ISDN card, click Add and manually select it. Multiple interfaces are
possible, but several ISPs can be configured for one interface. In the subsequent dialogs,
set the ISDN options necessary for the proper functioning of the card.
In the next dialog, shown in Figure 30.5, “ISDN Configuration” (page 571), select the
protocol to use. The default is Euro-ISDN (EDSS1), but for older or larger exchanges,
select 1TR6. If you are in the US, select NI1. Select your country in the relevant field.
The corresponding country code then appears in the field next to it. Finally, provide
your Area Code and the Dial Prefix if necessary.
Device Activation defines how the ISDN interface should be started: At Boot Time
causes the ISDN driver to be initialized each time the system boots. Manually requires
In the next dialog, specify the interface type for your ISDN card and add ISPs to an
existing interface. Interfaces may be either the SyncPPP or the RawIP type, but most
ISPs operate in the SyncPPP mode, which is described below.
The number to enter for My Phone Number depends on your particular setup:
Use one of the internal numbers as your MSN. You should be able to use at least
one of the exchange's MSNs that have been enabled for direct outward dialing.
If this does not work, try a single zero. For further information, consult the
documentation that came with your phone exchange.
2. Larger phone exchanges designed for businesses normally use the 1TR6 protocol
for internal calls. Their MSN is called EAZ and usually corresponds to the direct-
dial number. For the configuration under Linux, it should be sufficient to enter
the last digit of the EAZ. As a last resort, try each of the digits from 1 to 9.
For the connection to be terminated just before the next charge unit is due, enable
ChargeHUP. However, remember that may not work with every ISP. You can also
enable channel bundling (multilink PPP) by selecting the corresponding option. Finally,
you can enable SuSEfirewall2 for your link by selecting External Firewall Interface
and Restart Firewall. To enable the normal user without administrator permissions to
activate or deactivate the interface, select the User Controlled.
Details opens a dialog in which to configure callback mode, remote connections to this
interface and additional ippd options. Leave the Details dialog by selecting OK.
In the next dialog, make IP address settings. If you have not been given a static IP by
your provider, select Dynamic IP Address. Otherwise, use the fields provided to enter
your host's local IP address and the remote IP address according to the specifications
of your ISP. If the interface should be the default route to the Internet, select Default
Route. Each host can only have one interface configured as the default route. Leave
this dialog by selecting Next.
The following dialog allows you to set your country and select an ISP. The ISPs included
in the list are call-by-call providers only. If your ISP is not in the list, select New. This
opens the Provider Parameters dialog in which to enter all the details for your ISP.
When entering the phone number, do not include any blanks or commas among the
digits. Finally, enter your login and the password as provided by the ISP. When finished,
select Next.
To use Dial on Demand on a stand-alone workstation, also specify the name server
(DNS server). Most ISPs support dynamic DNS, which means the IP address of a name
server is sent by the ISP each time you connect. For a single workstation, however, you
In some countries, such as Austria and the US, it is quite common to access the Internet
through the TV cable network. The TV cable subscriber usually gets a modem that is
connected to the TV cable outlet on one side and to a computer network card on the
other (using a 10Base-TG twisted pair cable). The cable modem then provides a dedi-
cated Internet connection with a fixed IP address.
Depending on the instructions provided by your ISP, when configuring the network
card either select Automatic Address Setup (via DHCP) or Static Address Setup. Most
providers today use DHCP. A static IP address often comes as part of a special business
account.
For further information about the configuration of cable modems, read the Support
Database article on the topic, which is available online at http://en.opensuse
.org/SDB:Setting_Up_an_Internet_Connection_via_Cable_Modem
_with_SuSE_Linux_8.0_or_Higher.
30.4.5 DSL
TIP: IBM System z: DSL
The configuration of a DSL connection based on PPPoE or PPTP requires that the
corresponding network card has already been set up in the correct way. If you have not
done so yet, first configure the card by selecting Configure Network Cards (see Sec-
tion 30.4.1, “Configuring the Network Card with YaST” (page 561)). In the case of a
DSL link, addresses may be assigned automatically but not via DHCP, which is why
you should not enable the option Automatic address setup (via DHCP). Instead, enter
a static dummy address for the interface, such as 192.168.22.1. In Subnet Mask,
enter 255.255.255.0. If you are configuring a stand-alone workstation, leave Default
Gateway empty.
TIP
Values in IP Address and Subnet Mask are only placeholders. They are only
needed to initialize the network card and do not represent the DSL link as such.
To begin the DSL configuration (see Figure 30.7, “DSL Configuration” (page 576)),
first select the PPP mode and the ethernet card to which the DSL modem is connected
(in most cases, this is eth0). Then use Device Activation to specify whether the DSL
link should be established during the boot process. Click User Controlled to authorize
the normal user without root permissions to activate or deactivate the interface with
KInternet. The dialog also lets you select your country and choose from a number of
ISPs operating in it. The details of any subsequent dialogs of the DSL configuration
depend on the options set so far, which is why they are only briefly mentioned in the
following paragraphs. For details on the available options, read the detailed help
available from the dialogs.
To use Dial on Demand on a stand-alone workstation, also specify the name server
(DNS server). Most ISPs support dynamic DNS—the IP address of a name server is
sent by the ISP each time you connect. For a single workstation, however, provide a
placeholder address like 192.168.22.99. If your ISP does not support dynamic
DNS, enter the name server IP address provided by your ISP.
Idle Time-Out (seconds) defines a period of network inactivity after which to terminate
the connection automatically. A reasonable time-out value is between 60 and 300 sec-
onds. If Dial on Demand is disabled, it may be useful to set the time-out to zero to
prevent automatic hang-up.
WARNING
The use of this interface is deprecated. This interface will not be supported in
future versions of SUSE Linux Enterprise.
WARNING
The use of this interface is deprecated. This interface will not be supported in
future versions of SUSE Linux Enterprise.
• You want to use more than one provider for dial-up for one interface.
• Your computer provides network services for other computers in your network, for
example, it is a DHCP or DNS server.
• Your computer is a Xen server or your system is a virtual system inside Xen.
• You want to use SCPM for network configuration management. To use SCPM and
NetworkManager at the same time, SCPM cannot control network resources. .
• You want to use more than one active network connection simultaneously.
1 Open YaST.
3 On the first screen, set the Network Setup Method option to User Controlled with
NetworkManager to use NetworkManager. To disable NetworkManager, set the
Network Setup Method option to Traditional Method with ifup.
After choosing the method, set up your network card using automatic configuration via
DHCP or a static IP address or configure your modem. Find a detailed description of
Traditional configuration with ifup also provides some ways to switch, stop, or start
the connection with or without user intervention, like user-managed devices, but it always
requires root privileges to change or configure a network device. This is often a
problem for mobile computing, where is not possible to preconfigure all connection
possibilities.
NetworkManager tries to keep your computer connected at all times using the best
connection available. If available, it uses the fastest wired connection. If the network
cable is accidentally disconnected, it tries to reconnect. It can find a network with the
best signal strength from the list of your wireless connections and automatically use it
to connect. To get the same functionality with ifup, a great deal of configuration effort
is required.
• http://www.gnome.org/projects/NetworkManager/—NetworkMan-
ager project page
• http://en.opensuse.org/Projects/KNetworkManager—Network-
Manager KNetworkManager project page
All built-in network cards and hotplug network cards (PCMCIA, USB, some PCI cards)
are detected and configured via hotplug. The system sees a network card in two different
ways: first as a physical device and second as an interface. The insertion or detection
of a device triggers a hotplug event. This hotplug event triggers the initialization of the
device with the script hwup. When the network card is initialized as a new network
interface, the kernel generates another hotplug event that triggers the setup of the inter-
face with ifup.
The kernel numbers interface names according to the temporal order of their registration.
The initialization sequence is decisive for the assignment of names. If one of several
network card fails, the numbering of all subsequently initialized cards is shifted. For
real hotpluggable cards, the order in which the devices are connected is what matters.
To achieve a flexible configuration, the configuration of the device (hardware) and the
interface has been separated and the mapping of configurations to devices and interfaces
is no longer managed on the basis of the interface names. The device configurations
are located in /etc/sysconfig/hardware/hwcfg-*. The interface configura-
tions are located in /etc/sysconfig/network/ifcfg-*. The names of the
configurations are assigned in such a way that they describe the devices and interfaces
To assign a certain network configuration to any card of a certain type (of which only
one is inserted at a time) instead of a certain card, select less specific configuration
names. For example, bus-pcmcia would be used for all PCMCIA cards. On the
other hand, the names can be limited by a preceding interface type. For example,
wlan-bus-usb would be assigned to WLAN cards connected to a USB port.
The system always uses the configuration that best describes an interface or the device
providing the interface. The search for the most suitable configuration is handled by
getcfg. The output of getcfg delivers all information that can be used for describing
a device. Details regarding the specification of configuration names are available in the
manual page of getcfg.
With the described method, a network interface is configured with the correct configu-
ration even if the network devices are not always initialized in the same order. However,
the name of the interface still depends on the initialization sequence. There are two
ways to ensure reliable access to the interface of a certain network card:
• Persistent interface names are assigned to each interface automatically. You may
adjust them to suit your needs. When creating interface names, proceed as outlined
in /etc/udev/rules.d/30-net_persistent_names.rules. However,
the persistent name pname should not be the same as the name that would automat-
ically be assigned by the kernel. Therefore, eth*, tr*, wlan*, qeth*, iucv*,
and so on are not permitted. Instead, use net* or descriptive names like
The use of persistent interface names has not been tested in all areas.
Therefore, some applications may not be able to handle freely selected
interface names.
ifup requires an existing interface, because it does not initialize the hardware. The
initialization of the hardware is handled by the command hwup (executed by hotplug
or coldplug). When a device is initialized, ifup is automatically executed for the
new interface via hotplug and the interface is set up if the start mode is onboot,
hotplug, or auto and the network service was started. Formerly, the command
ifup interfacename triggered the hardware initialization. Now the procedure has
been reversed. First, a hardware component is initialized then all other actions follow.
In this way, a varying number of devices can always be configured in the best way
possible with an existing set of configurations.
Table 30.5, “Manual Network Configuration Scripts” (page 583) summarizes the most
important scripts involved in the network configuration. Where possible, the scripts are
distinguished by hardware and interface.
More information about hotplug and persistent device names is available in Chapter 24,
Dynamic Kernel Device Management with udev (page 461).
/etc/syconfig/hardware/hwcfg-*
These files contain the hardware configurations of network cards and other devices.
They contain the needed parameters, such as the kernel module, start mode, and script
associations. Refer to the manual page of hwup for details. Regardless of the existing
hardware, the hwcfg-static-* configurations are applied when coldplug is started.
/etc/sysconfig/network/ifcfg-*
These files contain the configurations for network interface. They include information
such as the start mode and the IP address. Possible parameters are described in the
manual page of ifup. Additionally, all variables from the files dhcp, wireless,
and config can be used in the ifcfg-* files if a general setting should be used for
only one interface.
/etc/sysconfig/network/{config,dhcp
,wireless}
The file config contains general settings for the behavior of ifup, ifdown, and
ifstatus. dhcp contains settings for DHCP and wireless for wireless LAN
cards. The variables in all three configuration files are commented and can also be used
in ifcfg-* files, where they are treated with higher priority.
/etc/sysconfig/network/{routes,ifroute-*}
The static routing of TCP/IP packets is determined here. All the static routes required
by the various system tasks can be entered in the /etc/sysconfig/network/
routes file: routes to a host, routes to a host via a gateway, and routes to a network.
For each interface that needs individual routing, define an additional configuration file:
/etc/sysconfig/network/ifroute-*. Replace * with the name of the inter-
face. The entries in the routing configuration files look like this:
# Destination Dummy/Gateway Netmask Device
#
127.0.0.0 0.0.0.0 255.255.255.0 lo
204.127.235.0 0.0.0.0 255.255.255.0 eth0
default 204.127.235.41 0.0.0.0 eth0
207.68.156.51 207.68.145.45 255.255.255.255 eth1
192.168.0.0 207.68.156.51 255.255.0.0 eth1
The route's destination is in the first column. This column may contain the IP address
of a network or host or, in the case of reachable name servers, the fully qualified network
or hostname.
The second column contains the default gateway or a gateway through which a host or
network can be accessed. The third column contains the netmask for networks or hosts
behind a gateway. For example, the mask is 255.255.255.255 for a host behind a
gateway.
The fourth column is only relevant for networks connected to the local host such as
loopback, Ethernet, ISDN, PPP, and dummy device. The device name must be entered
here.
/etc/resolv.conf
The domain to which the host belongs is specified in this file (keyword search). Also
listed is the status of the name server address to access (keyword nameserver).
Multiple domain names can be specified. When resolving a name that is not fully
qualified, an attempt is made to generate one by attaching the individual search entries.
Use multiple name servers by entering several lines, each beginning with nameserver.
Precede comments with # signs. YaST enters the specified name server in this file.
Example 30.5, “/etc/resolv.conf” (page 586) shows what /etc/resolv.conf
could look like.
# Our domain
search example.com
#
# We use sun (192.168.0.20) as nameserver
nameserver 192.168.0.20
Some services, like pppd (wvdial), ipppd (isdn), dhcp (dhcpcd and
dhclient), pcmcia, and hotplug, modify the file /etc/resolv.conf by
means of the script modify_resolvconf. If the file /etc/resolv.conf has
been temporarily modified by this script, it contains a predefined comment giving in-
formation about the service that modified it, the location where the original file has
been backed up, and how to turn off the automatic modification mechanism. If /etc/
resolv.conf is modified several times, the file includes modifications in a nested
form. These can be reverted in a clean way even if this reversal takes place in an order
different from the order in which modifications were introduced. Services that may
need this flexibility include isdn, pcmcia, and hotplug.
/etc/hosts
In this file, shown in Example 30.6, “/etc/hosts” (page 587), IP addresses are as-
signed to hostnames. If no name server is implemented, all hosts to which an IP connec-
tion will be set up must be listed here. For each host, enter a line consisting of the IP
address, the fully qualified hostname, and the hostname into the file. The IP address
must be at the beginning of the line and the entries separated by blanks and tabs.
Comments are always preceded by the # sign.
127.0.0.1 localhost
192.168.0.20 sun.example.com sun
192.168.0.1 earth.example.com earth
/etc/networks
Here, network names are converted to network addresses. The format is similar to that
of the hosts file, except the network names precede the addresses. See Example 30.7,
“/etc/networks” (page 587).
loopback 127.0.0.0
localnet 192.168.0.0
/etc/host.conf
Name resolution—the translation of host and network names via the resolver library—is
controlled by this file. This file is only used for programs linked to libc4 or libc5. For
order hosts, bind Specifies in which order the services are accessed for the name
resolution. Available arguments are (separated by blank spaces
or commas):
trim domainname The specified domain name is separated from the hostname
after hostname resolution (as long as the hostname includes
the domain name). This option is useful if only names from
the local domain are in the /etc/hosts file, but should still
be recognized with the attached domain names.
passwd: compat
group: compat
services: db files
protocols: db files
netgroup: files
automount: files nis
The “databases” available over NSS are listed in Table 30.7, “Databases Available via
/etc/nsswitch.conf” (page 589). In addition, automount, bootparams, netmasks,
and publickey are expected in the near future. The configuration options for NSS
databases are listed in Table 30.8, “Configuration Options for NSS “Databases””
(page 590).
group For user groups, used by getgrent. See also the man page
for group.
netgroup Valid host and user lists in the network for the purpose of
controlling access permissions; see the netgroup(5) man
page.
nis, nisplus NIS, see also Chapter 35, Using NIS (page 655)
If the caching for passwd is activated, it usually takes about fifteen seconds until a
newly added local user is recognized. Reduce this waiting time by restarting nscd with
the command rcnscd restart.
/etc/HOSTNAME
This contains the hostname without the domain name attached. This file is read by
several scripts while the machine is booting. It may only contain one line in which the
hostname is set.
The commands ip, ifconfig, and route change the network configuration directly
without saving it in the configuration file. Unless you enter your configuration in the
correct configuration files, the changed network configuration is lost on reboot.
address
This object represents the IP address of device.
neighbour
This object represents a ARP or NDISC cache entry.
route
This object represents the routing table entry.
rule
This object represents a rule in the routing policy database.
maddress
This object represents a multicast address.
mroute
This object represents a multicast routing cache entry.
tunnel
This object represents a tunnel over IP.
After activating a device, you can configure it. To set the IP address, use ip addr
add ip_address + dev device_name. For example, to set the address of the
interface eth0 to 192.168.12.154/30 with standard broadcast (option brd), enter ip
addr add 192.168.12.154/30 brd + dev eth0.
To have a working connection, you must also configure the default gateway. To set a
gateway for your system, enter ip route get gateway_ip_address. To
translate one IP address to another, use nat: ip route add
nat ip_address via other_ip_address.
For more information about using ip, enter ip help or see the ip(8) man page. The
help option is also available for all ip objects. If, for example, you want to read help
for ip addr, enter ip addr help. Find the ip manual in /usr/share/doc/
packages/iproute2/ip-cref.pdf.
ping does more than test only the function of the connection between two computers:
it also provides some basic information about the quality of the connection. In Exam-
ple 30.10, “Output of the Command ping” (page 593), you can see an example of the
ping output. The second-to-last line contains information about number of transmitted
packets, packet loss, and total time of ping running.
If you only need to check the functionality of the connection, you can limit the number
of the packets with the -c option. For example to limit ping to three packets, enter
ping -c 3 192.168.0.
In a system with multiple network devices, it is sometimes useful to send the ping
through a specific interface address. To do so, use the -I option with the name of the
selected device, for example, ping -I wlan1 192.168.0.
For more options and information about using ping, enter ping -h or see the ping
(8) man page.
Without arguments, ifconfig displays the status of the currently active interfaces. As
you can see in Example 30.11, “Output of the ifconfig Command” (page 595), ifconfig
has very well-arranged and detailed output. The output also contains information about
the MAC address of your device, the value of HWaddr, in the first line.
For more options and information about using ifconfig, enter ifconfig -h or see
the ifconfig (8) man page.
route is especially useful if you need quick and comprehensible information about your
routing configuration to determine problems with routing. To view your current routing
configuration, enter route -n as root.
route -n
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
10.20.0.0 * 255.255.248.0 U 0 0 0 eth0
link-local * 255.255.0.0 U 0 0 0 eth0
loopback * 255.0.0.0 U 0 0 0 lo
default styx.exam.com 0.0.0.0 UG 0 0 0 eth0
For more options and information about using route, enter route -h or see the route
(8) man page.
/etc/init.d/portmap Starts the portmapper needed for the RPC server, such
as an NFS server.
If you have a flat-rate connection that does not generate any additional costs for the
dial-up connection, simply start the respective daemon. Control the dial-up connection
with a KDE applet or a command-line interface. If the Internet gateway is not the host
you are using, you might want to control the dial-up connection by way of a network
host.
This is where smpppd is involved. It provides a uniform interface for auxiliary programs
and acts in two directions. First, it programs the required pppd or ipppd and controls
its dial-up properties. Second, it makes various providers available to the user programs
and transmits information about the current status of the connection. As smpppd can
also be controlled by way of the network, it is suitable for controlling dial-up connections
to the Internet from a workstation in a private subnetwork.
open-inet-socket = yes|no
To control smpppd via the network, this option must be set to yes. The port on
which smpppd listens is 3185. If this parameter is set to yes, the parameters
bind-address, host-range, and password should also be set accordingly.
password = password
By assigning a password, limit the clients to authorized hosts. As this is a plain-
text password, you should not overrate the security it provides. If no password is
assigned, all clients are permitted to access smpppd.
slp-register = yes|no
With this parameter, the smpppd service can be announced in the network via SLP.
password = password
Insert the password selected for smpppd.
If smpppd is active, you can now try to access it, for example, with cinternet
--verbose --interface-list. If you experience difficulties at this point, refer
to the smpppd-c.conf(5) and cinternet(8) man pages.
SUSE Linux Enterprise® supports installation using installation sources provided with
SLP and contains many system services with integrated support for SLP. YaST and
Konqueror both have appropriate front-ends for SLP. You can use SLP to provide net-
worked clients with central functions, such as an installation server, file server, or print
server on your system.
Services that offer SLP support include cupsd, rsyncd, ypserv, openldap2,
openwbem (CIM), ksysguardd, saned, kdm vnc login, smpppd, rpasswd, postfix,
and sshd (via fish).
slptool
slptool is a simple command line program that can be used to announce SLP in-
quiries in the network or announce proprietary services. slptool --help lists
all available options and functions. slptool can also be called from scripts that
process SLP information.
Konqueror
When used as a network browser, Konqueror can display all SLP services available
in the local network at slp:/. Click the icons in the main window to obtain more
detailed information about the relevant service. If you use Konqueror with
service:/, click the relevant icon once in the browser window to set up a con-
nection with the selected service.
The most important line in this file is the service URL, which begins with
service:. This contains the service type (scanner.sane) and the address
under which the service is available on the server. $HOSTNAME is automatically
replaced with the full hostname. The name of the TCP port on which the relevant
service can be found follows, separated by a colon. Then enter the language in
which the service should appear and the duration of registration in seconds. These
should be separated from the service URL by commas. Set the value for the duration
of registration between 0 and 65535. 0 prevents registration. 65535 removes all
restrictions.
The registration file also contains the two variables watch-tcp-port and
description. watch-tcp-port links the SLP service announcement to
whether the relevant service is active by having slpd check the status of the service.
The second variable contains a more precise description of the service that is dis-
played in suitable browsers.
http://www.openslp.org/
The home page of the OpenSLP project.
/usr/share/doc/packages/openslp
This directory contains all available documentation for SLP, including a README
.SuSE containing the SUSE Linux Enterprise details, the RFCs, and two introduc-
tory HTML documents. Programmers who want to use the SLP functions should
install the openslp-devel package to consult its supplied Programmers Guide.
Maintaining an exact system time is important in many situations. The built-in hardware
(BIOS) clock does often not meet the requirements of applications like databases.
Manual correction of the system time would lead to severe problems because, for ex-
ample, a backward leap can cause malfunction of critical applications. Within a network,
it is usually necessary to synchronize the system time of all machines, but manual time
adjustment is a bad approach. xntp provides a mechanism to solve these problems. It
continuously adjusts the system time with the help of reliable time servers in the network.
It further enables the management of local reference clocks, such as radio-controlled
clocks.
In the detailed server selection dialog, determine whether to implement time synchro-
nization using a time server from your local network (Local NTP Server) or an Internet-
based time server that takes care of your time zone (Public NTP Server). For a local
time server, click Lookup to start an SLP query for available time servers in your net-
work. Select the most suitable time server from the list of search results and exit the
dialog with OK. For a public time server, select your country (time zone) and a suitable
server from the list under Public NTP Server then exit the dialog with OK. In the main
Click Add to add a new source of time information. In the following dialog, select the
type of source with which the time synchronization should be made. The following
options are available:
Server
Another dialog enables you to select an NTP server (as described in Section 32.1.1,
“Quick NTP Client Configuration” (page 606)). Activate Use for Initial Synchro-
nization to trigger the synchronization of the time information between the server
and the client when the system is booted. Options allows you to specify additional
options for xntpd. Refer to /usr/share/doc/packages/xntp-doc (part
of the xntp-doc package) for detailed information.
Peer
A peer is a machine to which a symmetric relationship is established: it acts both
as a time server and as a client. To use a peer in the same network instead of a
server, enter the address of the system. The rest of the dialog is identical to the
Server dialog.
Radio Clock
To use a radio clock in your system for the time synchronization, enter the clock
type, unit number, device name, and other options in this dialog. Click Driver
Calibration to fine-tune the driver. Detailed information about the operation of a
local radio clock is available in /usr/share/doc/packages/xntp-doc/
refclock.html.
Outgoing Broadcast
Time information and queries can also be transmitted by broadcast in the network.
In this dialog, enter the address to which such broadcasts should be sent. Do not
activate broadcasting unless you have a reliable time source like a radio controlled
clock.
Incoming Broadcast
If you want your client to receive its information via broadcast, enter the address
from which the respective packets should be accepted in this fields.
To add more time servers, insert additional lines with the keyword server. After
initializing xntpd with the command rcntpd start, it takes about one hour until
the time is stabilized and the drift file for correcting the local computer clock is created.
With the drift file, the systematic error of the hardware clock can be computed as soon
as the computer is powered on. The correction is used immediately, resulting in a
higher stability of the system time.
There are two possible ways to use the NTP mechanism as a client: First, the client can
query the time from a known server in regular intervals. With many clients, this approach
can cause a high load on the server. Second, the client can wait for NTP broadcasts sent
out by broadcast time servers in the network. This approach has the disadvantage that
the quality of the server is unknown and a server sending out wrong information can
cause severe problems.
If the time is obtained via broadcast, you do not need the server name. In this case, enter
the line broadcastclient in the configuration file /etc/ntp.conf. To use one
or more known time servers exclusively, enter their names in the line starting with
servers.
Normally, the individual drivers have special parameters that describe configuration
details. The file /usr/share/doc/packages/xntp-doc/drivers/driverNN
.html (where NN is the number of the driver) provides information about the particular
type of clock. For example, the “type 8” clock (radio clock over serial interface) requires
an additional mode that specifies the clock more precisely. The Conrad DCF77 receiver
module, for example, has mode 5. To use this clock as a preferred reference, specify
the keyword prefer. The complete server line for a Conrad DCF77 receiver
module would be:
server 127.127.8.0 mode 5 prefer
Other clocks follow the same pattern. Following the installation of the xntp-doc
package, the documentation for xntp is available in the directory /usr/share/doc/
packages/xntp-doc. The file /usr/share/doc/packages/xntp-doc/
refclock.html provides links to the driver pages describing the driver parameters.
DNS server
The DNS server is a server that maintains the name and IP information for a domain.
You can have a primary DNS server for master zone, a secondary server for slave
zone, or a slave server without any zones for caching.
Forwarder
Forwarders are DNS servers to which your DNS server should send queries it
cannot answer.
Record
The record is information about name and IP address. Supported records and their
syntax are described in BIND documentation. Some special records are:
NS record
An NS record tells name servers which machines are in charge of a given do-
main zone.
MX record
The MX (mail exchange) records describe the machines to contact for directing
mail across the Internet.
SOA record
SOA (Start of Authority) record is the first record in a zone file. The SOA
record is used when using DNS to synchronize data between multiple comput-
ers.
2 The DNS Zones dialog consists of several parts and is responsible for the man-
agement of zone files, described in Section 33.5, “Zone Files” (page 628). For a
new zone, provide a name for it in Zone Name. To add a reverse zone, the name
must end in .in-addr.arpa. Finally, select the Zone Type (master or slave).
See Figure 33.2, “DNS Server Installation: DNS Zones” (page 614). Click Edit
Zone to configure other settings of an existing zone. To remove a zone, click
Delete Zone.
3 In the final dialog, you can open the DNS port in the firewall by clicking Open
Port in Firewall. Then decide whether or not the DNS server should be started
(On or Off). You can also activate LDAP support. See Figure 33.3, “DNS Server
Installation: Finish Wizard” (page 615).
By selecting LDAP Support Active, the zone files are managed by an LDAP database.
Any changes to zone data written to the LDAP database are picked up by the DNS
server as soon as it is restarted or prompted to reload its configuration.
Logging
To set what the DNS server should log and how, select Logging. Under Log Type,
specify where the DNS server should write the log data. Use the systemwide log file
/var/log/messages by selecting System Log or specify a different file by selecting
File. In the latter case, additionally specify a name, the maximum file size in megabytes,
and the number of versions of log files to store.
Further options are available under Additional Logging. Enabling Log All DNS Queries
causes every query to be logged, in which case the log file could grow extremely large.
For this reason, it is not a good idea to enable this option for other than debugging
purposes. To log the data traffic during zone updates between DHCP and DNS server,
enable Log Zone Updates. To log the data traffic during a zone transfer from master to
slave, enable Log Zone Transfer. See Figure 33.4, “DNS Server: Logging” (page 616).
The syntax of the configuration file requires that the address ends with a semicolon and
is put into curly braces.
TSIG Keys
The main purpose of TSIGs (transaction signatures) is to secure communications between
DHCP and DNS servers. They are described in Section 33.7, “Secure Transactions”
(page 633).
To generate a TSIG key, enter a distinctive name in the field labeled Key ID and specify
the file where the key should be stored (Filename). Confirm your choices with Add.
To use a previously created key, leave the Key ID field blank and select the file where
it is stored under File Name. After that, confirm with Add.
In the Zone Editor under Master DNS Server IP, specify the master from which the
slave should fetch its data. To limit access to the server, select one of the ACLs from
the list. See Figure 33.5, “DNS Server: Slave Zone Editor” (page 618).
The basic dialog, shown in Figure 33.6, “DNS Server: Zone Editor (Basic)” (page 619),
lets you define settings for dynamic DNS and access options for zone transfers to clients
and slave name servers. To permit the dynamic update of zones, select Allow Dynamic
Updates as well as the corresponding TSIG key. The key must have been defined before
the update action starts. To enable zone transfers, select the corresponding ACLs. ACLs
must have been defined already.
However, do not set up any official domains until assigned one by the responsible insti-
tution. Even if you have your own domain and it is managed by the provider, you are
better off not using it, because BIND would otherwise not forward requests for this
domain. The Web server at the provider, for example, would not be accessible for this
domain.
To start the name server, enter the command rcnamed start as root. If “done”
appears to the right in green, named, as the name server process is called, has been
started successfully. Test the name server immediately on the local system with the
host or dig programs, which should return localhost as the default server with
the address 127.0.0.1. If this is not the case, /etc/resolv.conf probably
contains an incorrect name server entry or the file does not exist at all. For the first test,
enter host 127.0.0.1, which should always work. If you get an error message, use
rcnamed status to see whether the server is actually running. If the name server
does not start or behaves unexpectedly, you can usually find the cause in the log file
/var/log/messages.
To use the name server of the provider or one already running on your network as the
forwarder, enter the corresponding IP address or addresses in the options section
under forwarders. The addresses included in Example 33.1, “Forwarding Options
in named.conf” (page 623) are just examples. Adjust these entries to your own setup.
options {
directory "/var/lib/named";
forwarders { 10.11.12.13; 10.11.12.14; };
listen-on { 127.0.0.1; 192.168.0.99; };
allow-query { 127/8; 192.168.0/24; };
notify no;
};
/etc/named.conf is roughly divided into two areas. One is the options section
for general settings and the other consists of zone entries for the individual domains.
A logging section and acl (access control list) entries are optional. Comment lines
begin with a # sign or //. A minimal /etc/named.conf is shown in Example 33.2,
“A Basic /etc/named.conf” (page 625).
options {
directory "/var/lib/named";
forwarders { 10.0.0.1; };
notify no;
};
zone "localhost" in {
type master;
file "localhost.zone";
};
zone "0.0.127.in-addr.arpa" in {
type master;
file "127.0.0.zone";
};
zone "." in {
type hint;
file "root.hint";
};
forwarders { ip-address; };
Specifies the name servers (mostly of the provider) to which DNS requests should
be forwarded if they cannot be resolved directly. Replace ip-address with an
IP address like 10.0.0.1.
forward first;
Causes DNS requests to be forwarded before an attempt is made to resolve them
via the root name servers. Instead of forward first, forward only can
be written to have all requests forwarded and none sent to the root name servers.
This makes sense for firewall configurations.
allow-transfer ! *;;
Controls which hosts can request zone transfers. In the example, such requests are
completely denied with ! *. Without this entry, zone transfers can be requested
from anywhere without restrictions.
statistics-interval 0;
In the absence of this entry, BIND generates several lines of statistical information
per hour in /var/log/messages. Set it to 0 to suppress these statistics com-
pletely or set an interval in minutes.
cleaning-interval 720;
This option defines at which time intervals BIND clears its cache. This triggers an
entry in /var/log/messages each time it occurs. The time specification is in
minutes. The default is 60 minutes.
interface-interval 0;
BIND regularly searches the network interfaces for new or nonexistent interfaces.
If this value is set to 0, this is not done and BIND only listens at the interfaces de-
tected at start-up. Otherwise, the interval can be defined in minutes. The default is
sixty minutes.
33.4.2 Logging
What, how, and where logging takes place can be extensively configured in BIND.
Normally, the default settings should be sufficient. Example 33.3, “Entry to Disable
Logging” (page 627) shows the simplest form of such an entry and completely suppresses
any logging.
zone "my-domain.de" in {
type master;
file "my-domain.zone";
notify no;
};
After zone, specify the name of the domain to administer (my-domain.de) followed
by in and a block of relevant options enclosed in curly braces, as shown in Exam-
ple 33.4, “Zone Entry for my-domain.de” (page 627). To define a slave zone, switch the
type to slave and specify a name server that administers this zone as master
(which, in turn, may be a slave of another master), as shown in Example 33.5, “Zone
Entry for other-domain.de” (page 627).
zone "other-domain.de" in {
type slave;
file "slave/other-domain.zone";
masters { 10.0.0.1; };
};
type master;
By specifying master, tell BIND that the zone is handled by the local name
server. This assumes that a zone file has been created in the correct format.
type slave;
This zone is transferred from another name server. It must be used together with
masters.
type hint;
The zone . of the hint type is used to set the root name servers. This zone defini-
tion can be left as is.
masters { server-ip-address; };
This entry is only needed for slave zones. It specifies from which name server the
zone file should be transferred.
allow-update {! *; };
This option controls external write access, which would allow clients to make a
DNS entry—something not normally desirable for security reasons. Without this
entry, zone updates are not allowed at all. The above entry achieves the same be-
cause ! * effectively bans any such activity.
The . has an important meaning in the zone files. If hostnames are given
without a final ., the zone is appended. Complete hostnames specified with a
full domain name must end with a . to avoid having the domain added to it
again. A missing or wrongly placed dot is probably the most frequent cause of
name server configuration errors.
The first case to consider is the zone file world.zone, responsible for the domain
world.cosmos, shown in Example 33.6, “File /var/lib/named/world.zone” (page 629).
$TTL 2D
world.cosmos. IN SOA gateway root.world.cosmos. (
2003072441 ; serial
1D ; refresh
2H ; retry
1W ; expiry
2D ) ; minimum
IN NS gateway
IN MX 10 sun
gateway IN A 192.168.0.1
IN A 192.168.1.1
sun IN A 192.168.0.2
moon IN A 192.168.0.3
earth IN A 192.168.1.2
mars IN A 192.168.1.3
www IN CNAME moon
Line 1:
$TTL defines the default time to live that should apply to all the entries in this file.
In this example, entries are valid for a period of two days (2 D).
Line 2:
This is where the SOA (start of authority) control record begins:
• An e-mail address of the person in charge of this name server follows. Because
the @ sign already has a special meaning, . is entered here instead. For
[email protected] the entry must read root.world.cosmos.. The .
must be included at the end to prevent the zone from being added.
Line 3:
The serial number is an arbitrary number that is increased each time this file
is changed. It is needed to inform the secondary name servers (slave servers) of
changes. For this, a 10 digit number of the date and run number, written as
YYYYMMDDNN, has become the customary format.
Line 4:
The refresh rate specifies the time interval at which the secondary name
servers verify the zone serial number. In this case, one day.
Line 5:
The retry rate specifies the time interval at which a secondary name server,
in case of error, attempts to contact the primary server again. Here, two hours.
Line 6:
The expiration time specifies the time frame after which a secondary name
server discards the cached data if it has not regained contact to the primary server.
Here, it is a week.
Line 7:
The last entry in the SOA record specifies the negative caching TTL—the
time for which results of unresolved DNS queries from other servers may be cached.
Line 9:
The IN NS specifies the name server responsible for this domain. gateway is
extended to gateway.world.cosmos because it does not end with a .. There
can be several lines like this—one for the primary and one for each secondary name
server. If notify is not set to no in /etc/named.conf, all the name servers
listed here are informed of the changes made to the zone data.
Lines 12–17:
These are the actual address records where one or more IP addresses are assigned
to hostnames. The names are listed here without a . because they do not include
their domain, so world.cosmos is added to all of them. Two IP addresses are
assigned to the host gateway, because it has two network cards. Wherever the
host address is a traditional one (IPv4), the record is marked with AAAA. If the ad-
dress is an IPv6 address, the entry is marked with AAAA 0. The previous token
for IPv6 addresses was only AAAA, which is now obsolete.
A IPv6 record has a slightly different syntax than IPv4. Because of the
fragmentation possibility, it is necessary to provide information about
missed bits before the address. You must provide this information even if
you want to use a completely unfragmented address. For the IPv4 record
with the syntax
You need to add information about missing bits in IPv6 format. Because
the example above is complete (does not miss any bits), the IPv6 format
of this record is:
Line 18:
The alias www can be used to address mond (CNAME means canonical name).
$TTL 2D
1.168.192.in-addr.arpa. IN SOA gateway.world.cosmos. root.world.cosmos. (
2003072441 ; serial
1D ; refresh
2H ; retry
1W ; expiry
2D ) ; minimum
IN NS gateway.world.cosmos.
1 IN PTR gateway.world.cosmos.
2 IN PTR earth.world.cosmos.
3 IN PTR mars.world.cosmos.
Line 1:
$TTL defines the standard TTL that applies to all entries here.
Line 2:
The configuration file should activate reverse lookup for the network
192.168.1.0. Given that the zone is called 1.168.192.in-addr.arpa,
should not be added to the hostnames. Therefore, all hostnames are entered in their
complete form—with their domain and with a . at the end. The remaining entries
correspond to those described for the previous world.cosmos example.
Lines 3–7:
See the previous example for world.cosmos.
Line 9:
Again this line specifies the name server responsible for this zone. This time,
however, the name is entered in its complete form with the domain and a . at the
end.
Lines 11–13:
These are the pointer records hinting at the IP addresses on the respective hosts.
Only the last part of the IP address is entered at the beginning of the line, without
Normally, zone transfers between different versions of BIND should be possible without
any problem.
Transmit the entries to update to the server with the command nsupdate. For the
exact syntax of this command, check the manual page for nsupdate (man 8 nsupdate).
For security reasons, any such update should be performed using TSIG keys as described
in Section 33.7, “Secure Transactions” (page 633).
Secure transactions are needed for communication between different servers and for
the dynamic update of zone data. Making the access control dependent on keys is much
more secure than merely relying on IP addresses.
Generate a TSIG key with the following command (for details, see
man dnssec-keygen):
key host1-host2. {
algorithm hmac-md5;
secret ";ejIkuCyyGJwwuN3xAteKgg==;
};
To enable the server host1 to use the key for host2 (which has the address
192.168.2.3 in this example), the server's /etc/named.conf must include the
following rule:
server 192.168.2.3 {
keys { host1-host2. ;};
};
Add TSIG keys for any ACLs (access control lists, not to be confused with file system
ACLs) that are defined for IP addresses and address ranges to enable transaction secu-
rity. The corresponding entry could look like this:
allow-update { key host1-host2. ;};
This topic is discussed in more detail in the BIND Administrator Reference Manual
under update-policy.
A zone considered secure must have one or several zone keys associated with it. These
are generated with dnssec-keygen, just like the host keys. The DSA encryption
algorithm is currently used to generate these keys. The public keys generated should
be included in the corresponding zone file with an $INCLUDE rule.
With the command dnssec-makekeyset, all keys generated are packaged into one
set, which must then be transferred to the parent zone in a secure manner. On the parent,
the set is signed with dnssec-signkey. The files generated by this command are
then used to sign the zones with dnssec-signzone, which in turn generates the
files to include for each zone in /etc/named.conf.
On IBM System z platforms, DHCP only works on interfaces using the OSA and
OSA Express network cards. These cards are the only ones with a MAC, which
is required for the DHCP autoconfiguration features.
One way to configure a DHCP server is to identify each client using the hardware address
of its network card (which should be fixed in most cases), then supply that client with
identical settings each time it connects to the server. DHCP can also be configured to
assign addresses to each interested client dynamically from an address pool set up for
that purpose. In the latter case, the DHCP server tries to assign the same address to the
client each time it receives a request, even over longer periods. This works only if the
network does not have more clients than addresses.
DHCP makes life easier for system administrators. Any changes, even bigger ones, re-
lated to addresses and the network configuration in general can be implemented centrally
by editing the server's configuration file. This is much more convenient than reconfig-
DHCP 637
uring numerous workstations. Also it is much easier to integrate machines, particularly
new machines, into the network, because they can be given an IP address from the pool.
Retrieving the appropriate network settings from a DHCP server is especially useful
in the case of laptops regularly used in different networks.
A DHCP server supplies not only the IP address and the netmask, but also the hostname,
domain name, gateway, and name server addresses for the client to use. In addition to
that, DHCP allows a number of other parameters to be configured in a centralized way,
for example, a time server from which clients may poll the current time or even a print
server.
In this version of SUSE Linux Enterprise, the YaST DHCP module can be set up
to store the server configuration locally (on the host that runs the DHCP server)
or to have its configuration data managed by an LDAP server. If you want to
use LDAP, set up your LDAP environment before configuring the DHCP server.
The YaST DHCP module allows you to set up your own DHCP server for the local
network. The module can run in simple mode or expert mode.
Card Selection
In the first step, YaST looks for the network interfaces available on your system
then displays them in a list. From the list, select the interface on which the DHCP
server should listen and click Add. After this, select Open Firewall for Selected
Global Settings
Use the check box to determine whether your DHCP settings should be automati-
cally stored by an LDAP server. In the entry fields, provide the network specifics
for all clients the DHCP server should manage. These specifics are the domain
name, address of a time server, addresses of the primary and secondary name
server, addresses of a print and a WINS server (for a mixed network with both
Windows and Linux clients), gateway address, and lease time. See Figure 34.2,
“DHCP Server: Global Settings” (page 640).
DHCP 639
Figure 34.2 DHCP Server: Global Settings
Dynamic DHCP
In this step, configure how dynamic IP addresses should be assigned to clients. To
do so, specify an IP range from which the server can assign addresses to DHCP
clients. All these addresses must be covered by the same netmask. Also specify the
lease time during which a client may keep its IP address without needing to request
an extension of the lease. Optionally, specify the maximum lease time—the period
during which the server reserves an IP address for a particular client. See Fig-
ure 34.3, “DHCP Server: Dynamic DHCP” (page 641).
DHCP 641
Figure 34.4 DHCP Server: Start-Up
Host Management
Instead of using dynamic DHCP in the way described in the preceding sections,
you can also configure the server to assign addresses in quasi-static fashion. To do
so, use the entry fields provided in the lower part to specify a list of the clients to
manage in this way. Specifically, provide the Name and the IP Address to give to
such a client, the Hardware Address, and the Network Type (token ring or ethernet).
Modify the list of clients, which is shown in the upper part, with Add, Edit, and
Delete from List. See Figure 34.5, “DHCP Server: Host Management” (page 643).
DHCP 643
Figure 34.6 DHCP Server: Chroot Jail and Declarations
Subnet Configuration
This dialog allows you specify a new subnet with its IP address and netmask. In
the middle part of the dialog, modify the DHCP server start options for the selected
subnet using Add, Edit, and Delete. To set up dynamic DNS for the subnet, select
Dynamic DNS.
DHCP 645
Figure 34.8 DHCP Server: Configuring Subnets
DHCP 647
Figure 34.10 DHCP Server: Interface Configuration for Dynamic DNS
After completing all configuration steps, close the dialog with Ok. The server is now
started with its new configuration.
SUSE Linux Enterprise installs dhcpcd by default. The program is very easy to handle
and is launched automatically on each system boot to watch for a DHCP server. It does
not need a configuration file to do its job and works out of the box in most standard
setups. For more complex situations, use the ISC dhcp-client, which is controlled by
means of the configuration file /etc/dhclient.conf.
DHCP 649
34.3 The DHCP Server dhcpd
The core of any DHCP system is the dynamic host configuration protocol daemon. This
server leases addresses and watches how they are used, according to the settings defined
in the configuration file /etc/dhcpd.conf. By changing the parameters and values
in this file, a system administrator can influence the program's behavior in numerous
ways. Look at the basic sample /etc/dhcpd.conf file in Example 34.1, “The
Configuration File /etc/dhcpd.conf” (page 650).
This simple configuration file should be sufficient to get the DHCP server to assign IP
addresses in the network. Make sure that a semicolon is inserted at the end of each line,
because otherwise dhcpd is not started.
The sample file can be divided into three sections. The first one defines how many
seconds an IP address is leased to a requesting client by default
(default-lease-time) before it should apply for renewal. The section also includes
a statement of the maximum period for which a machine may keep an IP address assigned
by the DHCP server without applying for renewal (max-lease-time).
In the second part, some basic network parameters are defined on a global level:
• The line option domain-name defines the default domain of your network.
• The line option broadcast-address defines the broadcast address the re-
questing client should use.
• With option routers, set where the server should send data packets that
cannot be delivered to a host on the local network (according to the source and
target host address and the subnet mask provided). In most cases, especially in
smaller networks, this router is identical to the Internet gateway.
The last section of the file defines a network, including a subnet mask. To finish,
specify the address range that the DHCP daemon should use to assign IP addresses to
interested clients. In Example 34.1, “The Configuration File /etc/dhcpd.conf” (page 650),
clients may be given any address between 192.168.1.10 and 192.168.1.20 as
well as 192.168.1.100 and 192.168.1.200.
After editing these few lines, you should be able to activate the DHCP daemon with
the command rcdhcpd start. It will be ready for use immediately. Use the command
rcdhcpd check-syntax to perform a brief syntax check. If you encounter any
unexpected problems with your configuration—the server aborts with an error or does
not return done on start—you should be able to find out what has gone wrong by
looking for information either in the main system log /var/log/messages or on
console 10 (Ctrl + Alt + F10).
On a default SUSE Linux Enterprise system, the DHCP daemon is started in a chroot
environment for security reasons. The configuration files must be copied to the chroot
environment so the daemon can find them. Normally, there is no need to worry about
this because the command rcdhcpd start automatically copies the files.
DHCP 651
there were not enough addresses available and the server needed to redistribute them
among clients.
To identify a client configured with a static address, dhcpd uses the hardware address,
which is a globally unique, fixed numerical code consisting of six octet pairs for the
identification of all network devices (for example, 00:00:45:12:EE:F4). If the
respective lines, like the ones in Example 34.2, “Additions to the Configuration File”
(page 652), are added to the configuration file of Example 34.1, “The Configuration
File /etc/dhcpd.conf” (page 650), the DHCP daemon always assigns the same set of
data to the corresponding client.
The name of the respective client (host hostname, here earth) is entered in the
first line and the MAC address in the second line. On Linux hosts, find the MAC address
with the command ip link show followed by the network device (for example,
eth0). The output should contain something like
link/ether 00:00:45:12:EE:F4
In the preceding example, a client with a network card having the MAC address
00:00:45:12:EE:F4 is assigned the IP address 192.168.1.21 and the hostname
earth automatically. The type of hardware to enter is ethernet in nearly all cases,
although token-ring, which is often found on IBM systems, is also supported.
To enable dhcpd to resolve hostnames even from within the chroot environment, some
other configuration files must be copied as well:
• /etc/localtime
• /etc/host.conf
• /etc/hosts
• /etc/resolv.conf
These files are copied to /var/lib/dhcp/etc/ when starting the init script. Take
these copies into account for any changes that they require if they are dynamically
modified by scripts like /etc/ppp/ip-up. However, there should be no need to
worry about this if the configuration file only specifies IP addresses (instead of host-
names).
If your configuration includes additional files that should be copied into the chroot en-
vironment, set these under the variable DHCPD_CONF_INCLUDE_FILES in the file
/etc/sysconfig/dhcpd. To ensure that the DHCP logging facility keeps working
even after a restart of the syslog-ng daemon, there is an additional entry
SYSLOGD_ADDITIONAL_SOCKET_DHCP in the file /etc/sysconfig/syslog.
DHCP 653
Using NIS
As soon as multiple UNIX systems in a network want to access common resources, it
35
becomes important that all user and group identities are the same for all machines in
that network. The network should be transparent to users: whatever machines they use,
they always find themselves in exactly the same environment. This can be done by
means of NIS and NFS services. NFS distributes file systems over a network.
• To configure just one NIS server for your network, proceed with Section 35.1.1,
“Configuring a NIS Master Server” (page 656).
• If your NIS master server should export its data to slave servers, set up the master
server as described in Section 35.1.1, “Configuring a NIS Master Server” (page 656)
2 If you need just one NIS server in your network or if this server is to act as the
master for further NIS slave servers, select Install and set up NIS Master Server.
YaST installs the required packages.
TIP
3b Define whether the host should also be a NIS client, enabling users to log in
and access data from the NIS server, by selecting This host is also a NIS
client.
This makes the options Allow Changes to GECOS Field and Allow Changes
to Login Shell available. “GECOS” means that the users can also change
their names and address settings with the command ypchfn. “SHELL” al-
lows users to change their default shell with the command ypchsh, for ex-
ample, to switch from bash to sh. The new shell must be one of the predefined
entries in /etc/shells.
3c If your NIS server should act as a master server to NIS slave servers in other
subnets, select Active Slave NIS Server exists.
3d Select Open Ports in Firewall to have YaST adapt the firewall settings for
the NIS server.
Figure 35.3 Changing the Directory and Synchronizing Files for a NIS Server
4 If you previously enabled Active Slave NIS Server Exists, enter the hostnames
used as slaves and click Next.
5 If you do not use slave servers, the slave configuration is skipped and you con-
tinue directly to the dialog for the database configuration. Here, specify the maps,
the partial databases to transfer from the NIS server to the client. The default
settings are usually adequate. Leave this dialog with Next.
7 Enter the hosts that are allowed to query the NIS server. You can add, edit, or
delete hosts by clicking the appropriate button. Specify from which networks
requests can be sent to the NIS server. Normally, this is your internal network.
In this case, there should be the following two entries:
255.0.0.0 127.0.0.0
0.0.0.0 0.0.0.0
The first entry enables connections from your own host, which is the NIS server.
The second one allows all hosts to send requests to the server.
2 Select Install and set up NIS Slave Server and click Next.
TIP
3e Click Next.
4 Enter the hosts that are allowed to query the NIS server. You can add, edit, or
delete hosts by clicking the appropriate button. Specify from which networks
requests can be sent to the NIS server. Normally, this is all hosts. In this case,
there should be the following two entries:
255.0.0.0 127.0.0.0
0.0.0.0 0.0.0.0
The first entry enables connections from your own host, which is the NIS server.
The second one allows all hosts with access to the same network to send requests
to the server.
You can also specify multiple servers by entering their addresses in Addresses of NIS
servers and separating them by spaces.
Depending on your local installation, you may also want to activate the automounter.
This option also installs additional software if required.
After you have made your settings, click Finish to save them and return to the YaST
control center.
In the ideal case, a central server keeps the data in a directory and distributes it to all
clients using a certain protocol. The data is structured in a way that allows a wide range
of applications to access it. That way, it is not necessary for every single calendar tool
and e-mail client to keep its own database—a central repository can be accessed instead.
This notably reduces the administration effort for the information. The use of an open
and standardized protocol like LDAP ensures that as many different client applications
as possible can access such information.
A directory in this context is a type of database optimized for quick and effective
reading and searching:
• When static data is administered, updates of the existing data sets are very rare.
When working with dynamic data, especially when data sets like bank accounts or
accounting are concerned, the consistency of the data is of primary importance. If
an amount should be subtracted from one place to be added to another, both opera-
tions must happen concurrently, within a transaction, to ensure balance over the
data stock. Databases support such transactions. Directories do not. Short-term in-
consistencies of the data are quite acceptable in directories.
The design of a directory service like LDAP is not laid out to support complex update
or query mechanisms. All applications accessing this service should gain access
quickly and easily.
Unlike NIS, the LDAP service is not restricted to pure Unix networks. Windows servers
(from 2000) support LDAP as a directory service. Application tasks mentioned above
are additionally supported in non-Unix systems.
The LDAP principle can be applied to any data structure that should be centrally admin-
istered. A few application examples are:
• Address books for mail clients, like Mozilla, Evolution, and Outlook
This list can be extended because LDAP is extensible, unlike NIS. The clearly-defined
hierarchical structure of the data eases the administration of large amounts of data, be-
cause it can be searched more easily.
An LDAP directory has a tree structure. All entries (called objects) of the directory
have a defined position within this hierarchy. This hierarchy is called the directory in-
formation tree (DIT). The complete path to the desired entry, which unambiguously
identifies it, is called distinguished name or DN. A single node along the path to this
entry is called relative distinguished name or RDN. Objects can generally be assigned
to one of two possible types:
container
These objects can themselves contain other objects. Such object classes are root
(the root element of the directory tree, which does not really exist), c (country),
ou (organizational unit), and dc (domain component). This model is comparable
to the directories (folders) in a file system.
The top of the directory hierarchy has a root element root. This can contain c (country),
dc (domain component), or o (organization) as subordinate elements. The relations
within an LDAP directory tree become more evident in the following example, shown
in Figure 36.1, “Structure of an LDAP Directory” (page 666).
dc=example,dc=com
The complete diagram is a fictional directory information tree. The entries on three
levels are depicted. Each entry corresponds to one box in the picture. The complete,
valid distinguished name for the fictional employee Geeko Linux, in this case, is
cn=Geeko Linux,ou=doc,dc=example,dc=com. It is composed by adding
the RDN cn=Geeko Linux to the DN of the preceding entry
ou=doc,dc=example,dc=com.
The types of objects that should be stored in the DIT are globally determined following
a scheme. The type of an object is determined by the object class. The object class de-
termines what attributes the concerned object must or can be assigned. A scheme,
therefore, must contain definitions of all object classes and attributes used in the desired
application scenario. There are a few common schemes (see RFC 2252 and 2256). It
Table 36.1, “Commonly Used Object Classes and Attributes” (page 667) offers a small
overview of the object classes from core.schema and inetorgperson.schema
used in the example, including required attributes and valid attribute values.
Example 36.1, “Excerpt from schema.core ” (page 668) shows an excerpt from a scheme
directive with explanations (line numbering for explanatory reasons).
...
#4 objectclass ( 2.5.6.5 NAME 'organizationalUnit'
#5 DESC 'RFC2256: an organizational unit'
#6 SUP top STRUCTURAL
#7 MUST ou
#8 MAY (userPassword $ searchGuide $ seeAlso $ businessCategory
$ x121Address $ registeredAddress $ destinationIndicator
$ preferredDeliveryMethod $ telexNumber
$ teletexTerminalIdentifier $ telephoneNumber
$ internationaliSDNNumber $ facsimileTelephoneNumber
$ street $ postOfficeBox $ postalCode $ postalAddress
$ physicalDeliveryOfficeName
$ st $ l $ description) )
...
Line 2 gives a brief description of the attribute with DESC. The corresponding RFC on
which the definition is based is also mentioned here. SUP in line 3 indicates a superor-
dinate attribute type to which this attribute belongs.
A very good introduction to the use of schemes can be found in the documentation of
OpenLDAP. When installed, find it in /usr/share/doc/packages/openldap2/
admin-guide/index.html.
include /etc/openldap/schema/core.schema
include /etc/openldap/schema/cosine.schema
include /etc/openldap/schema/inetorgperson.schema
include /etc/openldap/schema/rfc2307bis.schema
include /etc/openldap/schema/yast.schema
pidfile /var/run/slapd/slapd.pid
argsfile /var/run/slapd/slapd.args
These two files contain the PID (process ID) and some of the arguments with which
the slapd process is started. There is no need for modifications here.
Example 36.4, “slapd.conf: Access Control” (page 670) is the excerpt from slapd
.conf that regulates the access permissions for the LDAP directory on the server. The
settings made here in the global section of slapd.conf are valid as long as no custom
access rules are declared in the database-specific section. These would overwrite the
global declarations. As presented here, all users have read access to the directory, but
only the administrator (rootdn) can write to this directory. Access control regulation
in LDAP is a highly complex process. The following tips can help:
• who determines who should be granted access to the areas determined with what.
Regular expressions may be used. slapd again aborts the evaluation of who after
the first match, so more specific rules should be listed before the more general ones.
The entries shown in Table 36.2, “User Groups and Their Access Grants” (page 671)
are possible.
Tag Scope
• access specifies the type of access. Use the options listed in Table 36.3, “Types
of Access” (page 671).
none No access
slapd compares the access right requested by the client with those granted in
slapd.conf. The client is granted access if the rules allow a higher or equal
right than the requested one. If the client requests higher rights than those declared
in the rules, it is denied access.
Example 36.5, “slapd.conf: Example for Access Control” (page 672) shows an example
of a simple access control that can be arbitrarily developed using regular expressions.
access to dn.regex="ou=([^,]+),dc=example,dc=com"
by dn.regex="cn=Administrator,ou=$1,dc=example,dc=com" write
by user read
by * none
This rule declares that only its respective administrator has write access to an individual
ou entry. All other authenticated users have read access and the rest of the world has
no access.
Find detailed information and an example configuration for LDAP access rights in the
online documentation of the installed openldap2 package.
database bdb❶
suffix "dc=example,dc=com"❷
checkpoint 1024 5❸
cachesize 10000❹
rootdn "cn=Administrator,dc=example,dc=com"❺
# Cleartext passwords, especially for the rootdn, should
# be avoided. See slappasswd(8) and slapd.conf(5) for details.
# Use of strong authentication encouraged.
rootpw secret❻
# The database directory MUST exist prior to running slapd AND
# should only be accessible by the slapd/tools. Mode 700 recommended.
directory /var/lib/ldap❼
# Indices to maintain
index objectClass eq❽
overlay ppolicy❾
ppolicy_default "cn=Default Password Policy,dc=example,dc=com"
ppolicy_hash_cleartext
ppolicy_use_lockout
❶ The type of database, a Berkeley database in this case, is set in the first line of
this section (see Example 36.6, “slapd.conf: Database-Specific Directives”
(page 673)).
❷ suffix determines for which portion of the LDAP tree this server should be
responsible.
❸ checkpoint determines the amount of data (in KB) that is kept in the transaction
log before it is written to the actual database and the time (in minutes) between
two write actions.
❹ cachesize sets the number of objects kept in the database's cache.
Custom Access rules defined here for the database are used instead of the global
Access rules.
# The Organization
dn: dc=example,dc=com
objectClass: dcObject
objectClass: organization
o: Example dc: example
LDAP works with UTF-8 (Unicode). Umlauts must be encoded correctly. Use
an editor that supports UTF-8, such as Kate or recent versions of Emacs. Other-
wise, avoid umlauts and other special characters or use recode to recode the
input to UTF-8.
Save the file with the .ldif suffix then pass it to the server with the following com-
mand:
-x switches off the authentication with SASL in this case. -D declares the user that
calls the operation. The valid DN of the administrator is entered here just like it has
been configured in slapd.conf. In the current example, this is
cn=Administrator,dc=example,dc=com. -W circumvents entering the pass-
word on the command line (in clear text) and activates a separate password prompt.
This password was previously determined in slapd.conf with rootpw. -f passes
the filename. See the details of running ldapadd in Example 36.8, “ldapadd with ex-
ample.ldif” (page 677).
The user data of individuals can be prepared in separate LDIF files. Example 36.9,
“LDIF Data for Tux” (page 677) adds Tux to the new LDAP directory.
# coworker Tux
dn: cn=Tux Linux,ou=devel,dc=example,dc=com
objectClass: inetOrgPerson
cn: Tux Linux
givenName: Tux
sn: Linux
mail: [email protected]
uid: tux
telephoneNumber: +49 1234 567-8
An LDIF file can contain an arbitrary number of objects. It is possible to pass entire
directory branches to the server at once or only parts of it as shown in the example of
individual objects. If it is necessary to modify some data relatively often, a fine subdi-
vision of single objects is recommended.
# coworker Tux
dn: cn=Tux Linux,ou=devel,dc=example,dc=com
changetype: modify
replace: telephoneNumber
telephoneNumber: +49 1234 567-10
Import the modified file into the LDAP directory with the following command:
ldapmodify -x -D cn=Administrator,dc=example,dc=com -W
Enter LDAP password:
2 Enter the changes while carefully complying with the syntax in the order presented
below:
Find detailed information about ldapmodify and its syntax in the ldapmodify
man page.
1 Log in as root.
4 If the LDAP server should announce its services via SLP, check Register at an
SLP Daemon.
1 Accept or modify the schema files included in the server's configuration by se-
lecting Schema Files in the left part of the dialog. The default selection of schema
files applies to the server providing a source of YaST user account data.
3 Determine the connection types the LDAP server should allow. Choose from:
bind_v2
This option enables connection requests (bind requests) from clients using
the previous version of the protocol (LDAPv2).
bind_anon_cred
Normally the LDAP server denies any authentication attempts with empty
credentials (DN or password). Enabling this option, however, makes it pos-
sible to connect with a password and no DN to establish an anonymous
connection.
bind_anon_dn
Enabling this option makes it possible to connect without authentication
(anonymously) using a DN but no password.
update_anon
Enabling this option allows nonauthenticated (anonymous) update operations.
Access is restricted according to ACLs and other rules (see Section 36.3.1,
“Global Directives in slapd.conf” (page 669)).
4 To configure secure communication between client and server, proceed with TLS
Settings:
4a Set TLS Active to Yes to enable TLS and SSL encryption of the client/server
communication.
• If you opted for using the common server certificate and it has not been
created during installation, it is subsequently created.
Base DN
Enter the base DN of your LDAP server.
Root DN
Enter the DN of the administrator in charge of the server. If you check Append
Base DN, only provide the cn of the administrator and the system fills in
the rest automatically.
LDAP Password
Enter the password for the database administrator.
Encryption
Determine the encryption algorithm to use to secure the password of Root
DN. Choose crypt, smd5, ssha, or sha. The dialog also includes a plain option
to enable the use of plain text passwords, but enabling this is not recommend-
ed for security reasons. To confirm your settings and return to the previous
dialog, select OK.
4b Activate Hash Clear Text Passwords to have clear text passwords be hashed
before they are written to the database whenever they are added or modified.
Do not use the Disclose Account Locked Status option if your environ-
ment is sensitive to security issues, because the “Locked Account”
error message provides security sensitive information that can be
exploited by a potential attacker.
4d Enter the DN of the default policy object. To use a DN other than the one
suggested by YaST, enter your choice. Otherwise accept the default setting.
If you have not opted for password policies, your server is ready to run at this point. If
you chose to enable password policies, proceed with the configuration of the password
policy in detail. If you chose a password policy object that does not yet exist, YaST
creates one:
2b Determine whether users can change their password and whether they need
to change their password after a reset by the administrator. Optionally require
the old password for password changes.
3a Determine the minimum password age (the time that needs to pass between
two valid password changes) and the maximum password age.
3c Set the number of grace uses of an expired password before the password
expires entirely.
4d Determine for how long password failures are kept in the cache before they
are purged.
To edit a previously created database, select its base DN in the tree to the left. In the
right part of the window, YaST displays a dialog similar to the one used for the creation
of a new database—with the main difference that the base DN entry is grayed out and
cannot be changed.
After leaving the LDAP server configuration by selecting Finish, you are ready to go
with a basic working configuration for your LDAP server. To fine-tune this setup, edit
the file /etc/openldap/slapd.conf accordingly then restart the server.
When manually configuring additional services to use LDAP, include the PAM LDAP
module in the PAM configuration file corresponding to the service in /etc/pam.d.
Configuration files already adapted to individual services can be found in /usr/
share/doc/packages/pam_ldap/pam.d/. Copy appropriate files to /etc/
pam.d.
glibc name resolution through the nsswitch mechanism is adapted to the employ-
ment of LDAP with nss_ldap. A new, adapted file nsswitch.conf is created in
/etc with the installation of this package. Find more about the workings of nsswitch
.conf in Section 30.6.1, “Configuration Files” (page 584). The following lines must
be present in nsswitch.conf for user administration and authentication with LDAP.
See Example 36.12, “Adaptations in nsswitch.conf” (page 685).
passwd_compat: ldap
group_compat: ldap
These lines order the resolver library of glibc first to evaluate the corresponding files
in /etc and additionally access the LDAP server as sources for authentication and
user data. Test this mechanism, for example, by reading the content of the user database
To prevent regular users managed through LDAP from logging in to the server with
ssh or login, the files /etc/passwd and /etc/group each need to include an
additional line. This is the line +::::::/sbin/nologin in /etc/passwd and
+::: in /etc/group.
Use the YaST LDAP client to further configure the YaST group and user configuration
modules. This includes manipulating the default settings for new users and groups and
the number and nature of the attributes assigned to a user or a group. LDAP user man-
agement allows you to assign far more and different attributes to users and groups than
traditional user or group management solutions. This is described in Section “Config-
uring the YaST Group and User Administration Modules” (page 690).
Basic Configuration
The basic LDAP client configuration dialog (Figure 36.3, “YaST: Configuration of the
LDAP Client” (page 687)) opens during installation if you choose LDAP user manage-
ment or when you select Network Services > LDAP Client in the YaST Control Center
in the installed system.
To authenticate users of your machine against an OpenLDAP server and enable user
management via OpenLDAP, proceed as follows:
1 Click Use LDAP to enable the use of LDAP. Select Use LDAP but Disable Logins
instead if you want to use LDAP for authentication, but do not want other users
to log in to this client.
3 Enter the LDAP base DN to select the search base on the LDAP server. To retrieve
the base DN automatically, click Fetch DN. YaST then checks for any LDAP
database on the server address specified above. Choose the appropriate base DN
from the search results given by YaST.
4 If TLS or SSL protected communication with the server is required, select LDAP
TLS/SSL.
5 If the LDAP server still uses LDAPv2, explicitly enable the use of this protocol
version by selecting LDAP Version 2.
1 In the Client Settings tab, adjust the following settings to your needs:
1a If the search base for users, passwords, and groups differs from the global
search base specified the LDAP base DN, enter these different naming con-
texts in User Map, Password Map, and Group Map.
1b Specify the password change protocol. The standard method to use whenever
a password is changed is crypt, meaning that password hashes generated
1c Specify the LDAP group to use with Group Member Attribute. The default
value for this is member.
2a Set the base for storing your user management data via Configuration Base
DN.
2b Enter the appropriate value for Administrator DN. This DN must be identical
with the rootdn value specified in /etc/openldap/slapd.conf to
enable this particular user to manipulate data stored on the LDAP server.
Enter the full DN (such as cn=Administrator,dc=example,dc=com)
or activate Append Base DN to have the base DN added automatically when
you enter cn=Administrator.
2d If your client machine should act as a file server for home directories across
your network, check Home Directories on This Machine.
2e Use the Password Policy section to select, add, delete, or modify the password
policy settings to use. The configuration of password policies with YaST is
part of the LDAP server setup.
2f Click Accept to leave the Advanced Configuration then Finish to apply your
settings.
Use Configure User Management Settings to edit entries on the LDAP server. Access
to the configuration modules on the server is then granted according to the ACLs and
ACIs stored on the server. Follow the procedures outlined in Section “Configuring the
YaST Group and User Administration Modules” (page 690).
The dialog for module configuration (Figure 36.5, “YaST: Module Configuration”
(page 690)) allows the creation of new modules, selection and modification of existing
configuration modules, and design and modification of templates for such modules.
1 Click New and select the type of module to create. For a user configuration
module, select suseuserconfiguration and for a group configuration
choose susegroupconfiguration.
3 Accept the preset values or adjust the defaults to use in group and user configu-
ration by selecting the respective attribute, pressing Edit, and entering the new
value. Rename a module by simply changing the cn attribute of the module.
Clicking Delete deletes the currently selected module.
4 After you click Accept, the new module is added to the selection menu.
The YaST modules for group and user administration embed templates with sensible
standard values. To edit a template associated with a configuration module, proceed
as follows:
2 Determine the values of the general attributes assigned to this template according
to your needs or leave some of them empty. Empty attributes are deleted on the
LDAP server.
3 Modify, delete, or add new default values for new objects (user or group confi-
guration objects in the LDAP tree).
TIP
The default values for an attribute can be created from other attributes by
using a variable instead of an absolute value. For example, when creating a
new user, cn=%sn %givenName is created automatically from the attribute
values for sn and givenName.
Once all modules and templates are configured correctly and ready to run, new groups
and users can be registered in the usual way with YaST.
1 Access the YaST user administration with Security & Users > User Administra-
tion.
2 Use Set Filter to limit the view of users to the LDAP users and enter the password
for Root DN.
3 Click Add and enter the configuration of a new user. A dialog with four tabs
opens:
3b Check the Details tab for the group membership, login shell, and home di-
rectory of the new user. If necessary, change the default to values that better
suit your needs. The default values as well as those of the password settings
can be defined with the procedure described in Section “Configuring the
YaST Group and User Administration Modules” (page 690).
3d Enter the Plug-Ins tab, select the LDAP plug-in, and click Launch to config-
ure additional LDAP attributes assigned to the new user (see Figure 36.7,
“YaST: Additional LDAP Settings” (page 694)).
4 Click Accept to apply your settings and leave the user configuration.
The initial input form of user administration offers LDAP Options. This gives the pos-
sibility to apply LDAP search filters to the set of available users or go to the module
for the configuration of LDAP users and groups by selecting LDAP User and Group
Configuration.
1 Log in as root.
3 Enter the address of the LDAP server, the AdministratorDN, and the password
for the RootDN of this server if you need both to read and write the data stored
on the server.
The LDAP Tree tab displays the content of the LDAP directory to which your
machine connected. Click items to unfold their subitems.
All attributes and values associated with this entry are displayed.
5 To change the value of any of these attributes, select the attribute, click Edit,
enter the new value, click Save, and provide the RootDN password when
prompted.
The Web site of the OpenLDAP project offers exhaustive documentation for beginning
and advanced LDAP users:
Understanding LDAP
A detailed general introduction to the basic principles of LDAP: http://www
.redbooks.ibm.com/redbooks/pdfs/sg244986.pdf.
The ultimate reference material for the subject of LDAP is the corresponding RFCs
(request for comments), 2251 to 2256.
37.1 Terminology
The following are some terms used in Samba documentation and in the YaST module.
SMB protocol
Samba uses the SMB (server message block) protocol that is based on the NetBIOS
services. Due to pressure from IBM, Microsoft released the protocol so other soft-
ware manufacturers could establish connections to a Microsoft domain network.
With Samba, the SMB protocol works on top of the TCP/IP protocol, so the TCP/IP
protocol must be installed on all clients.
IBM System z merely support SMB over TCP/IP. NetBIOS support is not
available on these systems.
CIFS protocol
CIFS (common Internet file system) protocol is another protocol supported by
Samba. CIFS defines a standard remote file system access protocol for use over
Samba 699
the network, enabling groups of users to work together and share documents across
the network.
NetBIOS
NetBIOS is a software interface (API) designed for communication between ma-
chines. Here, a name service is provided. It enables machines connected to the
network to reserve names for themselves. After reservation, these machines can be
addressed by name. There is no central process that checks names. Any machine
on the network can reserve as many names as it wants as long as the names are not
already in use. The NetBIOS interface can now be implemented for different net-
work architectures. An implementation that works relatively closely with network
hardware is called NetBEUI, but this is often referred to as NetBIOS. Network
protocols implemented with NetBIOS are IPX from Novell (NetBIOS via TCP/IP)
and TCP/IP.
The NetBIOS names sent via TCP/IP have nothing in common with the names
used in /etc/hosts or those defined by DNS. NetBIOS uses its own, completely
independent naming convention. However, it is recommended to use names that
correspond to DNS hostnames to make administration easier. This is the default
used by Samba.
Samba server
Samba server is a server that provides SMB/CIFS services and NetBIOS over IP
naming services to clients. For Linux, there are two daemons for Samba server:
smnd for SMB/CIFS services and nmbd for naming services.
Samba client
Samba client is a system that uses Samba services from a Samba server over the
SMB protocol. All common operating systems, such as Mac OS X, Windows, and
OS/2, support the SMB protocol. The TCP/IP protocol must be installed on all
computers. Samba provides a client for the different UNIX flavors. For Linux,
there is a kernel module for SMB that allows the integration of SMB resources on
the Linux system level. You do not need run any daemon for Samba client.
Shares
SMB servers provide hardware space to their clients by means of shares. Shares
are printers and directories with their subdirectories on the server. It is exported
by means of a name and can be accessed by its name. The share name can be set
to any name—it does not have to be the name of the export directory. A printer is
also assigned a name. Clients can access the printer by its name.
To stop or start running Samba services with YaST, use System > System Services
(Runlevel). From a command line, stop services required for Samba with rcsmb stop
&& rcnmb stop and start them with rcnmb start && rcsmb start.
You can change all settings from Samba Server Installation later in the Samba Server
Configuration dialog with the Identity tab.
Samba 701
Advanced Samba Configuration with YaST
During first start of Samba server module the Samba Server Configuration dialog appears
directly after Samba Server Installation dialog. Use it to adjust your Samba server
configuration.
In this tab, you can also open ports in your firewall. To do so, select Open Port in
Firewall. If you have multiple network interfaces, select the network interface for
Samba services by clicking Firewall Details, selecting the interfaces, and clicking OK.
Shares
In the Shares tab, determine the Samba shares to activate. There are some predefined
shares, like homes and printers. Use Toggle Status to switch between Active and Inactive.
Click Add to add new shares and Delete to delete the selected share.
Identity
In the Identity tab, you can determine the domain with which the host is associated
(Base Settings) and whether to use an alternative hostname in the network (NetBIOS
Host Name). To set expert global settings or set user authentication, for example LDAP,
click Advanced Settings.
Find more information about LDAP configuration in Chapter 36, LDAP—A Directory
Service (page 663).
After Samba server installation, SWAT is not activated. To activate it, open
Network Services > Network Services (xinetd) in YaST, enable the network services
configuration, select swat from the table, and click Toggle Status (On or Off).
Samba 703
workgroup = TUX-NET
This line assigns the Samba server to a workgroup. Replace TUX-NET with an
appropriate workgroup of your networking environment. Your Samba server appears
under its DNS name unless this name has been assigned to any other machine in
the network. If the DNS name is not available, set the server name using
netbiosname=MYNAME. See mansmb.conf for more details about this param-
eter.
os level = 2
This parameter triggers whether your Samba server tries to become LMB (local
master browser) for its workgroup. Choose a very low value to spare the existing
Windows network from any disturbances caused by a misconfigured Samba server.
More information about this important topic can be found in the files
BROWSING.txt and BROWSING-Config.txt under the textdocs subdi-
rectory of the package documentation.
When changing this setting, consider carefully how this could affect an existing
Windows network environment. First test the changes in an isolated network or at
a noncritical time of day.
If your Windows machines are connected to separate subnets and should still be
aware of each other, you need to set up a WINS server. To turn a Samba server
into such a WINS server, set the option wins support = Yes. Make sure that
only one Samba server of the network has this setting enabled. The options wins
server and wins support must never be enabled at the same time in your
smb.conf file.
[cdrom]
To avoid having the CD-ROM drive accidentally made available, these lines are
deactivated with comment marks (semicolons in this case). Remove the semicolons
in the first column to share the CD-ROM drive with Samba.
;[cdrom]
; comment = Linux CD-ROM
; path = /media/cdrom
; locking = No
path = /media/cdrom
path exports the directory /media/cdrom.
By means of a very restrictive default configuration, this kind of share is only made
available to the users present on this system. If this share should be made available
to everybody, add a line guest ok = yes to the configuration. This setting
gives read permissions to anyone on the network. It is recommended to handle this
parameter with great care. This applies even more to the use of this parameter in
the [global] section.
[homes]
The [home] share is of special importance here. If the user has a valid account
and password for the Linux file server and his own home directory, he can be
connected to it.
Samba 705
Example 37.2 homes Share
[homes]
comment = Home Directories
valid users = %S
browseable = No
read only = No
create mask = 0640
directory mask = 0750
[homes]
As long as there is no other share using the share name of the user connecting
to the SMB server, a share is dynamically generated using the [homes] share
directives. The resulting name of the share is the username.
valid users = %S
%S is replaced with the concrete name of the share as soon as a connection has
been successfully established. For a [homes] share, this is always the user-
name. As a consequence, access rights to a user's share are restricted exclusively
to the user.
browseable = No
This setting makes the share invisible in the network environment.
read only = No
By default, Samba prohibits write access to any exported share by means of
the read only = Yes parameter. To make a share writable, set the value
read only = No, which is synonymous with writable = Yes.
The selection of share, user, or server level security applies to the entire server. It is
not possible to offer individual shares of a server configuration with share level security
and others with user level security. However, you can run a separate Samba server for
each configured IP address on a system.
More information about this subject can be found in the Samba HOWTO Collection.
For multiple servers on one system, pay attention to the options interfaces and
bind interfaces only.
Samba 707
selected with the mouse. If you activate Also Use SMB Information for Linux Authenti-
cation, the user authentication runs over the Samba server. After completing all settings,
click Finish to finish the configuration.
TIP
[global]
workgroup = TUX-NET
domain logons = Yes
domain master = Yes
If encrypted passwords are used for verification purposes—this is the default setting
with well-maintained MS Windows 9x installations, MS Windows NT 4.0 from service
pack 3, and all later products—the Samba server must be able to handle these. The entry
encrypt passwords = yes in the [global] section enables this (with Samba
With the useradd command, a dollar sign is added. The command smbpasswd inserts
this automatically when the parameter -m is used. The commented configuration example
(/usr/share/doc/packages/Samba/examples/smb.conf.SuSE) contains
settings that automate this task.
To make sure that Samba can execute this script correctly, choose a Samba user with
the required administrator permissions. To do so, select one user and add it to the
ntadmin group. After that, all users belonging to this Linux group can be assigned
Domain Admin status with the command:
More information about this topic is provided in Chapter 12 of the Samba HOWTO
Collection, found in /usr/share/doc/packages/samba/
Samba-HOWTO-Collection.pdf.
Samba 709
Join an existing AD domain during installation or by later activating SMB user authen-
tication with YaST in the installed system. Domain join during installation is covered
in Section 3.14.7, “Users” (page 42).
4 Check Also Use SMB Information for Linux Authentication to use the SMB source
for Linux authentication on your SUSE Linux Enterprise Server.
5 Click Finish and confirm the domain join when prompted for it.
6 Provide the password for the Windows Administrator on the AD server and click
OK.
Your server is now set up to pull in all authentication data from the Active Direc-
tory domain controller.
It is not necessary to configure it all manually. You can use scripts from smbldap-tools.
These scripts are part of the package samba-doc and, after installation of the package,
are available in /usr/share/doc/packages/samba/examples/LDAP.
Samba 711
37.7.2 Preparing the Samba Server
Before you start migration, configure your Samba server. Find configuration of
profile, netlogon, and home shares in the Shares tab of the YaST Samba Server
module. To do the default value, select the share and click Edit.
To add LDAP configuration for your Samba server and the credentials of the LDAP
administrator, use the LDAP Settings tab of the YaST Samba Server module. The LDAP
administration DN (label Administration DN) and password are essential to add or
modify accounts stored in the LDAP directory.
8 Copy saved profiles to the appropriate profile directories on your Samba server.
1 Create a BDC account in the old NT4 domain for the Samba server using NT
Server Manager. Samba must not be running.
Samba 713
The Samba HOWTO Collection provided by the Samba team includes a section about
troubleshooting. In addition to that, Part V of the document provides a step-by-step
guide to checking your configuration. You can find Samba HOWTO Collection in
/usr/share/doc/packages/samba/Samba-HOWTO-Collection.pdf
after installing the package samba-doc.
Find detailed information about LDAP and migration from Windows NT or 2000 in
/usr/share/doc/packages/samba/examples/LDAP/
smbldap-tools-*/doc, where * is your smbldap-tools version.
NFS works with NIS to make a network transparent to the user. With NFS, it is possible
to distribute arbitrary file systems over the network. With an appropriate setup, users
always find themselves in the same environment independent of the terminal they cur-
rently use.
Like NIS, NFS is a client/server system. However, a machine can be both—it can supply
file systems over the network (export) and mount file systems from other hosts (import).
In principle, all exports can be made using IP addresses only. To avoid time-
outs, you should have a working DNS system. This is necessary at least for log-
ging purposes, because the mountd daemon does reverse lookups.
The configuration is written to /etc/fstab and the specified file systems are
mounted. When you start the YaST configuration client at a later point in time, it also
reads the existing configuration from this file.
An NFSv4 file system can currently only be imported manually. This is explained in
Section 38.3, “Importing File Systems Manually” (page 717).
If user directories from the machine sun, for example, should be imported, use the fol-
lowing command:
The idmapd services stores its parameters in the /etc/idmapd.conf file. Leave
the value of the Domain parameter as localdomain. Ensure that the value specified
is the same for both the NFS client and NFS server.
Make NFSv4 imports by giving a command from the shell prompt. To import NFSv4
remote file systems, use the following command:
mount -t nfs4 host:/ local-path
Replace host with the NFS server that hosts one or more NFSv4 exports and
local-path with the directory location in the client machine where this should be
mounted. For example, to import /home exported with NFSv4 on sun to /local/
home, use the following command:
mount -t nfs4 sun:/ /local/home
The remote file system path that follows the server name and a colon is a slash “/”. This
is unlike the way it is specified for v3 imports, where the exact path of the remote file
system is given. This is a concept called pseudo file system, which is explained in Sec-
tion 38.4.1, “Exporting for NFSv4 Clients” (page 721).
Now the /nfsmounts directory acts as a root for all the NFS mounts on the client if
the auto.nfs file is completed appropriately. The name auto.nfs is chosen for
sake of convenience—you can choose any name. In the selected file (create it if it does
not exist), add entries for all the NFS mounts as in the following example:
localdata -fstype=nfs server1:/data
nfs4mount -fstype=nfs4 server2:/
If the /etc/auto.master file is edited while the service autofs is running, the au-
tomounter must be restarted for the changes to take effect. Do this with rcautofs
restart.
NFSv4 mounts may also be added to the /etc/fstab file manually. For these mounts,
use nfs4 instead of nfs in the third column and make sure that the remote file system
is given as // after the host: in the first column. The advantage of saving this infor-
mation in /etc/fstab is that commands for mounting can be shortened to just
mentioning the local mount point alone, for example:
mount /local/path
Next, activate Start NFS Server and enter the NFSv4 domain name.
Click Enable GSS Security if you need secure access to the server. A prerequisite for
this is to have Kerberos installed in your domain and both the server and the clients are
kerberized. Click Next.
In the upper text field, enter the directories to export. Below, enter the hosts that should
have access to them. This dialog is shown in Figure 38.3, “Configuring an NFS Server
with YaST” (page 721). The figure shows the scenario where NFSv4 is enabled in the
previous dialog. Bindmount Targets is shown in the right pane. For more details,
refer to the help shown on the left pane. In the lower half of the dialog, there are four
options that can be set for each host: single host, netgroups, wildcards,
and IP networks. For a more thorough explanation of these options, refer to
exports man page. Click Finish to complete the configuration.
After activating NFSv4, enter an appropriate domain name. Make sure that the name
entered is the same as the one present in the /etc/idmapd.conf file of any NFSv4
client that accesses this particular server. This parameter is for the idmapd service that
is required for NFSv4 support (on both server and client). Leave it as localdomain
(the default) if you do not have special requirements. For more information, see Sec-
tion 38.7, “For More Information” (page 728).
For a fixed set of clients, there are two types of directories that can be exported—direc-
tories that act as pseudo root file systems and those that are bound to some subdirectory
of the pseudo file system. This pseudo file system acts as a base point under which all
file systems exported for the same client set take their place. For a client or set of clients,
only one directory on the server can be configured as pseudo root for export. For this
same client, export multiple directories by binding them to some existing subdirectory
in the pseudo root.
In the lower half of the dialog, enter the client (wild card) and export options for a
particular directory. After adding a directory in the upper half, another dialog for entering
the client and option information pops up automatically. After that, to add a new client
(client set), click Add Host.
In the small dialog that opens, enter the host wild card. There are four possible types
of host wild cards that can be set for each host: a single host (name or IP address), net-
groups, wild cards (such as * indicating all machines can access the server), and IP
networks. Then, in Options, include fsid=0 in the comma-separated list of options
For example, suppose that the directory /exports is chosen as the pseudo root direc-
tory for all the clients that can access the server. Then add this in the upper half and
make sure that the options entered for this directory include fsid=0. If there is another
directory, /data, that also needs to be NFSv4 exported, add this directory to the upper
half. While entering options for this, make sure that bind=/exports/data is in
the list and that /exports/data is an already existing subdirectory of /exports.
Any change in the option bind=/target/path, whether addition, deletion, or
change in value, is reflected in Bindmount targets. This column is not directly editable
column, instead summarizing directories and their nature. After the information is
complete, click Finish to complete the configuration or Start to restart the service.
The next dialog has two parts. In the upper text field, enter the directories to export.
Below, enter the hosts that should have access to them. There are four types of host
wild cards that can be set for each host: a single host (name or IP address), netgroups,
wild cards (such as * indicating all machines can access the server), and IP networks.
This dialog is shown in Figure 38.4, “Exporting Directories with NFSv4” (page 722).
Find a more thorough explanation of these options in man exports. Click Finish to
complete the configuration.
IMPORTANT
If SuSEfirewall2 is active on your system, YaST adapts its configuration for the
NFS server by enabling service when Open Ports in Firewall is selected.
For example:
/export 192.168.1.2(rw,fsid=0,sync)
/data 192.168.1.2(rw,bind=/export/data,sync)
Those directories for which fsid=0 is specified in the option list are called pseudo
root file systems. Here, the IP address 192.168.1.2 is used. You can use the name of
the host, a wild card indicating a set of hosts (*.abc.com, *, etc.), or netgroups.
For a fixed set of clients, there are only two types of directories that can be NFSv4 ex-
ported:
• A single directory that is chosen as the pseudo root file system. In this example,
/exports is the pseudo root directory because fsid=0 is specified in the option
list for this entry.
The pseudo file system is the top level directory under which all file systems that need
to be NFSv4 exported take their places. For a client or set of clients, there can only be
one directory on the server configured as the pseudo root for export. For this same client
or client set, multiple other directories can be exported by binding them to some existing
subdirectory in the pseudo root.
/etc/sysconfig/nfs
This file contains a few parameters that determine NFSv4 server daemon behavior.
Importantly, the parameter NFSv4_SUPPORT must be set to yes. This parameter deter-
mines whether the NFS server supports NFSv4 exports and clients.
/etc/idmapd.conf
Every user on a Linux machine has a name and ID. idmapd does the name-to-ID mapping
for NFSv4 requests to the server and replies to the client. This must be running on both
server and client for NFSv4, because NFSv4 uses only names in its communication.
Make sure that there is a uniform way in which usernames and IDs (uid) are assigned
to users across machines that might probably be sharing file systems using NFS. This
can be achieved by using NIS, LDAP, or any uniform domain authentication mechanism
in your domain.
For proper function, the parameter Domain must be set the same for both client and
server in this file. If you are not sure, leave the domain as localdomain in both
server and client files. A sample configuration file looks like the following:
[General]
Verbosity = 0
Pipefs-Directory = /var/lib/nfs/rpc_pipefs
Domain = localdomain
[Mapping]
Nobody-User = nobody
Nobody-Group = nobody
Exporting file systems with NFS involves two configuration files: /etc/exports
and /etc/sysconfig/nfs. A typical /etc/exports file entry is in the format:
/shared/directory host(list_of_options)
For example:
/export 192.168.1.2(rw,sync)
Here, the directory /export is shared with the host 192.168.1.2 with the option list
rw,sync. This IP address can replaced with a client name or set of clients using a
wild card (such as *.abc.com) or even netgroups.
For a detailed explanation of all options and their meanings, refer to the man page of
exports (man exports).
• Make sure that both the server and the client are in the same Kerberos domain. This
means that they access the same KDC (Key Distribution Center) server and share
their krb5.keytab file (the default location on any machine is /etc/krb5
.keytab).
For further information about configuring kerberized NFS, refer to the links in Sec-
tion 38.7, “For More Information” (page 728).
For instructions for setting up kerberized NFS, refer to NFS Version 4 Open Source
Reference Implementation [http://www.citi.umich.edu/projects/nfsv4/
linux/krb5-setup.html]
If you have any questions on NFSv4, refer to the Linux NFSv4 Frequently Asked
Questions [http://www.citi.umich.edu/projects/nfsv4/linux/faq/]
FAQ.
Before you start managing your data with a synchronization system, you should
be well acquainted with the program used and test its functionality. A backup
is indispensable for important files.
39.1.1 CVS
CVS, which is mostly used for managing program source versions, offers the possibil-
ity to keep copies of the files on multiple computers. Accordingly, it is also suitable
for data synchronization. CVS maintains a central repository on the server in which the
files and changes to files are saved. Changes that are performed locally are committed
to the repository and can be retrieved from other computers by means of an update.
Both procedures must be initiated by the user.
CVS is very resilient to errors when changes occur on several computers. The changes
are merged and, if changes took place in the same lines, a conflict is reported. When a
conflict occurs, the database remains in a consistent state. The conflict is only visible
for resolution on the client host.
39.1.2 rsync
When no version control is needed but large directory structures need to be synchronized
over slow network connections, the tool rsync offers well-developed mechanisms for
transmitting only changes within files. This not only concerns text files, but also binary
files. To detect the differences between files, rsync subdivides the files into blocks and
computes checksums over them.
The effort put into the detection of the changes comes at a price. The systems to syn-
chronize should be scaled generously for the usage of rsync. RAM is especially impor-
tant.
The other possibility is to let all networked hosts synchronize their data between each
other as peers. rsync actually works in client mode, but any client can also act as a
server.
39.2.2 Portability
CVS and rsync are also available for many other operating systems, including various
Unix and Windows systems.
39.2.6 History
An additional feature of CVS is that old file versions can be reconstructed. A brief
editing remark can be inserted for each change and the development of the files can
easily be traced later based on the content and the remarks. This is a valuable aid for
theses and program texts.
39.2.8 GUI
Experienced users normally run CVS from the command line. However, graphical user
interfaces are available for Linux, such as cervisia, and for other operating systems,
like wincvs. Many development tools, such as kdevelop, and text editors, such as Emacs,
provide support for CVS. The resolution of conflicts is often much easier to perform
with these front-ends.
Table 39.1 Features of the File Synchronization Tools: -- = very poor, - = poor or
not available, o = medium, + = good, ++ = excellent, x = available
CVS rsync
Interactivity x x
Speed o +
Conflicts ++ o
History x -
GUI o -
Difficulty o +
Data Loss ++ +
When configuring a CVS server, it might be a good idea to grant users access to the
server via SSH. If the user is known to the server as tux and the CVS software is in-
stalled on the server as well as on the client, the following environment variables must
be set on the client side:
The command cvs init can be used to initialize the CVS server from the client side.
This needs to be done only once.
Many CVS commands require a comment. For this purpose, CVS starts an editor (the
editor defined in the environment variable $EDITOR or vi if no editor was defined).
The editor call can be circumvented by entering the comment in advance on the com-
mand line, such as in the following example:
By default, all files (including subdirectories) are committed to the server. To commit
only individual files or directories, specify them as in cvs commit file1
directory1. New files and directories must be added to the repository with a com-
mand like cvs add file1 directory1 before they are committed to the server.
Subsequently, commit the newly added files and directories with cvs commit file1
directory1.
If you change to another workstation, check out the synchronization repository if this
has not been done during an earlier session at the same workstation.
U
The local version was updated. This affects all files that are provided by the server
and missing on the local system.
M
The local version was modified. If there were changes on the server, it was possible
to merge the differences in the local copy.
P
The local version was patched with the version on the server.
C
The local file conflicts with current version in the repository.
?
This file does not exist in CVS.
The status M indicates a locally modified file. Either commit the local copy to the
server or remove the local file and run the update again. In this case, the missing file
is retrieved from the server. If you commit a locally modified file and the file was
changed in the same line and committed, you might get a conflict, indicated with C.
In this case, look at the conflict marks (»> and «<) in the file and decide between the
two versions. As this can be a rather unpleasant job, you might decide to abandon your
changes, delete the local file, and enter cvs up to retrieve the current version from the
server.
• Rsync: http://www.gnu.org/manual
The basic mode of operation of rsync does not require any special configuration. rsync
directly allows mirroring complete directories onto another system. As an example, the
following command creates a backup of the home directory of tux on a backup server
named sun:
Up to this point, the handling does not differ much from that of a regular copying tool,
like scp.
rsync should be operated in “rsync” mode to make all its features fully available. This
is done by starting the rsyncd daemon on one of the systems. Configure it in the file
/etc/rsyncd.conf. For example, to make the directory /srv/ftp available with
rsync, use the following configuration:
[FTP]
path = /srv/ftp
comment = An Example
Then start rsyncd with rcrsyncd start. rsyncd can also be started automatically
during the boot process. Set this up by activating this service in the runlevel editor
provided by YaST or by manually entering the command insserv rsyncd. rsyncd
can alternatively be started by xinetd. This is, however, only recommended for servers
that rarely use rsyncd.
The example also creates a log file listing all connections. This file is stored in /var/
log/rsyncd.log.
It is then possible to test the transfer from a client system. Do this with the following
command:
This command lists all files present in the directory /srv/ftp of the server. This re-
quest is also logged in the log file /var/log/rsyncd.log. To start an actual
transfer, provide a target directory. Use . for the current directory. For example:
By default, no files are deleted while synchronizing with rsync. If this should be forced,
the additional option --delete must be stated. To ensure that no newer files are
deleted, the option --update can be used instead. Any conflicts that arise must be
resolved manually.
If you want Subversion or other tools, download the the SDK. Find it at http://
developer.novell.com/wiki/index.php/SUSE_LINUX_SDK.
40.1.1 Requirements
Make sure that the following requirements are met before trying to set up the Apache
Web server:
1. The machine's network is configured properly. For more information about this
topic, refer to Chapter 30, Basic Networking (page 543).
3. The latest security updates are installed. If in doubt, run a YaST Online Update.
4. The default Web server port (port 80) is opened in the firewall. For this, configure
the SUSEFirewall2 to allow the service HTTP Server in the external zone. This
can be done using YaST. Section 43.4.1, “Configuring the Firewall with YaST”
(page 825) gives details.
40.1.2 Installation
Apache on SUSE Linux Enterprise Server is not installed by default. To install it, start
YaST and select Software > Software Management. Now choose Filter > Patterns and
select Web and LAMP Server under Primary Functions. Confirm the installation of the
dependent packages to finish the installation process.
Apache is installed with a standard, predefined configuration that runs “out of the box”.
The installation includes the multiprocessing module apache2-prefork as well
the PHP5 module. Refer to Section 40.4, “Installing, Activating, and Configuring
Modules” (page 759) for more information about modules.
40.1.3 Start
To start Apache and make sure that it is automatically started during boot, start YaST
and select System > System Services (Runlevel). Search for apache2 and Enable the
service. The Web server starts immediately. By saving your changes with Finish, the
system is configured to automatically start Apache in runlevels 3 and 5 during boot.
For more information about the runlevels in SUSE Linux Enterprise Server and a de-
scription of the YaST runlevel editor, refer to Section 20.2.3, “Configuring System
Services (Runlevel) with YaST” (page 398).
To start Apache using the shell, run rcapache2 start. To make sure that Apache
is automatically started during boot in runlevels 3 and 5, use chkconfig -a
apache2.
Now that the Web server is running, you can add your own documents, adjust the con-
figuration according to your needs, or add functionality by installing modules.
Changes to most configuration values for Apache only take effect after Apache
is restarted or reloaded. This happens automatically when using YaST and fin-
ishing the configuration with Enabled checked for the HTTP Service. Manual
restart is described in Section 40.3, “Starting and Stopping Apache” (page 757).
Most configuration changes only require a reload with rcapache2 reload.
Configuration Files
Apache configuration files can be found in two different locations:
• /etc/sysconfig/apache2
• /etc/apache2/
/etc/apache2/
/etc/apache2/ hosts all configuration files for Apache. In the following, the purpose
of each file is explained. Each file includes several configuration options (also referred
to as directives). Every configuration option in these files is extensively documented
and therefore not mentioned here.
charset.conv
Specifies which character sets to use for different languages. Do not edit.
conf.d/*.conf
Configuration files added by other modules. These configuration files can be in-
cluded into your virtual host configuration where needed. See vhosts.d/vhost
.template for examples. By doing so, you can provide different module sets
for different virtual hosts.
default-server.conf
Global configuration for all virtual hosts with reasonable defaults. Instead of
changing the values, overwrite them with a virtual host configuration.
errors.conf
Defines how Apache responds to errors. To customize these messages for all virtual
hosts, edit this file. Otherwise overwrite these directives in your virtual host con-
figurations.
httpd.conf
The main Apache server configuration file. Avoid changing this file. It mainly
contains include statements and global settings. Overwrite global settings in the
respective configuration files listed here. Change host-specific settings (such as
document root) in your virtual host configuration.
listen.conf
Binds Apache to specific IP addresses and ports. Name-based virtual hosting (see
Section “Name-Based Virtual Hosts” (page 747) is also configured here.
magic
Data for the mime_magic module that helps Apache automatically determine the
MIME type of an unknown file. Do not change.
mime.types
MIME types known by the system (this actually is a link to /etc/mime.types).
Do not edit. If you need to add MIME types not listed here, add them to mod
_mime-defaults.conf.
server-tuning.conf
Contains configuration directives for the different MPMs (see Section 40.4.4,
“Multiprocessing Modules” (page 763)) as well as general configuration options
that control Apache's performance. Properly test your Web server when making
changes here.
sysconfig.d/*.conf
Configuration files automatically generated from /etc/sysconfig/apache2.
Do not change any of these files—edit /etc/sysconfig/apache2 instead.
Put no other configuration files in this directory.
uid.conf
Specifies under which user and group ID Apache runs. Do not change.
vhosts.d/*.conf
Your virtual host configuration should go here.The directory contains template
files for virtual hosts with and without SSL. Every file in this directory ending in
.conf is automatically included in the Apache configuration. Refer to Section
“Virtual Host Configuration” (page 746) for details.
It is common practice to use virtual hosts to save administrative effort (only a single
Web server needs to be maintained) and hardware expenses (each domain does not re-
quire a dedicated server). Virtual hosts can be name based, IP based, or port based.
The first argument can be a fully qualified domain name, but it is recommended to use
the IP address. The second argument is the port and is optional. By default, port 80 is
used and is configured via the Listen directive.
The opening VirtualHost tag takes the IP address (or fully qualified domain name)
previously declared with the NameVirtualHost as an argument in a name-based
virtual host configuration. A port number previously declared with the
NameVirtualHost directive is optional.
The wild card * is also allowed as a substitute for the IP address. This syntax is only
valid in combination with the wild card usage in NameVirtualHost * . When using
IPv6 addresses, the address must be included in square brackets.
<VirtualHost 192.168.3.100>
...
</VirtualHost>
<VirtualHost *:80>
...
</VirtualHost>
<VirtualHost *>
...
</VirtualHost>
<VirtualHost [2002:c0a8:364::]>
...
</VirtualHost>
The physical server must have one IP address for each IP-based virtual host. If the
machine does not have multiple network cards, virtual network interfaces (IP aliasing)
can also be used.
<VirtualHost 192.168.3.102>
...
</VirtualHost>
Here, VirtualHost directives are only specified for interfaces other than
192.168.3.100. When a Listen directive is also configured for
192.168.3.100, a separate IP-based virtual host must be created to answer HTTP
requests to that interface—otherwise the directives found in the default server configu-
ration (/etc/apache2/default-server.conf) are applied.
ServerName
The fully qualified domain name under which the host should be addressed.
ServerAdmin
E-mail address of the server administrator. This address is, for example, shown on
error pages Apache creates.
ErrorLog
The error log file for this virtual host. Although it is not necessary to create separate
error log files for each virtual host, it is common practice to do so, because it makes
debugging of errors much easier. /var/log/apache2/ is the default directory
where Apache's log files should be kept.
CustomLog
The access log file for this virtual host. Although it is not necessary to create separate
access log files for each virtual host, it is common practice to do so, because it allows
separate analysis of access statistics for each host. /var/log/apache2/ is the
default directory where Apache's log files should be kept.
As mentioned above, access to the whole file system is forbidden by default for security
reasons. Therefore, explicitly unlock the directories in which you have placed the files
Apache should serve—for example the DocumentRoot:
<Directory "/srv/www/www.example.com/htdocs">
Order allow,deny
Allow from all
</Directory>
Check Open Firewall for Selected Ports to open the ports in the firewall that the Web
server listens on. This is necessary to make the Web server available on the network,
which can be a LAN, WAN, or the public Internet. Keeping the port closed is only
useful in test situations where no external access to the Web server is necessary.
Modules
The Modules configuration option allows for the activation or deactivation of the script
languages, the web server should support. For the activation or deactivation of other
modules, refer to Section “Server Modules” (page 756). Click Next to advance to the
next dialog.
To edit the host settings (also called directives), choose the appropriate entry in the table
then click Edit. To add new directives, click Add. To delete a directive, select it and
click Delete.
Document Root
Path to the directory from which Apache serves files for this host. /srv/www/
htdocs is the default location.
Alias
With the help of Alias directives, URLs can be mapped to physical file system
locations. This means that a certain path even outside the Document Root in
the file system can be accessed via a URL aliasing that path.
ScriptAlias
Similar to the Alias directive, the ScriptAlias directive maps a URL to a
file system location. The difference is that ScriptAlias designates the target
directory as a CGI location, meaning that CGI scripts should be executed in that
location.
Directory
With the Directory setting, you can enclose a group of configuration options
that will only apply to the specified directory.
Include
With include, additional configuration files can be specified. Two Include direc-
tives are already preconfigured: /etc/apache2/conf.d/ is the directory
containing the configuration files that come with external modules. With this direc-
tive, all files in this directory ending in .conf are included. With the second di-
rective, /etc/apache2/conf.d/apache2-manual?conf, the
apache2-manual configuration file is included.
Server Name
This specifies the default URL used by clients to contact the Web server. Use a
fully qualified domain name (FQDN) to reach the Web server at http://FQDN/
or its IP address. You cannot choose an arbitrary name here—the server must be
“known” under this name.
After finishing with the Default Host step, click Next to continue with the configuration.
To add a host, click Add to open a dialog in which to enter basic information about the
host. Server Identification includes the server name, server contents root
(DocumentRoot), and administrator e-mail. Server Resolution is used to determine
how a host is identified (name based or IP based). Specify the name or IP address with
Change Virtual Host ID
Clicking Next advances to the second part of the virtual host configuration dialog.
In part two of the virtual host configuration you can specify whether to enable CGI
scripts and which directory to use for these scripts. It is also possible to enable SSL. If
you do so, you must specify the path to the certificate as well. See Section 40.6.2,
“Configuring Apache with SSL” (page 773) for details on SSL and certificates. With
the Directory Index option, you can specify which file to display when the client requests
a directory (by default, index.html). Add one or more filenames (space-separated) if
you want to change this. With Enable Public HTML, the content of the users public
directories (~user/public_html/) is made available on the server under
http://www.example.com/~user.
It is not possible to add virtual hosts at will. If using name-based virtual hosts,
each hostname must be resolved on the network. If using IP-based virtual hosts,
you can assign only one host to each IP address available.
Summary
This is the final step of the wizard. Here, determine how and when the Apache server
is started: when booting or manually. Also see a short summary of the configuration
made so far. If you are satisfied with your settings, click Finish to complete configura-
tion. If you want to change something, click Back until you have reached the desired
dialog. Clicking HTTP Server Expert Configuration opens the dialog described in
Section “HTTP Server Configuration” (page 755).
With Log Files, watch either the access log or the error log. This is useful if you want
to test your configuration. The log file opens in a separate window from which you can
Server Modules
You can change the status (enabled or disabled) of Apache2 modules by clicking Toggle
Status. Click Add Module to add a new module that is already installed but not yet
listed. Learn more about modules in Section 40.4, “Installing, Activating, and Config-
uring Modules” (page 759).
To start, stop, or manipulate Apache on a running system, use the init script
/usr/sbin/rcapache2 (refer to Section 20.2.2, “Init Scripts” (page 394) for a
general information about init scripts.). The rcapache2 command takes the following
parameters:
start
Starts Apache if it is not already running.
stop
Stops Apache by terminating the parent process.
restart
Stops then restarts Apache. Starts the Web server if it was not running before.
try-restart
Stops then restarts Apache only if it has been running before.
reload or graceful
Stops the Web server by advising all forked Apache processes to first finish their
requests before shutting down. As each process dies, it is replaced by a newly
started one, resulting in complete “restart” of Apache.
TIP
configtest
Checks the syntax of the configuration files without affecting a running Web
server. Because this check is forced every time the server is started, reloaded, or
restarted, it is usually not necessary to run the test explicitly (if a configuration error
is found, the Web server is not started, reloaded, or restarted).
probe
Probes for the necessity of a reload (checks whether the configuration has changed)
and suggests the required arguments for the rcapache2 command.
If you specify additional flags to the rcapache2, these are passed through to
the Web server.
Apache modules can be compiled into the Apache binary at build time or dynamically
loaded at runtime. Refer to Section 40.4.2, “Activation and Deactivation” (page 760)
for details of how to load modules dynamically.
Base Modules
Base modules are compiled into Apache by default. Apache in SUSE Linux has
only mod_so (needed to load other modules) and http_core compiled in. All others
are available as shared objects: rather than being included in the server binary itself,
they can be included at runtime.
Extension Modules
In general, modules labeled as extensions are included in the Apache software
package, but are usually not compiled into the server statically. In SUSE Linux
Enterprise Server, they are available as shared objects that can be loaded into
Apache at runtime.
External Modules
Modules labeled external are not included in the official Apache distribution. SUSE
Linux Enterprise Server provides several of them readily available for use.
Multiprocessing Modules
MPMs are responsible for accepting and handling requests to the Web server, rep-
resenting the core of the Web server software.
You can install additional external modules by starting YaST and choosing Software
> Software Management. Now choose Filter > Search and search for apache. Among
other packages, the result list contains all available external Apache modules.
If you prefer to activate or deactivate the modules manually, use the commands
a2enmod mod_foo or a2dismod mod_foo, respectively. a2enmod -l outputs
a list of all currently active modules.
If you have activated external modules manually, make sure to load their con-
figuration files in all virtual host configurations. Configuration files for external
modules are located under /etc/apache2/conf.d/ and are not loaded by
default. If you need the same modules on each virtual host, you can include *
.conf from this directory. Otherwise include individual files. See /etc/
apache2/vhost.d/vhost.template for examples.
mod_alias
Provides Alias and Redirect directives with which you can map a URl to a
specific directory (Alias) or redirect a requested URL to another location. This
module is enabled by default.
mod_auth*
The authentication modules provide different authentication methods: basic authen-
tication with mod_auth_basic or digest authentication with mod_auth_digest. Digest
authentication in Apache 2.2 is considered experimental.
mod_autoindex
Autoindex generates directory listings when no index file (for example, index
.html) is present. The look and feel of these indexes is configurable. This module
is enabled by default. However, directory listings are disabled by default via the
Options directive—overwrite this setting in your virtual host configuration. The
default configuration file for this module is located at /etc/apache2/mod
_autoindex-defaults.conf.
mod_cgi
mod_cgi is needed to execute CGI scripts. This module is enabled by default.
mod_deflate
Using this module, Apache can be configured to compress given file types on the
fly before delivering them.
mod_dir
mod_dir provides the DirectoryIndex directive with which you can configure
which files are automatically delivered when a directory is requested (index
mod_env
Controls the environment that is passed to CGI scripts or SSI pages. Environment
variables can be set or unset or passed from the shell that invoked the httpd process.
This module is enabled by default.
mod_expires
With mod_expires, you can control how often proxy and browser caches refresh
your documents by sending an Expires header. This module is enabled by default.
mod_include
mod_include lets you use Server Side Includes (SSI), which provide a basic func-
tionality to generate HTML pages dynamically. This module is enabled by default.
mod_info
Provides a comprehensive overview of the server configuration under http://local-
host/server-info/. For security reasons, you should always limit access to this URL.
By default only localhost is allowed to access this URL. mod_info is configured
at /etc/apache2/mod_info.conf
mod_log_config
With this module, you can configure the looks of the Apache log files. This module
is enabled by default.
mod_mime
The mime module takes care that a file is delivered with the correct MIME header
based on the filename's extension (for example text/html for HTML documents).
This module is enabled by default.
mod_negotiation
Necessary for content negotiation. See http://httpd.apache.org/docs/
2.2/content-negotiation.html for more information. This module is
enabled by default.
mod_rewrite
Provides the functionality of mod_alias, but offers more features and flexibility.
With mod_rewrite, you can redirect URLs based on multiple rules, request headers,
and more.
mod_speling
mod_speling attempts to automatically correct typographical errors in URLs, such
as capitalization errors.
mod_ssl
Enables encrypted connections between Web server and clients. See Section 40.6,
“Setting Up a Secure Web Server with SSL” (page 769) for details. This module is
enabled by default.
mod_status
Provides information on server activity and performance under http://localhost/serv-
er-status/. For security reasons, you should always limit access to this URL. By
default, only localhost is allowed to access this URl. mod_status is configured
at /etc/apache2/mod_status.conf
mod_suexec
mod_suexec lets you run CGI scripts under a different user and group. This module
is enabled by default.
mod_userdir
Enables user-specific directories available under ~user/. The UserDir directive
must be specified in the configuration. This module is enabled by default.
Prefork MPM
The prefork MPM implements a nonthreaded, preforking Web server. It makes the Web
server behave similarly to Apache version 1.x in that it isolates each request and handles
it by forking a separate child process. Thus problematic requests cannot affect others,
avoiding a lockup of the Web server.
Worker MPM
The worker MPM provides a multithreaded Web server. A thread is a “lighter” form
of a process. The advantage of a thread over a process is its lower resource consumption.
Instead of only forking child processes, the worker MPM serves requests by using
threads with server processes. The preforked child processes are multithreaded. This
approach makes Apache perform better by consuming fewer system resources than the
prefork MPM.
One major disadvantage is the stability of the worker MPM: if a thread becomes corrupt,
all threads of a process can be affected. In the worst case, this may result in a server
crash. Especially when using the Common Gateway Interface (CGI) with Apache under
heavy load, internal server errors might occur due to threads unable to communicate
with system resources. Another argument against using the worker MPM with Apache
is that not all available Apache modules are thread-safe and thus cannot be used in
conjunction with the worker MPM.
Not all available PHP modules are thread-safe. Using the worker MPM with
mod_php is strongly discouraged.
mod-apparmor
Adds support to Apache to provide Novell AppArmor confinement to individual
CGI scripts handled by modules like mod_php5 and mod_perl.
mod_perl
mod_perl enables you to run Perl scripts in an embedded interpreter. The persistent
interpreter embedded in the server avoids the overhead of starting an external inter-
preter and the penalty of Perl start-up time.
mod_php5
PHP is a server-side, cross-platform HTML embedded scripting language.
mod_python
mod_python allows embedding Python within the Apache HTTP server for a con-
siderable boost in performance and added flexibility in designing Web-based appli-
cations.
40.4.6 Compilation
Apache can be extended by advanced users by writing custom modules. To develop
modules for Apache or compile third-party modules, the package apache2-devel
is required along with the corresponding development tools. apache2-devel also
contains the apxs2 tools, which are necessary for compiling additional modules for
Apache.
apxs2 enables the compilation and installation of modules from source code (including
the required changes to the configuration files), which creates dynamic shared objects
(DSOs) that can be loaded into Apache at runtime.
apxs2 installs modules so they can be used for all MPMs. The other two programs
install modules so they can only be used for the respective MPMs. apxs2 installs
modules in /usr/lib/apache2, apxs2-prefork and apxs2-worker installs
modules in /usr/lib/apache2-prefork or /usr/lib/apache2-worker.
Install and activate a module from source code with the commands cd
/path/to/module/source; apxs2 -cia mod_foo.c (-c compiles the
module, -i installs it, and -a activates it). Other options of apxs2 are described in
the apxs2(1) man page.
To enable Apache to deliver content created by CGI scripts, mod_cgi needs to be acti-
vated. mod_alias is also needed. Both modules are enabled by default. Refer to Sec-
tion 40.4.2, “Activation and Deactivation” (page 760) for details on activating modules.
Allowing the server to execute CGI scripts is a potential security hole. Refer to
Section 40.7, “Avoiding Security Problems” (page 774) for additional information.
<Directory "/srv/www/www.example.com/cgi-bin/">
Options +ExecCGI❷
AddHandler cgi-script .cgi .pl❸
Order allow,deny❹
Allow from all
</Directory>
❶ Tells Apache to handle all files within this directory as CGI scripts.
❷ Enables CGI script execution
❸ Tells the server to treat files with the extensions .pl and .cgi as CGI scripts. Adjust
according to your needs.
❹ The Order and Allow directives control the default access state and the order
in which Allow and Deny directives are evaluated. In this case “deny” statements
are evaluated before “allow” statements and access from everywhere is enabled.
Files accessible by the Web server should be owned by to the user root (see Sec-
tion 40.7, “Avoiding Security Problems” (page 774) for additional information). Because
the Web server runs with a different user, the CGI scripts must be world-executable
and world-readable. Change into the CGI directory and use the command chmod 755
test.cgi to apply the proper permissions.
40.5.3 Troubleshooting
If you do not see the output of the test program but an error message instead, check the
following:
CGI Troubleshooting
• Have you reloaded the server after having changed the configuration? Check with
rcapache2 probe.
• Are the file permissions correct? Change into the CGI directory and execute the
ls -l test.cgi. Its output should start with
-rwxr-xr-x 1 root root
• Make sure that the script does not contain programming errors. If you have not
changed test.cgi, this should not be the case, but if you are using your own programs,
always make sure that they do not contain programming errors.
For this purpose, the server sends an SSL certificate that holds information proving the
server's valid identity before any request to a URL is answered. In turn, this guarantees
that the server is the uniquely correct end point for the communication. Additionally,
the certificate generates an encrypted connection between client and server that can
transport information without the risk of exposing sensitive, plain-text content.
mod_ssl does not implement the SSL/TSL protocols itself, but acts as an interface be-
tween Apache and an SSL library. In SUSE Linux Enterprise Server, the OpenSSL li-
brary is used. OpenSSL is automatically installed with Apache.
The most visible effect of using mod_ssl with Apache is that URLs are prefixed with
https:// instead of http://.
There are three types of certificates you can create: a “dummy” certificate for testing
purposes only, a self-signed certificate for a defined circle of users that trust you, and
a certificate signed by an independent, publicly-known certificate authority (CA).
Creating a certificate is basically a two step process. First, a private key for the certificate
authority is generated then the server certificate is signed with this key.
• /etc/apache2/ssl.crt/ca.crt
• /etc/apache2/ssl.crt/server.crt
• /etc/apache2/ssl.key/server.key
• /etc/apache2/ssl.csr/server.csr
IMPORTANT
No interaction needed.
Create the CA's distinguished name here. This requires you to answer a few
questions, such as country name or organization name. Enter valid data, because
everything you enter here later shows up in the certificate. You do not need to
answer every question. If one does not apply to you or you want to leave it blank,
use “.”. Common name is the name of the CA itself—choose a significant name,
such as My company CA.
No interaction needed.
Create the distinguished name for the server key here. Questions are almost
identical to the ones already answered for the CA's distinguished name. The data
entered here applies to the Web server and does not necessarily need to be iden-
tical to the CA's data (for example, if the server is located elsewhere).
The common name you enter here must be the fully qualified hostname
of your secure server (for example, www.example.com). Otherwise the
browser issues a warning that the certificate does not match the server
when accessing the Web server.
Encrypting the server key with a password requires you to enter this password
every time you start the Web server. This makes it difficult to automatically start
the server on boot or to restart the Web server. Therefore, it is common sense to
say N to this question. Keep in mind that your key is unprotected when not en-
crypted with a password and make sure that only authorized persons have access
to the key.
If you choose to encrypt the server key with a password, increase the
value for APACHE_TIMEOUT in /etc/sysconfig/apache2. Otherwise
you do not have enough time to enter the passphrase before the attempt
to start the server is stopped unsuccessfully.
The script's result page presents a list of certificates and keys it has generated. Contrary
to what the script outputs, the files have not been generated in the local directory conf,
but to the correct locations under /etc/apache2/.
When requesting an officially signed certificate, you do not send a certificate to the
CA. Instead, issue a Certificate Signing Request (CSR). To create a CSR, call the script
/usr/share/ssl/misc/CA.sh -newreq.
First the script asks for a password with which the CSR should be encrypted. Then you
are asked to enter a distinguished name. This requires you to answer a few questions,
such as country name or organization name. Enter valid data—everything you enter
here later shows up in the certificate and is checked. You do not need to answer every
question. If one does not apply to you or you want to leave it blank, use “.”. Common
name is the name of the CA itself—choose a significant name, such as My company
CA. Last, a challenge password and an alternative company name must be entered.
Find the CSR in the directory from which you called the script. The file is named
newreq.pem.
Do not forget to open the firewall for SSL-enabled Apache on port 443. This
can be done with YaST as described in Section 43.4.1, “Configuring the Firewall
with YaST” (page 825).
• DocumentRoot
• ServerName
• ServerAdmin
• ErrorLog
• TransferLog
All CGI scripts run as the same user, so different scripts can potentially conflict with
each other. The module suEXEC lets you run CGI scripts under a different user and
group.
40.8 Troubleshooting
If Apache does not start, the Web page is not accessible, or users cannot connect to the
Web server, it is important to find the cause of the problem. Here are some typical
places to look for error explanations and important things to check.
Second, the importance of log files cannot be overemphasized. In case of both fatal and
nonfatal errors, the Apache log files, mainly the error log file, are the places to look for
causes. Additionally, you can control the verbosity of the logged messages with the
LogLevel directive if more detail is needed in the log files. By default, the error log
file is located at /var/log/apache2/error_log.
A common mistake is not to open the ports for Apache in the firewall configuration of
the server. If you configure Apache with YaST, there is a separate option available to
take care of this specific issue (see Section 40.2.2, “Configuring Apache with YaST”
(page 751)). If you are configuring Apache manually, open firewall ports for HTTP and
HTTPS via YaST's firewall module.
If the error cannot be tracked down with the help of any these, check the online Apache
bug database at http://httpd.apache.org/bug_report.html. Additionally,
the Apache user community can be reached via a mailing list available at http://
httpd.apache.org/userslist.html. A recommended newsgroup is comp
.infosystems.www.servers.unix.
mod-apparmor
http://en.opensuse.org/AppArmor
mod_perl
http://perl.apache.org/
mod_php5
http://www.php.net/manual/en/install.unix.apache2.php
mod_python
http://www.modpython.org/
40.9.3 Development
More information about developing Apache modules or about getting involved in the
Apache Web server project are available at the following locations:
Squid acts as a proxy cache. It redirects object requests from clients (in this case, from
Web browsers) to the server. When the requested objects arrive from the server, it de-
livers the objects to the client and keeps a copy of them in the hard disk cache. One of
the advantages of caching is that several clients requesting the same object can be served
from the hard disk cache. This enables clients to receive the data much faster than from
the Internet. This procedure also reduces the network traffic.
Along with the actual caching, Squid offers a wide range of features such as distributing
the load over intercommunicating hierarchies of proxy servers, defining strict access
control lists for all clients accessing the proxy, allowing or denying access to specific
Web pages with the help of other applications, and generating statistics about frequently-
visited Web pages for the assessment of the users' surfing habits. Squid is not a generic
proxy. It normally proxies only HTTP connections. It does also support the protocols
FTP, Gopher, SSL, and WAIS, but it does not support other Internet protocols, such as
Real Audio, news, or video conferencing. Because Squid only supports the UDP protocol
to provide communication between different caches, many other multimedia programs
are not supported.
If the firewall configuration includes a DMZ, the proxy should operate within this zone.
Section 41.5, “Configuring a Transparent Proxy” (page 793) describes how to implement
a transparent proxy. This simplifies the configuration of the clients, because in this
case they do not need any information about the proxy.
Choosing the appropriate topology for the cache hierarchy is very important, because
it is not desirable to increase the overall traffic on the network. For a very large network,
it would make sense to configure a proxy server for every subnetwork and connect
them to a parent proxy, which in turn is connected to the proxy cache of the ISP.
All this communication is handled by ICP (Internet cache protocol) running on top of
the UDP protocol. Data transfers between caches are handled using HTTP (hypertext
transmission protocol) based on TCP.
To find the most appropriate server from which to get the objects, one cache sends an
ICP request to all sibling proxies. These answer the requests via ICP responses with a
TIP
The question remains as to how long all the other objects stored in the cache should
stay there. To determine this, all objects in the cache are assigned one of various possible
states. Web and proxy servers find out the status of an object by adding headers to these
objects, such as “Last modified” or “Expires” and the corresponding date. Other headers
specifying that objects must not be cached are used as well.
Objects in the cache are normally replaced, due to a lack of free hard disk space, using
algorithms such as LRU (last recently used). Basically this means that the proxy ex-
punges the objects that have not been requested for the longest time.
The easiest way to determine the needed cache size is to consider the maximum transfer
rate of the connection. With a 1 Mbit/s connection, the maximum transfer rate is 125
KB/s. If all this traffic ends up in the cache, in one hour it would add up to 450 MB
and, assuming that all this traffic is generated in only eight working hours, it would
reach 3.6 GB in one day. Because the connection is normally not used to its upper
volume limit, it can be assumed that the total data volume handled by the cache is ap-
proximately 2 GB. This is why 2 GB of disk space is required in the example for Squid
to keep one day's worth of browsed data cached.
41.2.3 RAM
The amount of memory (RAM) required by Squid directly correlates to the number of
objects in the cache. Squid also stores cache object references and frequently requested
objects in the main memory to speed up retrieval of this data. Random access memory
is much faster than a hard disk.
In addition to that, there is other data that Squid needs to keep in memory, such as a
table with all the IP addresses handled, an exact domain name cache, the most frequently
requested objects, access control lists, buffers, and more.
41.2.4 CPU
Squid is not a program that requires intensive CPU usage. The load of the processor is
only increased while the contents of the cache are loaded or checked. Using a multipro-
cessor machine does not increase the performance of the system. To increase efficiency,
it is better to buy faster disks or add more memory.
To allow users from the local system and other systems to access Squid and the Internet,
change the entry in the configuration files /etc/squid/squid.conf from
http_access deny all to http_access allow all. However, in doing
The command rcsquid status can be used to check if the proxy is running. The
command rcsquid stop causes Squid to shut down. This can take a while, because
Squid waits up to half a minute (shutdown_lifetime option in /etc/squid/
squid.conf) before dropping the connections to the clients and writing its data to
the disk.
Terminating Squid with kill or killall can damage the cache. To be able
to restart Squid, the damaged cache must be deleted.
If Squid dies after a short period of time even though it was started successfully, check
whether there is a faulty name server entry or whether the /etc/resolv.conf file
is missing. Squid logs the cause of a start-up failure in the file /var/log/squid/
cache.log. If Squid should be loaded automatically when the system boots, use the
YaST runlevel editor to activate Squid for the desired runlevels. See Section 8.5.12,
“System Services (Runlevel)” (page 162).
An uninstall of Squid does not remove the cache hierarchy or the log files. To remove
these, delete the /var/cache/squid directory manually.
To make the provider's name server accessible, enter it in the configuration file
/etc/named.conf under forwarders along with its IP address. With dynamic
DNS, this can be achieved automatically during connection establishment by setting
the sysconfig variable MODIFY_NAMED_CONF_DYNAMICALLY to YES.
Static DNS
With static DNS, no automatic DNS adjustments take place while establishing a
connection, so there is no need to change any sysconfig variables. You must,
however, enter the local DNS server in the file /etc/resolv.conf as described
above. Additionally, the providers static name server must be entered manually in
the file /etc/named.conf under forwarders along with its IP address.
If you have a firewall running, make sure DNS requests can pass it.
cache_mem 8 MB
This entry defines the amount of memory Squid can use for very popular replies.
The default is 8 MB. This does not specify the memory usage of Squid and may
be exceeded.
emulate_httpd_log off
If the entry is set to on, obtain readable log files. Some evaluation programs cannot
interpret this, however.
client_netmask 255.255.255.255
With this entry, mask IP addresses of clients in the log files. The last digit of the
IP address is set to zero if you enter 255.255.255.0 here. You may protect the
privacy of your clients that way.
ftp_user Squid@
With this, set the password Squid should use for the anonymous FTP login. It can
make sense to specify a valid e-mail address here, because some FTP servers check
these for validity.
cache_mgr webmaster
An e-mail address to which Squid sends a message if it unexpectedly crashes. The
default is webmaster.
logfile_rotate 0
If you run squid -k rotate, Squid can rotate secured log files. The files are
numbered in this process and, after reaching the specified value, the oldest file is
append_domain <domain>
With append_domain, specify which domain to append automatically when none
is given. Usually, your own domain is entered here, so entering www in the
browser accesses your own Web server.
forwarded_for on
If you set the entry to off, Squid removes the IP address and the system name of
the client from HTTP requests. Otherwise it adds a line to the header like
X-Forwarded-For: 192.168.0.1
In another example using these rules, the group teachers always has access to
the Internet. The group students only gets access Monday to Friday during
lunch time.
The list with the http_access entries should only be entered, for the sake of read-
ability, at the designated position in the /etc/squid/squid.conf file. That
is, between the text
redirect_program /usr/bin/squidGuard
With this option, specify a redirector such as squidGuard, which allows blocking
unwanted URLs. Internet access can be individually controlled for various user
groups with the help of proxy authentication and the appropriate ACLs. squidGuard
is a separate package that can be installed and configured.
The REQUIRED after proxy_auth can be replaced with a list of permitted usernames
or with the path to such a list.
Here, too, replace REQUIRED with a list of permitted usernames. Using ident can
slow down the access time quite a bit, because ident lookups are repeated for each
request.
• For security reasons, it is recommended that all clients use a proxy to surf the Inter-
net.
• All clients must use a proxy, regardless of whether they are aware of it.
• The proxy in a network is moved, but the existing clients should retain their old
configuration.
In all these cases, a transparent proxy may be used. The principle is very easy: the proxy
intercepts and answers the requests of the Web browser, so the Web browser receives
the requested pages without knowing from where they are coming. As the name indicates,
the entire process is done transparently.
• httpd_accel_host virtual
• httpd_accel_port 80
• httpd_accel_with_proxy on
• httpd_accel_uses_host_header on
Define ports and services (see /etc/services) on the firewall that are accessed
from untrusted (external) networks such as the Internet. In this example, only Web
services are offered to the outside:
FW_SERVICES_EXT_TCP="www"
Define ports or services (see /etc/services) on the firewall that are accessed from
the secure (internal) network, both via TCP and UDP:
This allows accessing Web services and Squid (whose default port is 3128). The service
“domain” stands for DNS (domain name service). This service is commonly used.
Otherwise, simply take it out of the above entries and set the following option to no:
FW_SERVICE_DNS="yes"
The comments above show the syntax to follow. First, enter the IP address and the
netmask of the internal networks accessing the proxy firewall. Second, enter the IP
address and the netmask to which these clients send their requests. In the case of Web
browsers, specify the networks 0/0, a wild card that means “to everywhere.” After
that, enter the original port to which these requests are sent and, finally, the port to
which all these requests are redirected. Because Squid supports protocols other than
HTTP, redirect requests from other ports to the proxy, such as FTP (port 21), HTTPS,
or SSL (port 443). In this example, Web services (port 80) are redirected to the proxy
port (port 3128). If there are more networks or services to add, they must be separated
by a blank space in the respective entry.
FW_REDIRECT_TCP="192.168.0.0/16,0/0,80,3128 192.168.0.0/16,0/0,21,3128"
FW_REDIRECT_UDP="192.168.0.0/16,0/0,80,3128 192.168.0.0/16,0/0,21,3128"
To start the firewall and the new configuration with it, change an entry in the /etc/
sysconfig/SuSEfirewall2 file. The entry START_FW must be set to "yes".
Start Squid as shown in Section 41.3, “Starting Squid” (page 785). To check if everything
is working properly, check the Squid logs in /var/log/squid/access.log.
To verify that all ports are correctly configured, perform a port scan on the machine
from any computer outside your network. Only the Web services (port 80) should be
open. To scan the ports with nmap, the command syntax is nmap -O IP_address.
41.6.1 Setup
First, a running Web server on your system is required. Configure Apache as described
in Chapter 40, The Apache HTTP Server (page 741). To check if Apache is already
running, as root enter the command rcapache status. If a message like this ap-
pears:
Apache is running on the machine. Otherwise, enter rcapache start to start Apache
with the SUSE Linux Enterprise Server default settings. The last step to set it up is to
copy the file cachemgr.cgi to the Apache directory cgi-bin:
cp /usr/share/doc/packages/squid/scripts/cachemgr.cgi /srv/www/cgi-bin/
Then add the rules in Example 41.3, “Access Rules” (page 797) to permit access from
the Web server.
Configure a password for the manager for access to more options, like closing the cache
remotely or viewing more information about the cache. For this, configure the entry
cachemgr_passwd with a password for the manager and the list of options to view.
This list appears as a part of the entry comments in /etc/squid/squid.conf.
Restart Squid every time the configuration file is changed. Do this easily with
rcsquid reload.
squidGuard is a free (GPL), flexible, and fast filter, redirector, and access controller
plug-in for Squid. It lets you define multiple access rules with different restrictions for
different user groups on a Squid cache. squidGuard uses Squid's standard redirector
interface. squidGuard can do the following:
• Limit the Web access for some users to a list of accepted or well-known Web
servers or URLs.
• Block access to some listed or blacklisted Web servers or URLs for some users.
• Block access to URLs matching a list of regular expressions or words for some
users.
• Use different access rules based on time of day, day of the week, date, etc.
Now, configure Squid to use squidGuard. Use the following entry in the /etc/squid/
squid.conf file:
redirect_program /usr/bin/squidGuard
redirect_children 4
Last, have Squid load the new configuration by running rcsquid reload. Now, test
your settings with a browser.
-a
output all available reports
-w
output as HTML report
More information about the various options can be found in the program's manual page
with man calamaris.
This puts the report in the directory of the Web server. Apache is required to view the
reports.
Another powerful cache report generator tool is SARG (Squid Analysis Report Gener-
ator). More information about this is available at: http://sarg.sourceforge
.net/.
YaST provides two modules for certification, which offer basic management functions
for digital X.509 certificates. The following sections explain the basics of digital certi-
fication and how to use YaST to create and administer certificates of this type. For more
detailed information, refer to http://www.ietf.org/html.charters/
pkix-charter.html.
Public Key
The key owner circulates the public key for use by third parties.
Trustworthy organizations that issue and sign public key certificates are usually part
of a certification infrastructure that is also responsible for the other aspects of certificate
management, such as publication, withdrawal, and renewal of certificates. An infras-
tructure of this kind is generally referred to as a public key infrastructure or PKI. One
familiar PKI is the OpenPGP standard in which users publish their certificates them-
selves without central authorization points. These certificates become trustworthy when
signed by other parties in the “web of trust.”
The X.509 Public Key Infrastructure (PKIX) is an alternative model defined by the
IETF (Internet Engineering Task Force) that serves as a model for almost all publicly-
used PKIs today. In this model, authentication is made by certificate authorities (CA)
in a hierarchical tree structure. The root of the tree is the root CA, which certifies all
sub-CAs. The lowest level of sub-CAs issue user certificates. The user certificates are
trustworthy by certification that can be traced to the root CA.
The extensions can contain any additional information. An application is only required
to be able to evaluate an extension if it is identified as critical. If an application does
not recognize a critical extension, it must reject the certificate. Some extensions are
only useful for a specific application, such as signature or encryption.
Field Content
Subject Public Key Info Public key of the owner and the ID of the algorithm
These lists are supplied by the CA to public CRL distribution points (CDPs) at regular
intervals. The CDP can optionally be named as an extension in the certificate, so a
checker can fetch a current CRL for validation purposes. One way to do this is the online
certificate status protocol (OCSP). The authenticity of the CRLs is ensured with the
signature of the issuing CA. Table 42.2, “X.509 Certificate Revocation List (CRL)”
(page 806) shows the basic parts of a X.509 CRL.
Field Content
List of revoked certificates Every entry contains the serial number of the certificate,
the time of revocation, and optional extensions (CRL
entry extensions)
3 Enter the basic data for the CA in the first dialog, shown in Figure 42.1, “YaST
CA Module—Basic Data for a Root CA” (page 808). The text fields have the
following meanings:
Common Name
Enter the name to use to refer to the CA.
E-Mail Addresses
Several e-mail addresses can be entered that can be seen by the CA user.
This can be helpful for inquiries.
Country
Select the country where the CA is operated.
4 Click Next.
5 Enter a password in the second dialog. This password is always required when
using the CA—when creating a sub-CA or generating certificates. The text fields
have the following meaning:
Key Length
Key Length contains a meaningful default and does not generally need to be
changed unless an application cannot deal with this key length.
Clicking Advanced Options opens a dialog for setting different attributes from
the X.509 extensions (Figure 42.4, “YaST CA Module—Extended Settings”
(page 814)). These values have rational default settings and should only be changed
if you are really sure of what you are doing.
6 YaST displays the current settings for confirmation. Click Create. The root CA
is created then appears in the overview.
In general, it is best not to allow user certificates to be issued by the root CA.
It is better to create at least one sub-CA and create the user certificates from
there. This has the advantage that the root CA can be kept isolated and secure,
for example, on an isolated computer on secure premises. This makes it very
difficult to attack the root CA.
NOTE
The validity period for a sub-CA must be fully within the validity period
of the “parent” CA. Because a sub-CA is always created after the “parent”
CA, the default value leads to an error message. To avoid this, enter a
permissible value for the period of validity.
3 Enter the password if you entered a CA the first time. YaST displays the CA key
information in the tab Description (see Figure 42.2 ).
4 Click Advanced and select Create SubCA. This opens the same dialog as for
creating a root CA.
7 Finish with Ok
3 Enter the password if entering a CA for the first time. YaST displays the CA key
information in the Description tab.
5 Click Add > Add Server Certificate and create a server certificate.
6 Click Add > Add Client Certificate and create a client certificate. Do not forget
to enter an e-mail address.
7 Finish with Ok
3 Enter the password if entering a CA the first time. YaST displays the CA key
information in the Description tab.
NOTE
4 Choose the type the settings to change. The dialog for changing the defaults,
shown in Figure 42.4, “YaST CA Module—Extended Settings” (page 814), then
opens.
5 Change the associated value on the right side and set or delete the critical setting
with critical.
TIP
All changes to the defaults only affect objects created after this point. Already
existing CAs and certificates remain unchanged.
The system maintains only one CRL for each CA. To create or update this CRL, do the
following:
3 Click CRL. The dialog that opens displays a summary of the last CRL of this
CA.
4 Create a new CRL with Generate CRL if you have revoked new sub-CAs or
certificates since its creation.
5 Specify the period of validity for the new CRL (default: 30 days).
6 Click OK to create and display the CRL. Afterwards, you must publish this CRL.
TIP
Applications that evaluate CRLs reject every certificate if CRL is not available
or expired. As a PKI provider, it is your duty always to create and publish a new
CRL before the current CRL expires (period of validity). YaST does not provide
a function for automating this procedure.
Password Meaning
LDAP Password Authorizes the user to make entries in the LDAP tree.
New Certificate Password The PKCS12 format is used during LDAP export.
This format forces the assignment of a new password
for the exported certificate.
Exporting a CA to LDAP
To export a CA, enter the CA as described in Section 42.2.2, “Creating or Revoking
a Sub-CA” (page 810). Select Extended > Export to LDAP in the subsequent dialog,
which opens the dialog for entering LDAP data. If your system has been configured
with the YaST LDAP client, the fields are already partly completed. Otherwise,
enter all the data manually. Entries are made in LDAP in a separate tree with the
attribute “caCertificate”.
Export a file in the same way for certificates, CAs as with LDAP, described in Sec-
tion 42.2.6, “Exporting CA Objects to LDAP ” (page 815), except you should select
Export as File instead of Export to LDAP. This then takes you to a dialog for selecting
the required output format and entering the password and filename. The certificate is
stored at the required location after clicking OK.
For CRLs click Export, select Export to file, choose the export format (PEM or DER)
and enter the path. Proceed with Ok to save it to the respective location.
TIP
You can select any storage location in the file system. This option can also be
used to save CA objects on a transport medium, such as a USB stick. The
/media directory generally holds any type of drive except the hard drive of
your system.
NOTE
You need one of the PKCS12 formats to import your certificate successfully.
TIP
If you select Import here, you can select the source in the file system. This op-
tion can also be used to import certificates from a transport medium, such as
a USB stick.
1 Start YaST and open Common Server Certificate under Security and Users
2 View the data for the current certificate in the description field after YaST has
been started.
4 Enter the password and click Next. The certificate is imported then displayed in
the description field.
The Linux kernel maintains three tables, each for a particular category of functions of
the packet filter:
filter
This table holds the bulk of the filter rules, because it implements the packet filtering
mechanism in the stricter sense, which determines whether packets are let through
(ACCEPT) or discarded (DROP), for example.
mangle
The rules held in this table make it possible to manipulate values stored in IP
headers (such as the type of service).
PREROUTING
incoming packet
mangle
nat
INPUT
mangle
Routing
filter
FORWARD
Processes
in the local mangle
system
filter
OUTPUT
Routing
mangle
nat
filter
POSTROUTING
mangle
nat
outgoing packet
INPUT
This chain is applied to packets destined for the system's internal processes.
FORWARD
This chain is applied to packets that are only routed through the system.
OUTPUT
This chain is applied to packets originating from the system itself.
POSTROUTING
This chain is applied to all outgoing packets.
Figure 43.1, “iptables: A Packet's Possible Paths” (page 821) illustrates the paths along
which a network packet may travel on a given system. For the sake of simplicity, the
figure lists tables as parts of chains, but in reality these chains are held within the tables
themselves.
In the simplest of all possible cases, an incoming packet destined for the system itself
arrives at the eth0 interface. The packet is first referred to the PREROUTING chain
of the mangle table then to the PREROUTING chain of the nat table. The following
step, concerning the routing of the packet, determines that the actual target of the
packet is a process of the system itself. After passing the INPUT chains of the mangle
and the filter table, the packet finally reaches its target, provided that the rules of
the filter table are actually matched.
When configuring your network, make sure both the broadcast address and
the netmask are the same for all local hosts. Failing to do so prevents packets
from being routed properly.
As mentioned, whenever one of the LAN hosts sends a packet destined for an Internet
address, it goes to the default router. However, the router must be configured before it
can forward such packets. For security reasons, this is not enabled in a default installa-
tion. To enable it, set the variable IP_FORWARD in the file /etc/sysconfig/
sysctl to IP_FORWARD=yes.
The target host of the connection can see your router, but knows nothing about the host
in your internal network where the packets originated. This is why the technique is
called masquerading. Because of the address translation, the router is the first destination
of any reply packets. The router must identify these incoming packets and translate
their target addresses, so packets can be forwarded to the correct host in the local net-
work.
With the routing of inbound traffic depending on the masquerading table, there is no
way to open a connection to an internal host from the outside. For such a connection,
there would be no entry in the table. In addition, any connection already established
has a status entry assigned to it in the table, so the entry cannot be used by another
connection.
As a consequence of all this, you might experience some problems with a number of
application protocols, such as ICQ, cucme, IRC (DCC, CTCP), and FTP (in PORT
mode). Web browsers, the standard FTP program, and many other programs use the
PASV mode. This passive mode is much less problematic as far as packet filtering and
masquerading are concerned.
A more effective but more complex mechanism is the combination of several types of
systems, such as a packet filter interacting with an application gateway or proxy. In
this case, the packet filter rejects any packets destined for disabled ports. Only packets
directed to the application gateway are accepted. This gateway or proxy pretends to be
the actual client of the server. In a sense, such a proxy could be considered a masquerad-
ing host on the protocol level used by the application. One example for such a proxy
is Squid, an HTTP proxy server. To use Squid, the browser must be configured to
communicate via the proxy. Any HTTP pages requested are served from the proxy
cache and pages not found in the cache are fetched from the Internet by the proxy. As
another example, the SUSE proxy suite (proxy-suite) provides a proxy for the FTP
protocol.
The following section focuses on the packet filter that comes with SUSE Linux Enter-
prise. For further information about packet filtering and firewalling, read the Firewall
HOWTO included in the howto package. If this package is installed, read the HOWTO
with
less /usr/share/doc/howto/en/txt/Firewall-HOWTO.gz
43.4 SuSEfirewall2
SuSEfirewall2 is a script that reads the variables set in /etc/sysconfig/
SuSEfirewall2 to generate a set of iptables rules. It defines three security zones,
although only the first and the second one are considered in the following sample con-
figuration:
Internal Zone
This refers to the private network, in most cases the LAN. If the hosts on this net-
work use IP addresses from the private range (see Section 30.1.2, “Netmasks and
Routing” (page 547)), enable network address translation (NAT), so hosts on the
internal network can access the external one.
Any kind of network traffic not explicitly allowed by the filtering rule set is suppressed
by iptables. Therefore, each of the interfaces with incoming traffic must be placed into
one of the three zones. For each of the zones, define the services or protocols allowed.
The rule set is only applied to packets originating from remote hosts. Locally generated
packets are not captured by the firewall.
The configuration can be performed with YaST (see Section 43.4.1, “Configuring the
Firewall with YaST” (page 825)). It can also be made manually in the file /etc/
sysconfig/SuSEfirewall2, which is well commented. Additionally, a number
of example scenarios are available in /usr/share/doc/packages/
SuSEfirewall2/EXAMPLES.
After the installation, YaST automatically starts a firewall on all configured in-
terfaces. If a server is configured and activated on the system, YaST can modify
the automatically-generated firewall configuration with the options Open Ports
on Selected Interface in Firewall or Open Ports on Firewall in the server configu-
ration modules. Some server module dialogs include a Firewall Details button
The YaST dialogs for the graphical configuration can be accessed from the YaST
Control Center. Select Security and Users > Firewall. The configuration is divided into
seven sections that can be accessed directly from the tree structure on the left side.
Start-Up
Set the start-up behavior in this dialog. In a default installation, SuSEfirewall2 is
started automatically. You can also start and stop the firewall here. To implement
your new settings in a running firewall, use Save Settings and Restart Firewall
Now.
Interfaces
All known network interfaces are listed here. To remove an interface from a zone,
select the interface, press Change, and choose No Zone Assigned. To add an interface
to a zone, select the interface, press Change and choose any of the available zones.
You may also create a special interface with your own settings by using Custom.
Allowed Services
You need this option to offer services from your system to a zone from which it is
protected. By default, the system is only protected from external zones. Explicitly
allow the services that should be available to external hosts. After selecting the
desired zone in Allowed Services for Selected Zone, activate the services from the
list.
Masquerading
Masquerading hides your internal network from external networks, such as the In-
ternet, while enabling hosts in the internal network to access the external network
transparently. Requests from the external network to the internal one are blocked
and requests from the internal network seem to be issued by the masquerading
server when seen externally. If special services of an internal machine need to be
available to the external network, add special redirect rules for the service.
Broadcast
In this dialog, configure the UDP ports that allow broadcasts. Add the required
port numbers or services to the appropriate zone, separated by spaces. See also the
file /etc/services.
IPsec Support
Configure whether the IPsec service should be available to the external network in
this dialog. Configure which packets are trusted under Details.
Logging Level
There are two rules for the logging: accepted and not accepted packets. Packets
that are not accepted are DROPPED or REJECTED. Select from Log All, Log
Only Critical, or Do Not Log Any for both of them.
When completed with the firewall configuration, exit this dialog with Next. A zone-
oriented summary of your firewall configuration then opens. In it, check all settings.
All services, ports, and protocols that have been allowed are listed in this summary. To
modify the configuration, use Back. Press Accept to save your configuration.
First, use the YaST module System Services (Runlevel) to enable SuSEfirewall2 in
your runlevel (3 or 5 most likely). It sets the symlinks for the SuSEfirewall2_* scripts
in the /etc/init.d/rc?.d/ directories.
For a firewall without masquerading, only set this to yes if you want to allow access
to the internal network. Your internal hosts need to use officially registered IP ad-
dresses in this case. Normally, however, you should not allow access to your internal
network from the outside.
FW_MASQUERADE (masquerading)
Set this to yes if you need the masquerading function. This provides a virtually
direct connection to the Internet for the internal hosts. It is more secure to have a
proxy server between the hosts of the internal network and the Internet. Masquerad-
ing is not needed for services a proxy server provides.
FW_MASQ_NETS (masquerading)
Specify the hosts or networks to masquerade, leaving a space between the individ-
ual entries. For example:
FW_MASQ_NETS="192.168.0.0/24 192.168.10.1"
FW_PROTECT_FROM_INT (firewall)
Set this to yes to protect your firewall host from attacks originating in your internal
network. Services are only available to the internal network if explicitly enabled.
Also see FW_SERVICES_INT_TCP and FW_SERVICES_INT_UDP.
FW_SERVICES_EXT_TCP (firewall)
Enter the TCP ports that should be made available. Leave this blank for a normal
workstation at home that should not offer any services.
FW_SERVICES_EXT_UDP (firewall)
Leave this blank unless you run a UDP service and want to make it available to
the outside. The services that use UDP include DNS servers, IPsec, TFTP, DHCP
and others. In that case, enter the UDP ports to use.
FW_SERVICES_INT_UDP (firewall)
See FW_SERVICES_INT_TCP.
After configuring the firewall, test your setup. The firewall rule sets are created by en-
tering SuSEfirewall2 start as root. Then use telnet, for example, from an
external host to see whether the connection is actually denied. After that, review /var/
log/messages, where you should see something like this:
Mar 15 13:21:38 linux kernel: SFW2-INext-DROP-DEFLT IN=eth0
OUT= MAC=00:80:c8:94:c3:e7:00:a0:c9:4d:27:56:08:00 SRC=192.168.10.0
DST=192.168.10.1 LEN=60 TOS=0x10 PREC=0x00 TTL=64 ID=15330 DF PROTO=TCP
SPT=48091 DPT=23 WINDOW=5840 RES=0x00 SYN URGP=0
OPT (020405B40402080A061AFEBC0000000001030300)
Other packages to test your firewall setup are nmap or nessus. The documentation of
nmap is found at /usr/share/doc/packages/nmap and the documentation of
nessus resides in the directory /usr/share/doc/packages/nessus-core
after installing the respective package.
The SSH suite provides the necessary protection by encrypting the authentication strings
(usually a login name and a password) and all the other data exchanged between the
hosts. With SSH, the data flow could still be recorded by a third party, but the contents
are encrypted and cannot be reverted to plain text unless the encryption key is known.
So SSH enables secure communication over insecure networks, such as the Internet.
The SSH flavor that comes with SUSE Linux Enterprise is OpenSSH.
After successful authentication, you can work on the remote command line or use inter-
active applications, such as YaST. If the local username is different from the remote
username, you can log in using a different login name with ssh -l augustine
sun or ssh augustine@sun.
Furthermore, ssh offers the possibility to run commands on remote systems, as known
from rsh. In the following example, run the command uptime on the host sun and
create a directory with the name tmp. The program output is displayed on the local
terminal of the host earth.
Quotation marks are necessary here to send both instructions with one command. It is
only by doing this that the second command is executed on sun.
After the correct password is entered, scp starts the data transfer and shows a growing
row of asterisks to simulate a progress bar. In addition, the program displays the esti-
mated time of arrival to the right of the progress bar. Suppress all output by giving the
option -q.
The option -p tells scp to leave the time stamp of files unchanged. -C compresses the
data transfer. This minimizes the data volume to transfer, but creates a heavier burden
on the processor.
A connection is initiated by the SSH client. The waiting SSH daemon and the requesting
SSH client exchange identification data to compare the protocol and software versions
and to prevent connections through the wrong port. Because a child process of the
original SSH daemon replies to the request, several SSH connections can be made si-
multaneously.
When using version 1 of SSH, the server sends its public host key and a server key,
which is regenerated by the SSH daemon every hour. Both allow the SSH client to en-
crypt a freely chosen session key, which is sent to the SSH server. The SSH client also
tells the server which encryption method (cipher) to use.
Version 2 of the SSH protocol does not require a server key. Both sides use an algorithm
according to Diffie-Helman to exchange their keys.
The private host and server keys are absolutely required to decrypt the session key and
cannot be derived from the public parts. Only the SSH daemon contacted can decrypt
the session key using its private keys (see man
/usr/share/doc/packages/openssh/RFC.nroff). This initial connection
phase can be watched closely by turning on the verbose debugging option -v of the
SSH client.
The client stores all public host keys in ~/.ssh/known_hosts after its first contact
with a remote host. This prevents any man-in-the-middle attacks—attempts by foreign
SSH servers to use spoofed names and IP addresses. Such attacks are detected either
by a host key that is not included in ~/.ssh/known_hosts or by the server's inabil-
ity to decrypt the session key in the absence of an appropriate private counterpart.
Confirm the default setting and answer the request for a passphrase. Even if the software
suggests an empty passphrase, a text from 10 to 30 characters is recommended for the
procedure described here. Do not use short and simple words or phrases. Confirm by
repeating the passphrase. Subsequently, you will see where the private and public keys
are stored, in this example, the files id_rsa and id_rsa.pub.
In the long run, this procedure is more troublesome than giving your password each
time. Therefore, the SSH package provides another tool, ssh-agent, which retains the
private keys for the duration of an X session. The entire X session is started as a child
process of ssh-agent. The easiest way to do this is to set the variable usessh at the
beginning of the .xsession file to yes and log in via a display manager, such as
KDM or XDM. Alternatively, enter ssh-agent startx.
Now you can use ssh or scp as usual. If you have distributed your public key as described
above, you are no longer prompted for your password. Take care of terminating your
X session or locking it with a password protection application, such as xlock.
All the relevant changes that resulted from the introduction of version 2 of the SSH
protocol are also documented in the file /usr/share/doc/packages/openssh/
README.SuSE.
By adding the option -A, the ssh-agent authentication mechanism is carried over to the
next machine. This way, you can work from different machines without having to enter
a password, but only if you have distributed your public key to the destination hosts
and properly saved it there.
Both mechanisms are deactivated in the default settings, but can be permanently acti-
vated at any time in the systemwide configuration file /etc/ssh/sshd_config
or the user's ~/.ssh/config.
ssh can also be used to redirect TCP/IP connections. In the examples below, SSH is
told to redirect the SMTP and the POP3 port, respectively:
ssh -L 25:sun:25 earth
With this command, any connection directed to earth port 25 (SMTP) is redirected to
the SMTP port on sun via an encrypted channel. This is especially useful for those using
SMTP servers without SMTP-AUTH or POP-before-SMTP features. From any arbitrary
location connected to a network, e-mail can be transferred to the “home” mail server
for delivery. Similarly, all POP3 requests (port 110) on earth can be forwarded to the
POP3 port of sun with this command:
ssh -L 110:sun:110 earth
Both commands must be executed as root, because the connection is made to privileged
local ports. E-mail is sent and retrieved by normal users in an existing SSH connection.
The SMTP and POP3 host must be set to localhost for this to work. Additional in-
formation can be found in the manual pages for each of the programs described above
and also in the files under /usr/share/doc/packages/openssh.
• Have all users prove their identity for each desired service and make sure that no
one can take the identity of someone else.
• Make sure that each network server also proves its identity. Otherwise an attacker
might be able to impersonate the server and obtain sensitive information transmitted
to the server. This concept is called mutual authentication, because the client au-
thenticates to the server and vice versa.
Kerberos helps you meet these requirements by providing strongly encrypted authenti-
cation. The following shows how this is achieved. Only the basic principles of Kerberos
are discussed here. For detailed technical instruction, refer to the documentation provided
with your implementation of Kerberos.
ticket
A ticket is a per-server credential used by a client to authenticate at a server from
which it is requesting a service. It contains the name of the server, the client's name,
the client's Internet address, a time stamp, a lifetime, and a random session key.
All this data is encrypted using the server's key.
authenticator
Combined with the ticket, an authenticator is used to prove that the client presenting
a ticket is really the one it claims to be. An authenticator is built of the client's
name, the workstation's IP address, and the current workstation's time all encrypted
with the session key only known to the client and the server from which it is re-
questing a service. An authenticator can only be used once, unlike a ticket. A client
can build an authenticator itself.
principal
A Kerberos principal is a unique entity (a user or service) to which it can assign a
ticket. A principal consists of the following components:
• Primary—the first part of the principal, which can be the same as your username
in the case of a user.
• Realm—this specifies your Kerberos realm. Normally, your realm is your domain
name in uppercase letters.
mutual authentication
Kerberos ensures that both client and server can be sure of each others identity.
They share a session key, which they can use to communicate securely.
session key
Session keys are temporary private keys generated by Kerberos. They are known
to the client and used to encrypt the communication between the client and the
server for which it requested and received a ticket.
server or service
Service is used to refer to a specific action to perform. The process behind this action
is referred to as a server.
To ensure Kerberos is worth all the trust put in it, run both the authentication and ticket-
granting server on a dedicated machine. Make sure that only the administrator can access
this machine physically and over the network. Reduce the (networking) services run
on it to the absolute minimum—do not even run sshd.
This ticket is then sent back to the client together with the session key, again in encrypted
form, but this time the private key of the client is used. This private key is only known
to Kerberos and the client, because it is derived from your user password. Now that the
client has received this response, you are prompted for your password. This password
is converted into the key that can decrypt the package sent by the authentication server.
The package is “unwrapped” and password and key are erased from the workstation's
memory. As long as the lifetime given to the ticket used to obtain other tickets does
not expire, your workstation can prove your identity.
All this information is encrypted using the session key that the client has already received
for this special server. The authenticator and the ticket for the server are sent to the
server. The server uses its copy of the session key to decrypt the authenticator, which
gives it all information needed about the client requesting its service to compare it to
that contained in the ticket. The server checks if the ticket and the authenticator originate
from the same client.
Without any security measures implemented on the server side, this stage of the process
would be an ideal target for replay attacks. Someone could try to resend a request stolen
off the net some time before. To prevent this, the server does not accept any request
with a time stamp and ticket received previously. In addition to that, a request with a
time stamp differing too much from the time the request is received is ignored.
• An authenticator
Like any other server, the ticket-granting server now checks the ticket-granting ticket
and the authenticator. If they are considered valid, the ticket-granting server builds a
new session key to be used between the original client and the new server. Then the
ticket for the new server is built, containing the following information:
The new ticket is assigned a lifetime, which is the lesser of the remaining lifetime of
the ticket-granting ticket and the default for the service. The client receives this ticket
and the session key, which are sent by the ticket-granting service, but this time the answer
is encrypted with the session key that came with the original ticket-granting ticket. The
client can decrypt the response without requiring the user's password when a new service
is contacted. Kerberos can thus acquire ticket after ticket for the client without bothering
the user more than once at login time.
Here is a short list of some applications that use Kerberos authentication. These appli-
cations can be found under /usr/lib/mit/bin or /usr/lib/mit/sbin. They
all have the full functionality of their common UNIX and Linux brothers plus the addi-
tional bonus of transparent authentication managed by Kerberos:
• telnet, telnetd
• rlogin
• ftp, ftpd
• ksu
You no longer have to enter your password for using these applications because Kerberos
has already proven your identity. ssh, if compiled with Kerberos support, can even
forward all the tickets acquired for one workstation to another one. If you use ssh to
log in to another workstation, ssh makes sure that the encrypted contents of the tickets
are adjusted to the new situation. Simply copying tickets between workstations is not
sufficient because the ticket contains workstation-specific information (the IP address).
XDM, GDM, and KDM offer Kerberos support, too. Read more about the Kerberos
network applications in Kerberos V5 UNIX User's Guide at http://web.mit.edu/
kerberos
It is also a good idea to use your DNS domain name (or a subdomain, such as
ACCOUNTING.FOOBAR.COM). As shown below, your life as an administrator can be
much easier if you configure your Kerberos clients to locate the KDC and other Kerberos
services via DNS. To do so, it is helpful if your realm name is a subdomain of your
DNS domain name.
Unlike the DNS name space, Kerberos is not hierarchical. You cannot set up a realm
named FOOBAR.COM, have two “subrealms” named DEVELOPMENT and ACCOUNTING
underneath it, and expect the two subordinate realms to somehow inherit principals
from FOOBAR.COM. Instead, you would have three separate realms for which you
would have to configure crossrealm authentication for users from one realm to interact
with servers or other users from another realm.
The KDC is the most important part of your security infrastructure—if someone breaks
into it, all user accounts and all of your infrastructure protected by Kerberos is compro-
mised. An attacker with access to the Kerberos database can impersonate any principal
in the database. Tighten security for this machine as much as possible:
1 Put the server machine into a physically secured location, such as a locked server
room to which only a very few people have access.
2 Do not run any network applications on it except the KDC. This includes servers
and clients—for example, the KDC should not import any file systems via NFS
or use DHCP to retrieve its network configuration.
3 Install a minimal system first then check the list of installed packages and remove
any unneeded packages. This includes servers, such as inetd, portmap, and cups,
as well as anything X-based. Even installing an SSH server should be considered
a potential security risk.
5 Configure /etc/nsswitch.conf to use only local files for user and group
lookup. Change the lines for passwd and group to look like this:
passwd: files
group: files
Edit the passwd, group, shadow, and gshadow files in /etc and remove
the lines that start with a + character (these are for NIS lookups).
Kerberos allows a certain leeway when comparing time stamps. However, computer
clocks can be very inaccurate in keeping time—it is not unheard of for PC clocks to
lose or gain half an hour over the course of a week. For this reason, configure all hosts
on the network to synchronize their clocks with a central time source.
A simple way to do so is by installing an NTP time server on one machine and having
all clients synchronize their clocks with this server. Do this either by running an NTP
daemon in client mode on all these machines or by running ntpdate once a day from
all clients (this solution probably works for a small number of clients only). The KDC
itself needs to be synchronized to the common time source as well. Because running
an NTP daemon on this machine would be a security risk, it is probably a good idea to
do this by running ntpdate via a cron entry. To configure your machine as an NTP
client, proceed as outlined in Section 32.1, “Configuring an NTP Client with YaST”
(page 605).
It is also possible to adjust the maximum deviation Kerberos allows when checking
time stamps. This value (called clock skew) can be set in the krb5.conf file as de-
scribed in Section 46.5.3, “Adjusting the Clock Skew” (page 853).
4 Adjust the ACL Files: Add Administrators The Kerberos database on the
KDC can be managed remotely. To prevent unauthorized principals from tamper-
ing with the database, Kerberos uses access control lists. You must explicitly
enable remote access for the administrator principal to enable him to manage the
database.
5 Adjust the Kerberos Database: Add Administrators You need at least one
administrative principal to run and administer Kerberos. This principal must be
added before starting the KDC.
6 Start the Kerberos Daemon Once the KDC software is installed and properly
configured, start the Kerberos daemon to provide Kerberos service for your realm.
$>kadmin.local
kadmin> listprincs
K/[email protected]
kadmin/[email protected]
kadmin/[email protected]
krbtgt/[email protected]
This shows that there are now a number of principals in the database. All of these are
for internal use by Kerberos.
kadmin.local
DNS-based configuration is generally a lot more flexible and the amount of configuration
work per machine is a lot less. However, it requires that your realm name is either the
same as your DNS domain or a subdomain of it. Configuring Kerberos via DNS also
creates a minor security issue—an attacker can seriously disrupt your infrastructure
through your DNS (by shooting down the name server, spoofing DNS records, etc.).
However, this amounts to a denial of service at most. A similar scenario applies to the
static configuration case unless you enter IP addresses in krb5.conf instead of
hostnames.
To configure your Kerberos clients, add the following stanza to krb5.conf (where
kdc.example.com is the hostname of the KDC):
[libdefaults]
default_realm = EXAMPLE.COM
[realms]
EXAMPLE.COM = {
kdc = kdc.example.com
admin_server = kdc.example.com
}
The default_realm line sets the default realm for Kerberos applications. If you
have several realms, just add additional statements to the [realms] section.
Also add a statement to this file that tells applications how to map hostnames to a realm.
For example, when connecting to a remote host, the Kerberos library needs to know in
which realm this host is located. This must be configured in the [domain_realms]
section:
[domain_realm]
.example.com = EXAMPLE.COM
www.foobar.com = EXAMPLE.COM
This tells the library that all hosts in the example.com DNS domains are in the
EXAMPLE.COM Kerberos realm. In addition, one external host named www.foobar
.com should also be considered a member of the EXAMPLE.COM realm.
The data portion of SRV resource records consists of a priority value, a weight, a port
number, and a hostname. The priority defines the order in which hosts should be tried
(lower values indicate a higher priority). The weight is there to support some sort of
load balancing among servers of equal priority. You probably do not need any of this,
so it is okay to set these to zero.
MIT Kerberos currently looks up the following names when looking for services:
_kerberos
This defines the location of the KDC daemon (the authentication and ticket granting
server). Typical records look like this:
_kerberos-adm
This describes the location of the remote administration service. Typical records
look like this:
Because kadmind does not support UDP, there should be no _udp record.
As with the static configuration file, there is a mechanism to inform clients that a spe-
cific host is in the EXAMPLE.COM realm, even if it is not part of the example.com
DNS domain. This can be done by attaching a TXT record to _keberos.hostname,
as shown here:
When using NTP to synchronize all hosts, you can reduce this value to about one minute.
The clock skew value can be set in /etc/krb5.conf like this:
[libdefaults]
clockskew = 120
4a Set Default Domain, Default Realm, and KDC Server Address to the values
that match your setup.
To configure ticket-related options in the Advanced Settings dialog, choose from the
following options:
• Specify the Default Ticket Lifetime and the Default Renewable Lifetime in days,
hours, or minutes (using the units of measurement d, h, and m, with no blank space
between the value and the unit).
• To forward your complete identity to use your tickets on other hosts, select For-
wardable.
• Keep tickets available with a PAM module even after a session has ended by en-
abling Retained.
• Enable Kerberos authentication support for your OpenSSH client by selecting the
corresponding check box. The client then uses Kerberos tickets to authenticate with
the SSH server.
• To keep the system time in sync with an NTP server, you can also set up the host
as an NTP client by selecting NTP Configuration, which opens the YaST NTP
client dialog that is described in Section 32.1, “Configuring an NTP Client with
YaST” (page 605). After finishing the configuration, YaST performs all the necessary
changes and the Kerberos client is ready for use.
Right now, just grant yourself the privilege to do anything you want with the database
by putting the following line into the file:
Replace the username newbie with your own. Restart kadmind for the change to take
effect.
kadmin -p newbie/admin
Authenticating as principal newbie/[email protected] with password.
Password for newbie/[email protected]:
kadmin: getprivs
current privileges: GET ADD MODIFY DELETE
kadmin:
Using the getprivs command, verify which privileges you have. The list shown
above is the full set of privileges.
kadmin -p newbie/admin
Authenticating as principal newbie/[email protected] with password.
Password for newbie/[email protected]:
This changes the maximum ticket life time to eight hours. For more information about
the kadmin command and the options available, refer to http://web.mit.edu/
kerberos/www/krb5-1.4/krb5-1.4/doc/krb5-admin.html#Kadmin
%20Options or look at man 8 kadmin.
Instead, the key required to decrypt the initial ticket for the host principal is extracted
by the administrator from the KDC once and stored in a local file called the keytab.
Services such the SSH daemon read this key and use it to obtain new tickets automati-
cally when needed. The default keytab file resides in /etc/krb5.keytab.
kadmin -p newbie/admin
Authenticating as principal newbie/[email protected] with password.
Password for newbie/[email protected]:
kadmin: addprinc -randkey host/test.example.com
WARNING: no policy specified for host/[email protected];
defaulting
to no policy
Principal "host/[email protected]" created.
Instead of setting a password for the new principal, the -randkey flag tells kadmin
to generate a random key. This is used here because no user interaction is wanted for
this principal. It is a server account for the machine.
Finally, extract the key and store it in the local keytab file /etc/krb5.keytab.
This file is owned by the superuser, so you must be root to execute the next command
in the kadmin shell:
When completed, make sure that you destroy the admin ticket obtained with kinit above
with kdestroy.
The pam_unix2 module also supports Kerberos authentication and password update.
To enable Kerberos support in pam_unix2, edit the file /etc/security/pam
_unix2.conf so it contains the following lines:
After that, all programs evaluating the entries in this file use Kerberos for user authen-
tication. For a user that does not have a Kerberos principal, pam_unix2 falls back on
the normal password authentication mechanism. For those users who have a principal,
it should now be possible to change their Kerberos passwords transparently using the
passwd command.
To make fine adjustments to the way in which pam_krb5 is used, edit the file /etc/
krb5.conf and add default applications to pam. For details, refer to the manual page
with man 5 pam_krb5.
The pam_krb5 module was specifically not designed for network services that accept
Kerberos tickets as part of user authentication. This is an entirely different matter, which
is discussed below.
To use Kerberos authentication with protocol version 2, enable it on the client side as
well. Do this either in the systemwide configuration file /etc/ssh/ssh_config
or on a per-user level by editing ~/.ssh/config. In both cases, add the option
GSSAPIAuthentication yes.
You should now be able to connect using Kerberos authentication. Use klist to ver-
ify that you have a valid ticket then connect to the SSH server. To force SSH protocol
version 1, specify the -1 option on the command line.
OpenLDAP implements most authentication flavors through SASL, the simple authen-
tication session layer. SASL is basically a network protocol designed for authentication.
The SASL implementation is cyrus-sasl, which supports a number of different authen-
tication flavors. Kerberos authentication is performed through GSSAPI (General Secu-
rity Services API). By default, the SASL plug-in for GSSAPI is not installed. Install it
manually with rpm -ivh cyrus-sasl-gssapi-*.rpm.
By default, the LDAP server slapd runs as user and group ldap, while the keytab file
is readable by root only. Therefore, either change the LDAP configuration so the
server runs as root or make the keytab file readable by the group ldap. The latter is
done automatically by the OpenLDAP start script (/etc/init.d/ldap) if the keytab
file has been specified in the OPENLDAP_KRB5_KEYTAB variable in /etc/
sysconfig/openldap and the OPENLDAP_CHOWN_DIRS variable is set to yes,
which is the default setting. If OPENLDAP_KRB5_KEYTAB is left empty, the default
keytab under /etc/krb5.keytab is used and you must adjust the privileges yourself
as described below.
To tell OpenLDAP to use a different keytab file, change the following variable in
/etc/sysconfig/openldap:
OPENLDAP_KRB5_KEYTAB="/etc/openldap/ldap.keytab"
In Kerberos, authentication is always mutual. This means that not only have you authen-
ticated yourself to the LDAP server, but also the LDAP server authenticated itself to
you. In particular, this means communication is with the desired LDAP server, rather
than some bogus service set up by an attacker.
The second statement gives authenticated users write access to the loginShell at-
tribute of their own LDAP entry. The third statement gives all authenticated users read
access to the entire LDAP directory.
There is one minor piece of the puzzle missing—how the LDAP server can find out
that the Kerberos user [email protected] corresponds to the LDAP distinguished
name uid=joe,ou=people,dc=example,dc=com. This sort of mapping must
be configured manually using the saslExpr directive. In this example, add the fol-
lowing to slapd.conf:
To understand how this works, you need to know that when SASL authenticates a user,
OpenLDAP forms a distinguished name from the name given to it by SASL (such as
joe) and the name of the SASL flavor (GSSAPI). The result would be
uid=joe,cn=GSSAPI,cn=auth.
If a authz-regexp has been configured, it checks the DN formed from the SASL
information using the first argument as a regular expression. If this regular expression
matches, the name is replaced with the second argument of the authz-regexp
statement. The placeholder $1 is replaced with the substring matched by the (.*)
expression.
More complicated match expressions are possible. If you have a more complicated di-
rectory structure or a schema in which the username is not part of the DN, you can even
use search expressions to map the SASL DN to the user DN.
The methods described in this chapter offer only limited protection. You cannot
protect your running system from being compromised. After the encrypted
medium is successfully mounted, everybody with appropriate permissions has
access to it. However, encrypted media are useful in case of loss or theft of
your computer or to prevent unauthorized individuals from reading your con-
fidential data.
Make sure to memorize the password for your encrypted partitions well.
Without that password you cannot access or restore the encrypted data.
The YaST expert dialog for partitioning offers the options needed for creating an en-
crypted partition. To create a new encrypted partition proceed as follows:
1 Run the YaST Partitioner from the YaST Control Center with System > Partitioner
3 Select the desired file system, size and mount point of this partition.
4 If the encrypted file system should only be mounted when necessary, enable Do
Not Mount at System Start-up in the Fstab Options.
6 Click OK. You will be prompted for a password that is used to encrypt this par-
tition. This password is not displayed. To prevent typing errors, enter the password
twice.
7 Complete the process by clicking OK. The new encrypted partition is now created.
Unless Do Not Mount at System Start-up was selected, the operating system requests
the password while booting before mounting the partition. The partition is available to
all users once it has been mounted.
To skip mounting the encrypted partition during start-up, click Enter when prompted
for the password. Then decline the offer to enter the password again. In this case, the
encrypted file system is not mounted and the operating system continues booting,
blocking access to your data.
To access an encrypted partition that is not mounted during boot, mount the partition
manually by entering mount name_of_partition mount_point. Enter the
When you are installing your system on a machine where several partitions already
exist, you can also decide to encrypt an existing partition during installation. In this
case follow the description in Section 47.1.2, “Creating an Encrypted Partition on a
Running System” (page 868) and be aware that this action destroys all data on the existing
partition to encrypt.
On a running system, select System > Partitioning in the YaST Control Center. Click
Yes to proceed. In the Expert Partitioner, select the partition to encrypt and click Edit.
The rest of the procedure is the same as described in Section 47.1.1, “Creating an En-
crypted Partition during Installation” (page 867).
If you have encrypted your removable device with YaST, the KDE and GNOME
desktops automatically recognize the encrypted partition and prompt for the password
when the device is detected. If you plug in a FAT formatted removable device while
running KDE or GNOME, the desktop user entering the password automatically becomes
the owner of the device and can read and write files. For devices with a file system
other than FAT, change the ownership explicitly for users other than root to enable
these users to read or write files on the device.
Encrypted home partitions are created within a file container as described in Sec-
tion 47.1.3, “Creating an Encrypted File as a Container” (page 868). Two files are cre-
ated under /home for each encrypted home directory:
LOGIN.img
The image holding the directory
Encrypting a user's home directory does not provide strong security from other
users. If strong security is required, the system should not be shared physically.
To enhance security, also encrypt the swap partition and the /tmp and /var/
tmp directories, because these may contain temporary images of critical data.
You can encrypt swap, /tmp, and /var/tmp with the YaST partitioner as de-
scribed in Section 47.1.1, “Creating an Encrypted Partition during Installation”
(page 867) or Section 47.1.3, “Creating an Encrypted File as a Container”
(page 868).
Use vi -x filename to edit a new file. vi prompts you to set a password, after
which it encrypts the content of the file. Whenever you access this file, vi requests the
correct password.
For even more security, you can place the encrypted text file in an encrypted partition.
This is recommended because the encryption used in vi is not very strong.
Administrators only need to care about the applications that are vulnerable to attacks
and generate profiles for these. Hardening a system thus comes down to building and
maintaining the AppArmor profile set and monitoring any policy violations or exceptions
logged by AppArmor's reporting facility.
Users should not notice AppArmor at all. It runs “behind the scenes” and does not require
any user interaction. Performance is not affected noticeably by AppArmor. If some
activity of the application is not covered by an AppArmor profile or if some activity
of the application is prevented by AppArmor, the administrator needs to adjust the
profile of this application to cover this kind of behavior.
This guide outlines the basic tasks that need to be performed with AppArmor to effec-
tively harden a system. For more in-depth information, refer to Novell AppArmor Ad-
ministration Guide.
• apparmor-parser
• libapparmor
• apparmor-docs
• yast2-apparmor
• apparmor-profiles
• apparmor-utils
• audit
AppArmor will not be initialized on the next system boot and stays inactive until you
explicitly reenable it. Reenabling a service using the YaST Runlevel tool is similar to
disabling it.
Toggle the status of AppArmor in a running system by using the AppArmor Control
Panel. These changes take effect as soon as you apply them and survive a reboot of the
system. To toggle AppArmor's status, proceed as follows:
2 Build the needed profiles as roughly outlined in Section 48.3.2, “Building and
Modifying Profiles” (page 875). Check the results and adjust the profiles when
necessary.
4 Update your profiles whenever your environment changes or you need to react
to security events logged by AppArmor's reporting tool. Refer to Section 48.3.4,
“Updating Your Profiles” (page 879).
Network Agents
Programs (servers and clients) that have open network ports. User clients, such as
mail clients and Web browsers, mediate privilege. These programs run with the
privilege to write to the user's home directory and they process input from poten-
tially hostile remote sources, such as hostile Web sites and e-mailed malicious
code.
Web Applications
Programs that can be invoked through a Web browser, including CGI Perl scripts,
PHP pages, and more complex Web applications.
To find out which processes are currently running with open network ports and might
need a profile to confine them, run aa-unconfined as root.
Each of the processes in the above example labeled not confined might need a
custom profile to confine it. Those labeled confined by are already protected by
AppArmor.
For more information about choosing the the right applications to profile, refer
to Section “Determining Programs to Immunize” (Chapter 1, Immunizing Pro-
grams, ↑Novell AppArmor Administration Guide).
There are two ways of managing profiles. One is to use the graphical front-end provided
by the YaST Novell AppArmor modules and the other is to use the command line tools
provided by the AppArmor suite itself. Both methods basically work the same way.
Outline the basic profile by running YaST > Novell AppArmor > Add Profile
Wizard and specifying the complete path of the application to profile.
A basic profile is outlined and AppArmor is put into learning mode, which means
that it logs any activity of the program you are executing but does not yet restrict
it.
2 Run the full range of the application's actions to let AppArmor get a very specific
picture of its activities.
3 Let AppArmor analyze the log files generated in Step 2 (page 876) by running
typing S in aa-genprof.
or
Analyze the logs by clicking Scan system log for AppArmor events in the Add
Profile Wizard and following the instructions given in the wizard until the profile
is completed.
AppArmor scans the logs it recorded during the application's run and asks you
to set the access rights for each event that was logged. Either set them for each
file or use globbing.
5 Once all access permissions are set, your profile is set to enforce mode. The
profile is applied and AppArmor restricts the application according to the profile
just created.
If you started aa-genprof on an application that had an existing profile that was
in complain mode, this profile remains in learning mode upon exit of this learning
cycle. For more information about changing the mode of a profile, refer to Section
“aa-complain—Entering Complain or Learning Mode” (Chapter 4, Building
Profiles from the Command Line, ↑Novell AppArmor Administration Guide)
Test your profile settings by performing every task you need with the application you
just confined. Normally, the confined program runs smoothly and you do not notice
AppArmor activities at all. However, if you notice certain misbehavior with your appli-
cation, check the system logs and see if AppArmor is too tightly confining your appli-
cation. Depending on the log mechanism used on your system, there are several places
to look for AppArmor log entries:
/var/log/audit/audit.log
If the audit package is installed and auditd is running, AppArmor events are
logged as follows:
type=APPARMOR msg=audit(1140325305.502:1407): REJECTING w access to
/usr/lib/firefox/update.test (firefox-bin(9469) profile
/usr/lib/firefox/firefox-bin active /usr/lib/firefox/firefox-bin)
/var/log/messages
If auditd is not used, AppArmor events are logged in the standard system log under
/var/log/messages. An example entry would look like the following:
Feb 22 18:29:14 dhcp-81 klogd: audit(1140661749.146:3): REJECTING w access
to /dev/console (mdnsd(3239) profile /usr/sbin/mdnsd active
/usr/sbin/mdnsd)
dmesg
If auditd is not running, AppArmor events can also be checked using the dmesg
command:
audit(1140661749.146:3): REJECTING w access to /dev/console (mdnsd(3239)
profile /usr/sbin/mdnsd active /usr/sbin/mdnsd)
To adjust the profile, analyze the log messages relating to this application again as de-
scribed in Step 3 (page 876). Determine the access rights or restrictions when prompted.
For more information about profile building and modification, refer to Chap-
ter 2, Profile Components and Syntax (↑Novell AppArmor Administration Guide),
Chapter 3, Building and Managing Profiles with YaST (↑Novell AppArmor Ad-
ministration Guide), and Chapter 4, Building Profiles from the Command Line
(↑Novell AppArmor Administration Guide).
1 Make sure that a mail server is running on your system to deliver the event noti-
fications.
2 Log in as root and start YaST. Then select Novell AppArmor > AppArmor
Control Panel).
4 For each record type (Terse, Summary, and Verbose), set a report frequency,
enter the e-mail address that should receive the reports, and determine the
severity of events to log. To include unknown events in the event reports, check
Include Unknown Severity Events.
Using Novell AppArmor reports, you can read important Novell AppArmor security
events reported in the log files without manually sifting through the cumbersome mes-
sages only useful to the aa-logprof tool. You can decrease the size of the report by fil-
tering by date range or program name.
1 Log in as root and start YaST. Select Novell AppArmor > AppArmor Reports.
3 Edit the report generation frequency, e-mail address, export format, and location
of the reports by selecting Edit and providing the requested data.
5 Browse through the archived reports of a given type by selecting View Archive
and specifying the report type.
or
3 Adjust access or execute rights to any resource or for any executable that has
been logged when prompted.
For more information about updating your profiles from the system logs, refer
to Section “Updating Profiles from Log Entries” (Chapter 3, Building and Man-
aging Profiles with YaST, ↑Novell AppArmor Administration Guide).
With the multiuser capability, the data of different users must be stored separately. Se-
curity and privacy need to be guaranteed. Data security was already an important issue,
even before computers could be linked through networks. Just like today, the most im-
portant concern was the ability to keep data available in spite of a lost or otherwise
damaged data medium, a hard disk in most cases.
This section is primarily focused on confidentiality issues and on ways to protect the
privacy of users, but it cannot be stressed enough that a comprehensive security concept
should always include procedures to have a regularly updated, workable, and tested
backup in place. Without this, you could have a very hard time getting your data
back—not only in the case of some hardware defect, but also if the suspicion arises that
someone has gained unauthorized access and tampered with files.
• personal communication with people who have the desired information or access
to the data on a computer
In all these cases, a user should be authenticated before accessing the resources or data
in question. A Web server might be less restrictive in this respect, but you still would
not want it to disclose all your personal data to any surfer.
In the list above, the first case is the one where the highest amount of human interaction
is involved, such as when you are contacting a bank employee and are required to prove
that you are the person owning that bank account. Then you are asked to provide a
signature, a PIN, or a password to prove that you are the person you claim to be. In
some cases, it might be possible to elicit some intelligence from an informed person
just by mentioning known bits and pieces to win the confidence of that person by using
clever rhetoric. The victim could be led to reveal gradually more information, maybe
without even becoming aware of it. Among hackers, this is called social engineering.
You can only guard against this by educating people and by dealing with language and
information in a conscious way. Before breaking into computer systems, attackers often
try to target receptionists, service people working with the company, or even family
members. In many cases, such an attack based on social engineering is only discovered
at a much later time.
A person wanting to obtain unauthorized access to your data could also use the tradi-
tional way and try to get at your hardware directly. Therefore, the machine should be
protected against any tampering so that no one can remove, replace, or cripple its
components. This also applies to backups and even any network cable or the power
cord. Also secure the boot procedure, because there are some well-known key combi-
nations that might provoke unusual behavior. Protect yourself against this by setting
passwords for the BIOS and the boot loader.
Reading a file locally on a host requires other access rules than opening a network
connection with a server on a different host. There is a distinction between local secu-
rity and network security. The line is drawn where data must be put into packets to be
sent somewhere else.
49.1.2 Passwords
On a Linux system, passwords are not stored as plain text and the text string entered is
not simply matched with the saved pattern. If this were the case, all accounts on your
system would be compromised as soon as someone got access to the corresponding
file. Instead, the stored password is encrypted and, each time it is entered, is encrypted
again and the two encrypted strings are compared. This only provides more security if
the encrypted password cannot be reverse-computed into the original text string.
This is actually achieved by a special kind of algorithm, also called trapdoor algorithm,
because it only works in one direction. An attacker who has obtained the encrypted
string is not able to get your password by simply applying the same algorithm again.
Instead, it would be necessary to test all the possible character combinations until a
combination is found that looks like your password when encrypted. With passwords
eight characters long, there are quite a number of possible combinations to calculate.
Replacing some letters of a word with similar looking numbers is not safe enough.
Password cracking programs that use dictionaries to guess words also play with substi-
tutions like that. A better way is to make up a word with no common meaning, something
that only makes sense to you personally, like the first letters of the words of a sentence
or the title of a book, such as “The Name of the Rose” by Umberto Eco. This would
give the following safe password: “TNotRbUE9”. In contrast, passwords like “beerbud-
dy” or “jasmine76” are easily guessed even by someone who has only some casual
knowledge about you.
To define which of the above files is used by SUSE Linux Enterprise's configuration
programs to set permissions accordingly, select Local Security in the Security and Users
section of YaST. To learn more about the topic, read the comments in /etc/
permissions or consult the manual page of chmod (man chmod).
A buffer overflow can happen if the actual size of a memory buffer is not taken into
account when writing to that buffer. There are cases where this data (as generated by
the user) uses up some more space than what is available in the buffer. As a result, data
Format string bugs work in a slightly different way, but again it is the user input that
could lead the program astray. In most cases, these programming errors are exploited
with programs executed with special permissions—setuid and setgid programs—which
also means that you can protect your data and your system from such bugs by removing
the corresponding execution privileges from programs. Again, the best way is to apply
a policy of using the lowest possible privileges (see Section 49.1.4, “File Permissions”
(page 884)).
Given that buffer overflows and format string bugs are bugs related to the handling of
user data, they are not only exploitable if access has been given to a local account.
Many of the bugs that have been reported can also be exploited over a network link.
Accordingly, buffer overflows and format string bugs should be classified as being
relevant for both local and network security.
49.1.6 Viruses
Contrary to what some people say, there are viruses that run on Linux. However, the
viruses that are known were released by their authors as a proof of concept to prove
that the technique works as intended. None of these viruses have been spotted in the
wild so far.
Viruses cannot survive and spread without a host on which to live. In this case, the host
would be a program or an important storage area of the system, such as the master boot
record, which needs to be writable for the program code of the virus. Owing to its
multiuser capability, Linux can restrict write access to certain files, especially important
with system files. Therefore, if you did your normal work with root permissions, you
would increase the chance of the system being infected by a virus. In contrast, if you
follow the principle of using the lowest possible privileges as mentioned above, chances
of getting a virus are slim.
Apart from that, you should never rush into executing a program from some Internet
site that you do not really know. SUSE Linux Enterprise's RPM packages carry a
cryptographic signature as a digital label that the necessary care was taken to build
Viruses should not be confused with worms, which belong to the world of networks
entirely. Worms do not need a host to spread.
When an X client should be displayed remotely using an X server, the latter should
protect the resource managed by it (the display) from unauthorized access. In more
concrete terms, certain permissions must be given to the client program. With the X
Window System, there are two ways to do this, called host-based access control and
cookie-based access control. The former relies on the IP address of the host where the
client should run. The program to control this is xhost. xhost enters the IP address of a
legitimate client into a tiny database belonging to the X server. However, relying on
IP addresses for authentication is not very secure. For example, if there were a second
user working on the host sending the client program, that user would have access to
the X server as well—just like someone stealing the IP address. Because of these
shortcomings, this authentication method is not described in more detail here, but you
can learn about it with man xhost.
SSH (secure shell) can be used to encrypt a network connection completely and forward
it to an X server transparently without the encryption mechanism being perceived by
the user. This is also called X forwarding. X forwarding is achieved by simulating an
X server on the server side and setting a DISPLAY variable for the shell on the remote
host. Further details about SSH can be found in Chapter 44, SSH: Secure Network Op-
erations (page 831).
WARNING
If you do not consider the host where you log in to be a secure host, do not
use X forwarding. With X forwarding enabled, an attacker could authenticate
via your SSH connection to intrude on your X server and sniff your keyboard
input, for instance.
Buffer overflows and format string bugs exploitable over a network link are certainly
the most frequent form of remote attacks in general. Exploits for these—programs to
Spoofing is an attack where packets are modified to contain counterfeit source data,
usually the IP address. Most active forms of attack rely on sending out such fake
packets—something that, on a Linux machine, can only be done by the superuser
(root).
Many of the attacks mentioned are carried out in combination with a DoS. If an attacker
sees an opportunity to bring down a certain host abruptly, even if only for a short time,
it makes it easier for him to push the active attack, because the host will not be able to
interfere with the attack for some time.
49.1.13 Worms
Worms are often confused with viruses, but there is a clear difference between the two.
Unlike viruses, worms do not need to infect a host program to live. Instead, they are
specialized to spread as quickly as possible on network structures. The worms that ap-
peared in the past, such as Ramen, Lion, or Adore, make use of well-known security
holes in server programs like bind8 or lprNG. Protection against worms is relatively
easy. Given that some time elapses between the discovery of a security hole and the
moment the worm hits your server, there is a good chance that an updated version of
the affected program is available on time. That is only useful if the administrator actu-
ally installs the security updates on the systems in question.
The following is a list of rules you may find useful in dealing with basic security con-
cerns:
• According to the rule of using the most restrictive set of permissions possible for
every job, avoid doing your regular jobs as root. This reduces the risk of getting
a cuckoo egg or a virus and protects you from your own mistakes.
• Try to keep the most important network-related packages up-to-date and subscribe
to the corresponding mailing lists to receive announcements on new versions of
such programs (bind, postfix, ssh, etc.). The same should apply to software relevant
to local security.
• Disable any network services you do not absolutely require for your server to work
properly. This makes your system safer. Open ports, with the socket state LISTEN,
can be found with the program netstat. As for the options, it is recommended
to use netstat -ap or netstat -anp. The -p option allows you to see which
process is occupying a port under which name.
Compare the netstat results with those of a thorough port scan done from outside
your host. An excellent program for this job is nmap, which not only checks out
the ports of your machine, but also draws some conclusions as to which services
are waiting behind them. However, port scanning may be interpreted as an aggressive
act, so do not do this on a host without the explicit approval of the administrator.
Finally, remember that it is important not only to scan TCP ports, but also UDP
ports (options -sS and -sU).
• To monitor the integrity of the files of your system in a reliable way, use the program
AIDE (Advanced Intrusion Detection Environment), available on SUSE Linux
Enterprise. Encrypt the database created by AIDE to prevent someone from tamper-
ing with it. Furthermore, keep a backup of this database available outside your
machine, stored on an external data medium not connected to it by a network link.
• Take proper care when installing any third-party software. There have been cases
where a hacker had built a trojan horse into the tar archive of a security software
package, which was fortunately discovered very quickly. If you install a binary
package, have no doubts about the site from which you downloaded it.
SUSE's RPM packages are gpg-signed. The key used by SUSE for signing is:
ID:9C800ACA 2000-10-19 SUSE Package Signing Key <[email protected]>
Key fingerprint = 79C1 79B2 E1C8 20C1 890F 9994 A84E DAE8 9C80 0ACA
• Check your log files. Whenever possible, write a small script to search for suspicious
entries. Admittedly, this is not exactly a trivial task. In the end, only you can know
which entries are unusual and which are not.
View Window
The view window always displays the currently selected contents, such as online
manuals, search results, or Web pages.
The documentation available in the SUSE Help Center depends on the current
language. Changing your language changes the tree view.
If no search index has been generated, the system automatically prompts you to do so
when you click the Search tab or enter a search string then click Search. In the window
for generating the search index, shown in Figure 50.3, “Generating a Search Index”
(page 900), use the check boxes to determine the information sources to index. The index
is generated when you exit the dialog with Build Index.
To limit the search base and the hit list as precisely as possible, use the three drop-down
menus to determine the number of displayed hits and the selection area of sources to
search. The following options are available for determining the selection area:
Default
A predefined selection of sources is searched.
All
All sources are searched.
None
No sources selected for the search.
Custom
Determine the sources to search by activating the respective check boxes in the
overview.
When you have completed the search configuration, click Search. The relevant items
are then displayed in the view window and can easily be navigated with mouse clicks.
Number Description
6 Games
Generally, man pages are delivered with the associated command. They can be browsed
in the help center or directly in a shell. To display a man page in a shell, use the man
command. For example, to display the man page for ls enter man ls. Each man page
consists of several parts labeled NAME, SYNOPSIS, DESCRIPTION, SEE ALSO, LI-
CENSING, and AUTHOR. There may be additional sections available depending on
the type of command. With Q, exit the man page viewer.
For more convenience, use the Help Center or Konqueror. Start Konqueror and type
info:/ to view the top level. To display the info page for grep, type info:/grep.
50.4.1 HOWTOs
HOWTOs are usually a short, informal, step-by-step guide to accomplishing a specific
task. It is written by experts for nonexperts in a procedural manner. For example, how
to configure a DHCP server. HOWTOs can be found in the package howto and are
installed under /usr/share/doc/howto
AUTHORS
The list of the main developers of this package and usually their tasks.
BUGS
Known bugs or malfunctions of this package. Usually also a link to a Bugzilla Web
page where you can search all bugs.
CHANGES , ChangeLog
Summary of changes from version to version. Usually interesting for developers,
because it is very detailed.
COPYING , LICENSE
Licensing information.
FAQ
Question and answers collected from mailing lists or newsgroups.
INSTALL
Procedures for installing this package in your system. Normally you do not need
it, because you have the package installed already.
README , README.*
General information such as how to use it and what you can do with this package.
TODO
Things that are not implemented yet, but probably will be in the future.
MANIFEST
List of files with a brief summary.
NEWS
Description of what is new in this version.
Usenet is organized into seven topical categories: comp.* for computer-related discus-
sions, misc.* for miscellaneous topics, news.* for newsgroup-related matters,
rec.* for recreation and entertainment, sci.* for science-related discussions, soc.*
for social discussions, and talk.* for various controversial topics. The top levels are
split in subgroups. For instance, comp.os.linux.hardware is a newsgroup for
Linux-specific hardware issues.
Before you can post an article, have your client connect to a news server and subscribe
to a specific newsgroup. News clients include Knode or Evolution. Each news server
communicates to other news servers and exchanges articles with them. Not all news-
groups may be available on your news server.
http://www.linuxbase.org
The Free Standards Group is an independent nonprofit organization that promotes
the distribution of free software and open source software. The organization endeav-
ors to achieve this by defining distribution-independent standards. The maintenance
of several standards, such as the important LSB (Linux Standard Base), is supervised
by this organization.
http://www.w3.org
The World Wide Web Consortium (W3C) is certainly one of the best-known
standards organizations. It was founded in October 1994 by Tim Berners-Lee and
http://www.oasis-open.org
OASIS (Organization for the Advancement of Structured Information Standards)
is an international consortium specializing in the development of standards for Web
security, e-business, business transactions, logistics, and interoperability between
various markets.
http://www.ietf.org
The Internet Engineering Task Force (IETF) is an internationally active cooperative
of researchers, network designers, suppliers, and users. It concentrates on the de-
velopment of Internet architecture and the smooth operation of the Internet by
means of protocols.
http://www.ieee.org
The Institute of Electrical and Electronics Engineers (IEEE) is an organization that
draws up standards in the areas of information technology, telecommunication,
medicine and health care, transport, and others. IEEE standards are subject to a
fee.
http://www.iso.org
The ISO Committee (International Organization for Standards) is the world's largest
developer of standards and maintains a network of national standardization institutes
in over 140 countries. ISO standards are subject to a fee.
http://www.din.de , http://www.din.com
The Deutsches Institut für Normung (DIN) is a registered technical and scientific
association. It was founded in 1917. According to DIN, the organization is “the
institution responsible for standards in Germany and represents German interests
in worldwide and European standards organizations.”
YaST offers the possibility to collect all system information needed by the support
team. Use Miscellaneous > Support Query. Select the problem category. When all in-
formation is gathered, attach it to your support request.
The following is a list of the most commonly checked log files and what they typically
contain.
/var/log/warn All messages from the kernel and system log daemon
assigned WARNING level or higher.
Apart from log files, your machine also supplies you with information about the running
system. See Table 51.2: System Information.
File Description
/proc/ioports This shows which I/O ports are in use at the moment.
Linux comes with a number of tools for system analysis and monitoring. See Chapter 17,
System Monitoring Utilities (page 325) for a selection of the most important ones used
in system diagnostics.
Each scenario included in the following begins with a header describing the problem
followed by a paragraph or two offering suggested solutions, available references for
more detailed solutions, and cross-references to other scenarios that might be related.
Save the hardware information displayed to a file by clicking Save to File. Select the
desired directory and filename then click Save to create the file.
The boot disks include the loader SYSLINUX and the program linuxrc. SYSLINUX
enables the selection of a kernel during the boot procedure and the specification of any
parameters needed for the hardware used. The program linuxrc supports the loading of
kernel modules for your hardware and subsequently starts the installation.
When booting from a boot disk, the boot procedure is initiated by the boot loader
SYSLINUX (package syslinux). When the system is booted, SYSLINUX runs a
minimum hardware detection that mainly consists of the following steps:
1. The program checks if the BIOS provides VESA 2.0–compliant framebuffer support
and boots the kernel accordingly.
3. The first block of the first hard disk (MBR) is read to map BIOS IDs to Linux de-
vice names during the boot loader configuration. The program attempts to read
the block by means of the the lba32 functions of the BIOS to determine if the BIOS
supports these functions.
If you keep Shift pressed when SYSLINUX starts, all these steps are skipped. For
troubleshooting purposes, insert the line
in syslinux.cfg for the boot loader to display which action is currently being per-
formed.
If the machine does not boot from the floppy disk, you may need to change the boot
sequence in the BIOS to A,C,CDROM.
If the system does not have a CD-ROM or floppy disk, it is still possible that an external
CD-ROM, connected with USB, FireWire, or SCSI, can be used to boot the system.
This depends largely on the interaction of the BIOS and the hardware used. Sometimes
a BIOS update may help if you encounter problems.
The BIOS is the software that enables the very basic functions of a computer. Mother-
board vendors provide a BIOS specifically made for their hardware. Normally, the
BIOS setup can only be accessed at a specific time—when the machine is booting.
During this initialization phase, the machine performs a number of diagnostic hardware
tests. One of them is a memory check, indicated by a memory counter. When the counter
1 Enter the BIOS using the proper key as announced by the boot routines and wait
for the BIOS screen to appear.
2 To change the boot sequence in an AWARD BIOS, look for the BIOS FEATURES
SETUP entry. Other manufacturers may have a different name for this, such as
ADVANCED CMOS SETUP. When you have found the entry, select it and confirm
with Enter.
3 In the screen that opens, look for a subentry called BOOT SEQUENCE. The boot
sequence is often set to something like C,A or A,C. In the former case, the ma-
chine first searches the hard disk (C) then the floppy drive (A) to find a bootable
medium. Change the settings by pressing PgUp or PgDown until the sequence is
A,CDROM,C.
4 Leave the BIOS setup screen by pressing Esc. To save the changes, select SAVE
& EXIT SETUP or press F10. To confirm that your settings should be saved,
press Y.
Procedure 51.2 Changing the Boot Sequence in a SCSI BIOS (Adaptec Host
Adapter)
4 Open Configure Adapter Settings. Under Additional Options, select Boot Device
Options and press Enter.
6 Press Esc twice to return to the start screen of the SCSI BIOS.
Regardless of what language and keyboard layout your final installation will be using,
most BIOS configurations use the US keyboard layout as depicted in the following
figure:
If your system fails to install using the standard Installation mode from the first instal-
lation boot screen, try the following:
1 With the first CD or DVD still in the CD-ROM drive, reboot the machine with
Ctrl + Alt + Del or using the hardware reset button.
2 When the boot screen appears, use the arrow keys of your keyboard to navigate
to Installation--ACPI Disabled and press Enter to launch the boot and installation
process. This option disables the support for ACPI power management techniques.
If both of these options fail, use the boot options prompt to pass any additional param-
eters needed to support this type of hardware to the installation kernel. For more infor-
mation about the parameters available as boot options, refer to the kernel documentation
located in /usr/src/linux/Documentation/kernel-parameters.txt.
There are various other ACPI-related kernel parameters that can be entered at the boot
prompt prior to booting for installation:
acpi=off
This parameter disables the complete ACPI subsystem on your computer. This may
be useful if your computer cannot handle ACPI at all or if you think ACPI in your
computer causes trouble.
acpi=force
Always enable ACPI even if your computer has an old BIOS dated before the year
2000. This parameter also enables ACPI if it is set in addition to acpi=off.
acpi=noirq
Do not use ACPI for IRQ routing.
acpi=ht
Run only enough ACPI to enable hyper-threading.
acpi=strict
Be less tolerant of platforms that are not strictly ACPI specification compliant.
pci=noacpi
Disable PCI IRQ routing of the new ACPI system.
pnpacpi=off
This option is for seriell or parallel problems when your BIOS setup contains wrong
interrupts or ports.
nohz=off
Disable the nohz feature. If your machine hangs, this option might help. Generally,
you do not need it.
Once you have determined the right parameter combination, YaST automatically writes
them to the boot loader configuration to make sure that the system boots properly next
time.
If unexplainable errors occur when the kernel is loaded or during the installation, select
Memory Test in the boot menu to check the memory. If Memory Test returns an error,
it is usually a hardware error.
2 Press F3 to open a menu from which to select a lower resolution for installation
purposes.
Instead of starting right into the graphical installation routine, the system continues
to run in text mode then halts, displaying a message containing the IP address
and port number at which the installer can be reached via a browser interface or
a VNC viewer application.
4 If using a browser to access the installer, launch the browser and enter the address
information provided by the installation routines on the future SUSE Linux En-
terprise machine and hit Enter:
http://ip_address_of_machine:5801
A dialog opens in the browser window prompting you for the VNC password.
Enter it and proceed with the installation as described in Chapter 3, Installation
with YaST (page 17).
IMPORTANT
Installation via VNC works with any browser under any operating system,
provided Java support is enabled.
Although the text boot screen looks minimalistic, it provides nearly the same function-
ality as the graphical one:
Boot Options
Unlike the graphical interface, the different boot options cannot be selected using
the cursor keys of your keyboard. The boot menu of the text mode boot screen offers
some keywords to enter at the boot prompt. These keywords map to the options
offered in the graphical version. Enter your choice and hit Enter to launch the boot
process.
Screen Resolutions
Use the F keys to determine the screen resolution for installation. If you need to
boot in text mode, choose F3.
4 Select a language.
6 In the Installation Mode screen, select Other and set the installation mode to
Repair Installed System.
7 Once in the YaST System Repair module, select Expert Tools then select Install
New Boot Loader.
If, for some reason, the graphical interface does not come up or you prefer to repair the
system manually, refer to Section “Using the Rescue System” (page 942) for instructions.
BIOS Settings
Check your BIOS for references to your hard drive. GRUB might simply not be
started if the hard drive itself cannot be found with the current BIOS settings.
The returned line indicates that the machine's default runlevel (initdefault) is set
to 5 and that it should boot to the graphical desktop. If the runlevel is set to any other
number, use the YaST Runlevel Editor module to set it to 5.
IMPORTANT
If the runlevel is set to 5, you might have corruption problems with your desktop or X
Windows software. Examine the log files at /var/log/Xorg.*.log for detailed
messages from the X server as it attempted to start. If the desktop fails during start, it
might log error messages to /var/log/messages. If these error messages hint at
a configuration problem in the X server, try to fix these issues. If the graphical system
still does not come up, consider reinstalling the graphical desktop.
One quick test: the startx command should force the X Window System to start with
the configured defaults if the user is currently logged in on the console. If that does not
work, it should log errors to the console. For more information about the X Window
system configuration, refer to Chapter 26, The X Window System (page 481).
• The network is not working. For further directions on this, turn to Section 51.5,
“Network Problems” (page 929).
• DNS is not working at the moment (which prevents GNOME or KDE from working
and the system from making validated requests to secure servers). One indication
that this is the case is that the machine takes an extremely long time to respond to
any action. Find more information about this topic in Section 51.5, “Network
Problems” (page 929).
• If the system is configured to use Kerberos, the system's local time might have
drifted past the accepted variance with the Kerberos server time (this is typically
300 seconds). If NTP (network time protocol) is not working properly or local NTP
servers are not working, Kerberos authentication ceases to function because it de-
pends on common clock synchronization across the network.
2 Enter 1 at the boot prompt to make the system boot into single-user mode.
5 Boot into the full multiuser and network mode by entering telinit 5 at the
command line.
• The user's home directory containing the desktop configuration files is corrupted
or write protected.
• There might be problems with the X Window System authenticating this particular
user, especially if the user's home directory has been used with another Linux dis-
tribution prior to installing the current one.
1 Check whether the user remembered his password correctly before you start de-
bugging the whole authentication mechanism. If the user might not remember
his password correctly, use the YaST User Management module to change the
user's password.
3 Try to log in from a console (using Ctrl + Alt + F1). If this is successful, the blame
cannot be put on PAM, because it is possible to authenticate this user on this
machine. Try to locate any problems with the X Window System or the desktop
(GNOME or KDE). For more information, refer to Section 51.4.3, “Login Suc-
cessful but GNOME Desktop Fails ” (page 927) and Section 51.4.4, “Login Suc-
cessful but KDE Desktop Fails” (page 928).
4 If the user's home directory has been used with another Linux distribution, remove
the Xauthority file in the user's home. Use a console login via Ctrl + Alt +
F1 and run rm .Xauthority as this user. This should eliminate X authentica-
tion problems for this user. Try a graphical login again.
5 If graphical login still fails, do a console login with Ctrl + Alt + F1. Try to start
an X session on another display—the first one (:0) is already in use:
startx -- :1
This should bring up a graphical screen and your desktop. If it does not, check
the log files of the X Window System (/var/log/Xorg.displaynumber
.log) or the log file for your desktop applications (.xsession-errors in
the user's home directory) for any irregularities.
6 If the desktop could not start because of corrupt configuration files, proceed with
Section 51.4.3, “Login Successful but GNOME Desktop Fails ” (page 927) or
Section 51.4.4, “Login Successful but KDE Desktop Fails” (page 928).
The following are some common reasons why network authentication for a particular
user might fail on a specific machine:
• The username exists in the machine's local authentication files and is also provided
by a network authentication system, causing conflicts.
• The home directory exists but is corrupt or unavailable. Perhaps it is write protected
or is on a server that is inaccessible at the moment.
• The user does not have permission to log in to that particular host in the authentica-
tion system.
• The machine cannot reach the authentication server or directory server that contains
that user's information.
• There might be problems with the X Window System authenticating this particular
user, especially if the user's home has been used with another Linux distribution
prior to installing the current one.
To locate the cause of the login failures with network authentication, proceed as follows:
1 Check whether the user remembered his password correctly before you start de-
bugging the whole authentication mechanism.
2 Determine the directory server the machine relies on for authentication and make
sure that it is up and running and properly communicating with the other machines.
3 Determine that the user's username and password work on other machines to
make sure that his authentication data exists and is properly distributed.
4 See if another user can log in to the misbehaving machine. If another user can
log in without difficulty or if root can log in, log in and examine the /var/
log/messages file. Locate the time stamps that correspond to the login at-
tempts and determine if PAM has produced any error messages.
5 Try to log in from a console (using Ctrl + Alt + F1). If this is successful, the blame
cannot be put on PAM or the directory server on which the user's home is hosted,
because it is possible to authenticate this user on this machine. Try to locate any
problems with the X Window System or the desktop (GNOME or KDE). For
more information, refer to Section 51.4.3, “Login Successful but GNOME
Desktop Fails ” (page 927) and Section 51.4.4, “Login Successful but KDE
Desktop Fails” (page 928).
6 If the user's home directory has been used with another Linux distribution, remove
the Xauthority file in the user's home. Use a console login via Ctrl + Alt +
F1 and run rm .Xauthority as this user. This should eliminate X authentica-
tion problems for this user. Try a graphical login again.
7 If graphical login still fails, do a console login with Ctrl + Alt + F1. Try to start
an X session on another display—the first one (:0) is already in use:
This should bring up a graphical screen and your desktop. If it does not, check
the log files of the X Window System (/var/log/Xorg.displaynumber
.log) or the log file for your desktop applications (.xsession-errors in
the user's home directory) for any irregularities.
8 If the desktop could not start because of corrupt configuration files, proceed with
Section 51.4.3, “Login Successful but GNOME Desktop Fails ” (page 927) or
Section 51.4.4, “Login Successful but KDE Desktop Fails” (page 928).
mv .gconf .gconf-ORIG-RECOVER
mv .gnome2 .gnome2-ORIG-RECOVER
4 Log out.
If this causes the login problems, attempt to recover only the critical application
data and reconfigure the remainder of the applications.
Cache data is used at desktop start-up to increase performance. If this data is corrupted,
start-up is slowed down or fails entirely. Removing them forces the desktop start-up
routines to start from scratch. This takes more time than a normal start-up, but data is
intact after this and the user can login.
To remove the cache files of the KDE desktop, issue the following command as root:
rm -rf /tmp/kde-user /tmp/socket-user
Replace user with the actual username. Removing these two directories just removes
the corrupted cache files. No real data is harmed using this procedure.
Corrupted desktop configuration files can always be replaced with the initial configura-
tion files. If you want to recover the user's adjustments, carefully copy them back from
their temporary location after the configuration has been restored using the default
configuration values.
4 Log out.
5 Log in again.
6 After the desktop has started successfully, copy the user's own configurations
back into place:
cp -a .kde-ORIG-RECOVER/share .kde/share
IMPORTANT
If the user's own adjustments caused the login to fail and continue to do
so, repeat the procedure as described above, but do not copy the .kde/
share directory.
1 If using an ethernet connection, check the hardware first. Make sure that your
network cable is properly plugged into your computer. The control lights next
to your ethernet connector, if available, should both be active.
If the connection fails, check whether your network cable works with another
machine. If it does, your network card causes the failure. If hubs or switches are
included in your network setup, suspect them to be the culprits as well.
3 Once you have checked your basic network connectivity, try to find out which
service is not responding. Gather the address information of all network servers
needed in your setup. Either look them up in the appropriate YaST module or
ask your system administrator. The following list gives some of the typical net-
work servers involved in a setup together with the symptoms of an outage.
Kerberos (Authentication)
Authentication would not work and login to any machine would fail.
4 Check whether the network servers are running and whether your network setup
allows you to establish a connection:
IMPORTANT
If ping fails with unknown host, the name service is not configured cor-
rectly or the hostname used was incorrect. Use ping -n ipaddress to
try to connect to this host without name service. If this is successful, check
the spelling of the hostname and for a misconfigured name service in your
network. For further checks on this matter, refer to Step 4b (page 932). If
ping still fails, either your network card is not configured correctly or your
4b Use host hostname to check whether the hostname of the server you
are trying to connect to is properly translated into an IP address and vice
versa. If this command returns the IP address of this host, the name service
is up and running. If the host command fails, check all network configura-
tion files relating to name and address resolution on your host:
/etc/resolv.conf
This file is used to keep track of the name server and domain you are
currently using. It can be modified manually or automatically adjusted
by YaST or DHCP. Automatic adjustment is preferable. However, make
sure that this file has the following structure and all network addresses
and domain names are correct:
search fully_qualified_domain_name
nameserver ipaddress_of_nameserver
This file can contain more than one name server address, but at least
one of them must be correct to provide name resolution to your host. If
needed, adjust this file using the YaST DNS and Hostname module.
/etc/nsswitch.conf
This file tells Linux where to look for name service information. It should
look like this:
...
hosts: files dns
networks: files dns
...
The dns entry is vital. It tells Linux to use an external name server.
Normally, these entries are automatically made by YaST, but it never
hurts to check.
If all the relevant entries on the host are correct, let your system admin-
istrator check the DNS server configuration for the correct zone infor-
4d If the name service and network hardware are properly configured and run-
ning, but some external network connections still get long time-outs or fail
entirely, use traceroute fully_qualified_domain_name (exe-
cuted as root) to track the network route these requests are taking. This
command lists any gateway (hop) a request from your machine passes on its
way to its destination. It lists the response time of each hop and whether this
hop is reachable at all. Use a combination of traceroute and ping to track
down the culprit and let the administrators know.
Once you have identified the cause of your network trouble, you can resolve it yourself
(if the problem is located on your machine) or let the system administrators of your
network know about your findings so they can reconfigure the services or repair the
necessary systems.
For more information about NetworkManager, refer to Section 30.5, “Managing Network
Connections with NetworkManager” (page 579).
2 Create a backup profile holding all details needed for the backup, filename of
the archive file, scope, and type of the backup:
2c Enter the path to the location of the backup if you want to keep a local
backup. For your backup to be archived on a network server (via NFS), enter
2e Determine the backup options to use, such as whether files not belonging to
any package should be backed up and whether a list of files should be dis-
played prior to creating the archive. Also determine whether changed files
should be identified using the time-consuming MD5 mechanism.
Use Expert to enter a dialog for the backup of entire hard disk areas. Current-
ly, this option only applies to the Ext2 file system.
2f Finally, set the search constraints to exclude certain system areas from the
backup area that do not need to be backed up, such as lock files or cache
files. Add, edit, or delete items until your needs are met and leave with OK.
3 Once you have finished the profile settings, you can start the backup right away
with Create Backup or configure automatic backup. It is also possible to create
other profiles tailored for various other purposes.
4 Determine the backup start time. These settings depend on the backup frequency
selected.
5 Decide whether to keep old backups and how many should be kept. To receive
an automatically generated status message of the backup process, check Send
Summary Mail to User root.
6 Click OK to apply your settings and have the first backup start at the time speci-
fied.
2 Enter the location of the backup file. This could be a local file, a network
mounted file, or a file on a removable device, such as a floppy or a CD. Then
click Next.
The following dialog displays a summary of the archive properties, such as the
filename, date of creation, type of backup, and optional comments.
4 Expert Options opens a dialog in which to fine-tune the restore process. Return
to the Archive Properties dialog by clicking OK.
5 Click Next to open the view of packages to restore. Press Accept to restore all
files in the archive or use the various Select All, Deselect All, and Select Files
buttons to fine-tune your selection. Only use the Restore RPM Database option
if the RPM database is corrupted or deleted and this file is included in the backup.
6 After you click Accept, the backup is restored. Click Finish to leave the module
after the restore process is completed.
SUSE Linux Enterprise offers two different methods to cope with this kind of situation.
You can either use the YaST System Repair functionality or boot the rescue system.
The following sections cover both flavors of system repair.
Automatic Repair
If your system failed due to an unknown cause and you basically do not know
which part of the system is to blame for the failure, use Automatic Repair. An ex-
tensive automated check will be performed on all components of your installed
system. For a detailed description of this procedure, refer to Section “Automatic
Repair” (page 937).
Customized Repair
If your system failed and you already know which component is to blame, you can
cut the lengthy system check with Automatic Repair short by limiting the scope of
the system analysis to those components. For example, if the system messages
prior to the failure seem to indicate an error with the package database, you can
limit the analysis and repair procedure to checking and restoring this aspect of your
system. For a detailed description of this procedure, refer to Section “Customized
Repair” (page 939).
Expert Tools
If you already have a clear idea of what component failed and how this should be
fixed, you can skip the analysis runs and directly apply the tools necessary for the
repair of the respective component. For details, refer to Section “Expert Tools”
(page 940).
Choose one of the repair modes as described above and proceed with the system repair
as outlined in the following sections.
Automatic Repair
To start the automatic repair mode of YaST System Repair, proceed as follows:
1 Insert the first installation medium of SUSE Linux Enterprise into your CD or
DVD drive.
YaST now launches an extensive analysis of the installed system. The progress
of the procedure is displayed at the bottom of the screen with two progress bars.
The upper bar shows the progress of the currently running test. The lower bar
shows the overall progress of the analysis. The log window in the top section
tracks the currently running test and its result. See Figure 51.2, “Automatic Repair
Mode” (page 938). The following main test runs are performed with every run.
They contain, in turn, a number of individual subtests.
File Systems
All detected file systems are subjected to a file system–specific check.
Package Database
This checks whether all packages necessary for the operation of a minimal
installation are present. While it is optionally possible also to analyze the
base packages, this takes a long time because of their vast number.
8 Whenever an error is encountered, the procedure stops and a dialog opens outlin-
ing the details and possible solutions.
Read the screen messages carefully before accepting the proposed fix. If you
decide to decline a proposed solution, your system remains unchanged.
9 After the repair process has been terminated successfully, click OK and Finish
and remove the installation media. The system automatically reboots.
Customized Repair
To launch the Customized Repair mode and selectively check certain components of
your installed system, proceed as follows:
1 Insert the first installation medium of SUSE Linux Enterprise into your CD or
DVD drive.
Choosing Customized Repair shows a list of test runs that are all marked for ex-
ecution at first. The total range of tests matches that of automatic repair. If you
already know where no damage is present, unmark the corresponding tests.
Clicking Next starts a narrower test procedure that probably has a significantly
shorter running time.
Not all test groups can be applied individually. The analysis of the fstab entries
is always bound to an examination of the file systems, including existing swap
partitions. YaST automatically resolves such dependencies by selecting the
smallest number of necessary test runs.
8 Whenever an error is encountered, the procedure stops and a dialog opens outlin-
ing the details and possible solutions.
Read the screen messages carefully before accepting the proposed fix. If you
decide to decline a proposed solution, your system remains unchanged.
9 After the repair process has been terminated successfully, click OK and Finish
and remove the installation media. The system automatically reboots.
Expert Tools
If you are knowledgeable with SUSE Linux Enterprise and already have a very clear
idea of what needs to be repaired in your system, directly apply the tools skipping the
system analysis.
To make use of the Expert Tools feature of the YaST System Repair module, proceed
as follows:
1 Boot the system with the original installation medium used for the initial instal-
lation (as outlined in Chapter 3, Installation with YaST (page 17)).
4 After the repair process has been terminated successfully, click OK and Finish
and remove the installation media. The system automatically reboots.
Expert tools provides the following options to repair your faulty system:
• Check the file system for defects and start automatic repair processes.
• Resize partitions using the parted command. Find more information about this tool
at the Web site of GNU Parted (http://www.gnu.org/software/parted/
parted.html).
The rescue system can be loaded from various sources and locations. The simplest option
is to boot the rescue system from the original installation CD or DVD:
If your hardware setup does not include a CD or DVD drive, you can boot the rescue
system from a network source. The following example applies to a remote boot sce-
nario—if using another boot medium, such as a floppy disk, modify the info file
accordingly and boot as you would for a normal installation.
Once you have entered the rescue system, you can make use of the virtual consoles that
can be reached with Alt + F1 to Alt + F6.
A shell and many other useful utilities, such as the mount program, are available in the
/bin directory. The sbin directory contains important file and network utilities for
reviewing and repairing the file system. This directory also contains the most important
binaries for system maintenance, such as fdisk, mkfs, mkswap, mount, mount, init, and
shutdown, and ifconfig, ip, route, and netstat for maintaining the network. The directory
/usr/bin contains the vi editor, find, less, and ssh.
To see the system messages, either use the command dmesg or view the file /var/
log/messages.
1 Start the rescue system using one of the methods described above.
2 To mount a root file system located under /dev/sda6 to the rescue system,
use the following command:
mount /dev/sda6 /mnt
4 Open the problematic configuration file in the vi editor. Adjust and save the
configuration.
To set up a “change root” environment based on the installed system, proceed as fol-
lows:
1 First mount the root partition from the installed system and the device file system:
mount /proc
mount /sys
5 Now you have access to the installed system. Before rebooting the system, un-
mount the partitions with umount -a and leave the “change root” environment
with exit.
WARNING: Limitations
Although you have full access to the files and applications of the installed sys-
tem, there are some limitations. The kernel that is running is the one that was
booted with the rescue system. It only supports essential hardware and it is
not possible to add kernel modules from the installed system unless the kernel
versions are exactly the same (which is unlikely). So you cannot access a sound
card, for example. It is also not possible to start a graphical user interface.
Also note that you leave the “change root” environment when you switch the
console with Alt + F1 to Alt + F6.
To check the boot loader configuration and reinstall the boot loader, proceed as follows:
1 Perform the necessary steps to access the installed system as described in Section
“Accessing the Installed System” (page 944).
2 Check whether the following files are correctly configured according to the
GRUB configuration principles outlined in Chapter 21, The Boot Loader
(page 403).
• /etc/grub.conf
• /boot/grub/device.map
• /boot/grub/menu.lst
4 Unmount the partitions, log out from the “change root” environment, and reboot
the system:
umount -a
exit
reboot
For this method to work, the SUSE Linux Enterprise Server for IBM System z
installation data must be available. For details, refer to Section “Making the
Installation Data Available” (Chapter 2, Preparing for Installation, ↑Architecture-
Specific Information) from Architecture-Specific Information. Additionally, you
need the channel number of the device and the partition number within the
device that contains the root file system of the SUSE Linux Enterprise Server
installation.
Select Start Installation or System then Start Rescue System to start the rescue system.
Depending on the installation environment, you now must specify the parameters for
the network adapter and the installation source. The rescue system is loaded and the
following login prompt is shown at the end:
Skipped services in runlevel 3: nfs nfsboot
Rescue login:
dasd_configure 0.0.0150 1 0
0.0.0150 is the channel to which the DASD is connected. The 1 means activate
the disk (a 0 at this place would deactivate the disk). The 0 stands for “no DIAG
mode” for the disk (a 1 here would enable DAIG access to the disk).
2 Now the DASD is online (check with cat /proc/partitions) and can
used for subsequent commands.
zfcp_host_configure 0.0.4000 1
2 After the adapter is activated, a disk can be configured. Do this with the following
command:
3 Now the zFCP disk is online (check with cat /proc/partitions) and can
used for subsequent commands.
If the installed system has not been shut down properly, it may be advisable
to check the file system consistency prior to mounting. This prevents any acci-
dental loss of data. Using this example, issue the command fsck /dev/dasda2
to ensure that the file system is in a consistent state.
By just issuing the command mount, it is possible to check whether the file system
could be mounted correctly.
sh-2.05b# zipl
building bootmap : /boot/zipl/bootmap
adding Kernel Image : /boot/kernel/image located at 0x00010000
adding Ramdisk : /boot/initrd located at 0x00800000
adding Parmline : /boot/zipl/parmfile located at 0x00001000
Bootloader for ECKD type devices with z/OS compatible layout installed.
Syncing disks....
...done
Finally, halt the rescue system with the halt command. The SUSE Linux Enterprise
Server system can now be IPLed as described in Section 3.13.1, “IBM System z: IPLing
the Installed System” (page 34).
Z
z/VM Installation
IPL, 34
ZENworks
zmd, 199
zmd, 199