
- •About the Author
- •Credits
- •How This Book Is Organized
- •Part I: Linux Basics
- •Part II: Installation
- •Part III: Configuration
- •Part IV: Administration
- •Part V: Maintaining the Linux System
- •How Each Chapter Is Structured
- •How to Use This Book
- •Conventions Used in This Book
- •What is Linux?
- •The origin of UNIX
- •Who started Linux?
- •Understanding Open Source
- •Understanding Closed Source
- •Understanding Artistic License
- •Is Freeware really free?
- •Is Shareware never free?
- •A comparison and contrast of licensing methods
- •The Growth of Linux
- •Linux on a Personal Computer
- •Graphical installation
- •Hardware detection
- •Graphical user interface
- •Linux limitations on the PC
- •Linux succeeds on the PC
- •Linux on workstations
- •Linux on servers
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux Kernel
- •Kernel versions
- •Kernel availability
- •Linux Distributions
- •Beehive
- •BlueCat
- •Caldera OpenLinux
- •Debian
- •Corel
- •DragonLinux
- •Elfstone
- •Gentoo
- •Hard Hat Linux
- •KRUD
- •LinuxPPC
- •Mandrake
- •Phat Linux
- •Slackware
- •StormLinux
- •SuSE
- •TurboLinux
- •Yellow Dog Linux
- •Mini and Specialty Distributions
- •Astaro
- •KYZO
- •FlightLinux
- •NetMAX
- •Packages and Packaging Solutions
- •Red Hat Package Manager
- •Debian Package Management System
- •Tarball
- •Linux Resources
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Linux In the Real World
- •Word Processing
- •Spreadsheets and databases
- •Web browsing
- •File transfer
- •More, more, and more applications
- •The Server and DNS
- •A Linux Web server
- •Linux e-mail server
- •File servers
- •Proxy, news, and search servers
- •FTP servers
- •Firewalls
- •Determining Linux Roles and Services
- •Comparing Linux with other operating systems
- •Hardware compatibility
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Assessment Questions
- •Scenarios
- •Installing Linux
- •Final Preparations for Installation
- •Verification
- •Package selection
- •Final hardware verification
- •Pre-installation partitioning planning
- •Installing Linux
- •Text or GUI installation
- •Basic setup of Linux
- •Selecting the machine type
- •Partitioning the hard disk drive
- •Installing a boot manager
- •Creating the Boot Diskette
- •Networking
- •Additional installation information
- •Accounts and passwords
- •Additional packages to install
- •GUI installation
- •Obtaining video card information
- •Configuring the X windows system
- •Selecting the windows manager or desktop environment
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Answers to Assessment Questions
- •Scenarios
- •Alternative to the GUI Installation
- •Command Line installation
- •Install the Linux system
- •Network installations of Linux
- •Review of a Linux Installation
- •Installation media
- •Initial selections
- •Installation type or class
- •Disk partitioning and formatting
- •Installing LILO
- •Network configuration
- •User accounts
- •Authentication methods
- •Package selection and installation
- •A Dual-Boot Installation of Linux
- •Linux with Microsoft Windows
- •Linux with Microsoft Windows NT and 2000
- •Linux and Solaris
- •Linux and other operating systems
- •Installing Additional Software with gzip and tar
- •Installing Additional Software with RPM
- •Removing software with RPM
- •Upgrading software with RPM
- •Query the RPM software
- •Verify the RPM software
- •Verify the package files
- •Upgrading the Kernel
- •Upgrading a Linux Kernel
- •System Log Files
- •The Final Test of the Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What is the X Window System?
- •The X Window System
- •X Client and Server communications
- •X Window Manager
- •Configuring X Window Systems
- •Custom X Window System Programs
- •Manual Configuration of the X Window System
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic Network Services
- •TCP/IP Protocol Suite
- •Connection protocols needed
- •Other network protocols
- •Configuring Basic Network Services
- •Host name
- •IP addressing
- •DHCP
- •Netmask
- •Hardware resources
- •Routing and gateways
- •PPP, SLIP and PLIP connections
- •Server Tasks with
- •IP aliases for virtual hosts
- •Apache Web Server
- •Samba File Server
- •Home directories
- •Disk shares
- •Configuring Client Services
- •SMB/CIFS
- •NIS client configuration
- •NFS client configuration
- •Configuring Internet Services
- •Web browser
- •POP and SMTP
- •TFTP
- •SNMP
- •Remote Access
- •Rlogin
- •Telnet
- •OpenSSH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Adding Hardware
- •Memory
- •Swap
- •Adding a hard drive
- •Video and monitor
- •Printers
- •Configuration files
- •Setting environment variables
- •BASH
- •Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Basic User and Group Administration
- •What are users and groups?
- •Creating users
- •Change user information
- •Deleting users
- •Creating groups
- •Getting Around Linux
- •Navigating Linux
- •Common file and directory commands
- •Setting File and Directory Permissions
- •Mounting and Managing File Systems
- •Mount
- •Umount
- •Mounted file systems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Multi-User Environment
- •The creation of Virtual Consoles
- •The Linux Terminal Server Project
- •Configurations for remote systems
- •Monitoring remote connections
- •Common Shell Commands
- •Basic shell scripts
- •Caution using root access
- •Navigating the GUI interface
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Runlevels
- •init
- •Shutting down Linux
- •Managing Linux Services
- •Configuring Linux Printing
- •lpd daemon
- •/etc/printcap
- •Printing management
- •Using the vi Editor
- •vi operation modes
- •Editing text files
- •Using the
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disk and File System Management
- •Repairing Partitions
- •System Automation and Scheduling
- •cron
- •Core Dumps
- •Analyzing core dumps
- •GNU Debugger
- •Managing Networking Interfaces
- •Installing System Packages and Patches
- •Compressed archive
- •Debian Package Installer
- •Slackware Package Installation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Processes
- •Core services versus non-critical services
- •Process administration
- •Process control
- •Monitoring Log Files
- •Maintaining Documentation
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Linux Security
- •Securing the Environment
- •Location
- •Environment
- •System Security
- •System/user files
- •Permissions
- •Log auditing
- •Backups
- •Linux Security Best Practices
- •Network security
- •Firewall
- •System security
- •Securing a Web server
- •Securing an FTP server
- •FTP program version
- •FTP configuration files
- •Process security
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Disaster Recovery Planning
- •Types of data
- •Frequency and Scheduling
- •Storage and media types
- •Recovering data
- •Offsite storage
- •Linux Backup Tools and Commands
- •Third party tools
- •Tape devices
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Identifying the Problem
- •Methodology and Best Practices
- •Troubleshooting Resources
- •Documentation resources
- •Internet resources
- •System Log Files
- •Tools for Log Files
- •Output to another file
- •Locating files
- •Process Configuration and Management
- •Stopping, Starting, and Restarting Processes
- •Configuration Files
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Examining the Startup Process
- •Boot process steps
- •Analyzing Boot Process Errors
- •Common Boot Problems
- •Using System Status Tools
- •File System Check
- •System Resource Commands
- •Using the System Boot Disk
- •Types of boot disks
- •Creating a boot disk
- •Creating a rescue/utility disk
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Common User Problems
- •Login problems
- •File and directory permissions
- •Printing problems
- •Mail problems
- •Software Package Problems
- •Package dependencies
- •Software and version conflicts
- •Backup and Restore Errors
- •Backup hardware
- •Backup software
- •File restore errors
- •Application Failures
- •Log files
- •Process and daemon errors
- •Web server errors
- •Telnet
- •Mail services
- •Basic Networking Troubleshooting
- •Networking connectivity
- •Network hardware problems
- •Summary
- •Assessment Questions
- •Scenarios
- •Lab Exercises
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •Mainboard Components
- •BIOS
- •System memory
- •System Resources
- •I/O addresses
- •Direct memory access
- •Laptop Considerations
- •PCMCIA
- •Linux Peripheral Configuration
- •Installing and Configuring SCSI Devices
- •SCSI definitions
- •SCSI technologies
- •SCSI cabling and termination
- •SCSI device configuration
- •Linux SCSI devices
- •ATA/IDE Devices
- •IDE drive configuration
- •Linux ATA/IDE Drive configuration
- •Linux Support for Other Devices
- •IEEE 1394 (Firewire)
- •Summary
- •Assessment Questions
- •Scenarios
- •Answers to Chapter Questions
- •Chapter Pre-test
- •Assessment Questions
- •Scenarios
- •What’s on the CD-ROM
- •System Requirements
- •Using the CD with Microsoft Windows
- •Using the CD with Linux
- •Microsoft Windows applications
- •Linux applications
- •Troubleshooting
- •Sample Exam
- •Exam Questions
- •Exam Answers
- •Taking a CompTIA Exam
- •How to register for an exam
- •What to expect at the testing center
- •Your exam results
- •If you don’t receive a passing score
- •About the Linux + Exam
- •Preparing for the Linux+ Exam
- •For More Information
- •Preamble
- •No Warranty
- •Glossary
- •Index

Chapter 7 Configuring Networking 233
Features
The Force user option forces all connections that are made to the service to be made with this user name. This still requires the user to connect with a valid user name and password, but after they connect, they will be seen by the system as the forced user. Force group name does the same thing with a group account. The Don’t Descend feature is used to show directories that are not empty as empty. Take the /proc directory for example; if you don’t want users to nose around this directory, you can list it as Don’t Descend and it will appear empty to clients. The Guest account option provides the default account used for public access areas. The Max connections option is used to limit the maximum number of connections to the system at one time. If this number is zero then an unlimited number of connections are possible.
At this point, you have completed a basic configuration of Samba and you have acquired a basic knowledge of the SMB/CIFS system. Although network administrators usually configure and maintain Samba servers, the ability to work with Samba is a valuable skill.
Configuring Client Services
3.5 Configure basic client services (e.g., X client, SMB/CIFS, NIS, NFS) 3.15 Configure access rights (e.g., rlogin NIS, FTP, TFTP, SSH, Telnet)
When configuring a client, you need to configure the services that the client may use. This includes the X client, SMB/CIFS, NIS, and NFS. These services are selected during installation, but you may need to perform some of the configurations after installation.
The X client was configured in Chapters 4, 5, and 6. For more information, use the X Configuration sections in those chapters.
SMB/CIFS
The SMB/CIFS client is part of the Samba suite and can be selected during installation. This package can also be added to a system by using one of the methods discussed in Chapter 5. The SMB/CIFS client can access an SMB/CIFS/CIFS server. It offers an interface similar to that of the ftp program. The SMB/CIFS client command launches the client Table 7-2 lists the switches needed for connection. The switches are listed in order of use from closest to the command to furthest from the command; the table also includes a description of the switch for the SMB/CIFS client software.

234 Part III Configuration
Table 7-2
SMB/CIFS Client Switches
Switch |
Description |
Example |
|
|
|
servicename |
The service that you want to use on the |
//server/service |
|
server in the format of a NetBIOS name. |
|
|
|
|
password |
The password required to access the |
users password |
|
specified service on the specified server. |
|
|
|
|
-b |
This option changes the transmit/send |
-b 1500 |
|
buffer size when getting or putting a file |
|
|
from/to the server. The default is |
|
|
65520 bytes. |
|
|
|
|
-d |
The higher this value, the more detail |
-d 1 |
|
will be logged to the log files about the |
|
|
activities of the client, ranging from 0-10 |
|
|
and A. |
|
|
|
|
-D |
Change to initial directory before starting. |
-D /tmp |
|
|
|
-U |
Sets the SMB/CIFS username or |
-U user[%password] |
|
username, often includes [%pass] to |
|
|
include the password. |
|
|
|
|
-W |
Overrides the default workgroup specified |
-W usergroup |
|
in the workgroup parameter of the |
|
|
SMB/CIFS.conf file for this connection. |
|
|
|
|
-M |
This option sends messages to another |
cat message.txt | SMB/CIFS |
|
computer by using the “WinPopup” |
client -M user |
|
protocol. |
|
|
|
|
-A |
This option allows you to specify a file |
-A filename |
|
from which to read the username and |
|
|
password used in the connection. |
|
|
|
|
-N |
Suppresses the normal prompt |
-N |
|
for password. |
|
|
|
|
-l |
Specifies a base file name into which |
-l logfilename |
|
operational data from the running |
|
|
client will be logged. |
|
|
|
|
-L |
Lists services available on a server. |
-L host |
|
|
|
-I |
IP address is the address of the server to |
-I 10.0.0.250 |
|
connect to. Often used with –L. |
|
|
|
|

Chapter 7 Configuring Networking 235
Switch |
Description |
Example |
|
|
|
-E |
Causes the client to write messages to |
-E |
|
the standard error stream (stderr) rather |
|
|
than to the standard output stream. |
|
|
|
|
-c |
A command string separated by |
|
semicolons to be executed instead of |
|
prompting from stdin. -N is implied by -c. |
-c command string such as -c ‘print -’
-i |
This specifies a NetBIOS scope that |
-i scope |
|
SMB/CIFS client will use to communicate |
|
|
when generating NetBIOS names. |
|
|
|
|
-O |
TCP socket options to set on the client |
-O socket options |
|
socket. The SMB/CIFS.conf MAN page |
|
|
lists the valid options. |
|
|
|
|
-p |
This number is the TCP port number that |
-p port |
|
will be used when making connections to |
|
|
the server instead of the standard TCP port. |
|
|
|
|
-R |
Name resolution order with the options |
-R lmhosts |
|
of “lmhosts,” “host,” “wins,” and “bcast”. |
|
|
|
|
-s |
Provides the location of the |
-s SMB/CIFS .conf |
|
SMB/CIFS.conf file. |
|
|
|
|
-T |
The SMB/CIFS client may be used to |
//server/share “” |
|
create tar compatible backups of all the |
-N -Tc backup.tar * |
|
files on an SMB/CIFS /CIFS share. |
|
|
|
|
Know the switches but also the format for all commands used in Linux.
These switches from Table 7-3 are used to create the connection. After the connection is complete, the user is presented with a new prompt that looks like this:
SMB/CIFS :\>
This prompt indicates that the client is ready and waiting to carry out a user command. The user commands are shown in Table 7-3.

236 Part III Configuration
Table 7-3
SMB/CIFS Client Commands
Command |
Description |
Example |
|
|
|
? |
Used to provide information about |
? [command] |
|
a command. |
|
|
|
|
! |
The ! command will execute a shell |
! [shell command] |
|
locally and run the specified shell |
|
|
command. |
|
|
|
|
cd |
Used to change directories, or if no |
cd [directory name] |
|
directory is requested, it will list the |
|
|
current directory. |
|
|
|
|
del |
The client will request that the server |
del <mask> |
|
attempt to delete all files matching |
|
|
“mask” in the current directory. |
|
|
|
|
dir |
A list of the files matching “mask” in |
dir <mask> |
|
the current directory will be retrieved |
|
|
and displayed. |
|
|
|
|
exit |
Exit the program SMB/CIFS client; this |
exit |
|
will terminate all connections. |
|
|
|
|
get |
Get a remote file <name> and copy it |
get <remote file name> |
|
to the local file [name]. This is a binary |
[local file name] |
|
transfer. |
|
|
|
|
help |
Used to provide information about a |
help [command] |
|
command. |
|
|
|
|
lcd |
The current working directory on the |
lcd [directory name] |
|
local machine will be changed to the |
|
|
directory specified. |
|
|
|
|
lowercase |
When lowercasing is toggled ON, local |
lowercase |
|
filenames are converted to lowercase |
|
|
when using the get and mget commands. |
|
|
|
|
ls |
A list of the files matching “mask” in |
ls <mask> |
|
the current directory will be retrieved |
|
|
and displayed. |
|
|
|
|
mask |
This command allows the user to set up |
mask <mask> |
|
a mask, which will be used during |
|
|
recursive operation of the mget and |
|
|
mput commands. |
|
|
|
|
md |
Used to create a new directory with |
md <directory name> |
|
a specified name. |
|
|
|
|

Chapter 7 Configuring Networking 237
Command |
Description |
Example |
|
|
|
mget |
Copy all files matching mask from the |
mget <mask> |
|
server to the machine running the client. |
|
|
|
|
mkdir |
Used to create a new directory with a |
mkdir <directory name> |
|
specified name. |
|
|
|
|
mput |
Copy all files matching mask from the |
mput <mask> |
|
machine running the client to the server. |
|
|
|
|
Print the specified file from the client |
print <file name> |
|
|
through a printable service on the server. |
|
|
|
|
printmode |
Set the print mode to suit either binary |
printmode <graphics |
|
data or text. |
or text> |
|
|
|
prompt |
Toggle prompting for filenames during |
prompt |
|
operation of the mget and mput |
|
|
commands. |
|
|
|
|
put |
Copy the file called “local file name” |
put <local file name> |
|
from the client to the server with |
[remote file name] |
|
optional “remote file name.” |
|
|
|
|
queue |
Displays the print queue, showing the |
queue |
|
job ID, name, size, and current status. |
|
|
|
|
quit |
Exit the program SMB/CIFS client; this |
quit |
|
will terminate all connections. |
|
|
|
|
rd |
Remove the specified directory. |
rd <directory name> |
|
|
|
recurse |
Toggle directory recursion for the |
recurse |
|
commands mget and mput. |
|
|
|
|
rm |
Remove all files in the current directory |
rm <mask> |
|
with the match the <mask>. |
|
|
|
|
rmdir |
Remove the specified directory. |
rmdir <directory name> |
|
|
|
tar |
Perform the tar operation. |
tar <c|x>[IXbgNa] |
|
|
|
blocksize |
Must be followed by a valid |
blocksize <blocksize> |
|
(greater than zero) blocksize. |
|
|
Causes tar file to be written out |
|
|
in blocksize*TBLOCK (usually 512 |
|
|
byte) blocks. |
|
|
|
|
tarmode |
Changes tar’s behavior with regard |
tarmode |
|
to archive bits. |
<full|inc|reset|noreset> |
|
|
|
setmode |
A version of the DOS attrib command |
setmode <filename> |
|
to set file permissions. |
<perm=[+|\-]rsha> |
|
|
|