- •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 18 Troubleshooting Software and Networking |
533 |
Troubleshooting common user problems is a daily task for the Linux system administrator. The applications, software packages, services, and server pro-
cesses that allow the end user to login, print, and send mail offer many different points of failure that the administrator must sort out. This chapter details many of the common user problems that need to be fixed on a daily basis.
Connecting all these services and devices is the network, and any problem with the network will interfere with all applications and services. This chapter also looks at a number of utilities that you can use to troubleshoot networking problems in a quick and efficient manner.
Other frequent problems that the administrator faces include backup and restore errors, and software package version conflicts and dependencies. This chapter helps you to resolve errors with these services and applications.
Common User Problems
6.9 Resolve problems based on user feedback (e.g., rights, unable to login to the system, unable to print, unable to receive or transmit mail)
A wide variety of common user problems happen daily, and they are usually centered on the basic functions that are used each day. Problems with logins, mail, permissions to files and directories, and printing are the most common. Most of these problems can be fixed very quickly with the right knowledge of troubleshooting basics.
Login problems
A user may not be able to login for several reasons:
Username/Password: The user may be simply using the wrong name or password. Ensure that his or her password is being typed properly — especially if the password is case-sensitive. If the user has forgotten his or her password, change it to something else, and have the user change it when he or she logs in again. If the user is still unable to login, you may have to check the networking settings, or check the server login services.
Networking: Make sure that the client can ping the login server, and that the client has full network connectivity, including DNS resolution. You may have more serious networking or server problems if the server can’t be contacted.
Server Login Services: Examine the server logs and processes to ensure that login services are available, running, and accepting connections. Try logging in from another workstation to see if the problem is on the client side. If no one in the organization can log in, then you have a serious server problem.
534 |
Part VI Troubleshooting and Maintaining System Hardware |
Account problems: A number of account restrictions may be enabled, thus causing the login problems. Some administrators configure time or machine restrictions so that a user can only logon at certain times or from a certain host. The account may have expired if an expiration date was enabled. The account may also be locked if the user entered an incorrect password more than the maximum times allowed, thus causing the account to be locked out.
Many user password problems in Linux stem from the fact that they are casesensitive. Make sure that the user’s caps lock key is not depressed.
File and directory permissions
Sometimes a user will try to access a file or directory that they don’t have permission to access. They will be denied access unless they are given rights to the files in question. This is a good security practice — users should never be able to access more than they are authorized for.
Most permission problems involve shared or group directories rather than a user’s home directory. In this case, you must list the contents of the file and directories to which they are seeking access, and then examine the permissions by using the command ls -al to see who is allowed to access those files. In most cases, you only need to add that user to the authorized group to allow them access.
If the user is currently not assigned to a particular group with access to that directory, don’t add the user until you receive permission from his or her management. The user may be trying to access files that he or she has been denied (for good reason).
Printing problems
Printing is a very common function performed by the end user, and is prone to many different types of errors. Sometimes the problems have simple causes that are easily overlooked, such as the printer being turned off or out of paper. Sometimes, however, printer problems can be complex — dealing with printer server and queue issues. The best practice of any troubleshooting operation is to start with the simplest causes before moving on to more complex issues.
Printer hardware
Check some of the simple causes first to ensure that the printing problem is not a server issue. Some of the most obvious problems are easily overlooked:
Printer turned off: Users rarely check to see if the printer is turned on. A person may have unplugged the printer to use the power outlet, or a janitor may have moved the printer and unplugged it the night before. After the printer is turned on, it should start printing from print queue again.
Printer out of paper: A very simple problem, but you can’t know for certain until you actually look at the message on the printer.
Chapter 18 Troubleshooting Software and Networking |
535 |
Printer Offline: Another easily overlooked problem, which you won’t know about until you actually examine the printer to see if it is online or offline.
Printer networking problems: Most printers connect directly to the network via a built-in network port, while some are attached directly to a print server machine or device. If the printer can’t connect to the network, it won’t service requests, which will build up in a queue on a print server. If your printer is set with an IP address, you can ping it to see if it’s alive. You can also try to print a configuration from the printer, and examine the statistics for the built-in network card to check for any activity.
Client printer setup
Examine the settings on the client machine that is having difficulty printing because the settings may be misconfigured.
If users are printing from an X application, try printing from a different application to see if that works. If not, try printing from the command line. Use the lpr command to print a test file to the same printer, and if that doesn’t work, try sending it to a different printer. This way, you will know if the problem is only affecting the ability to print to one particular printer, or all printing functions.
Check for other problems, such as lack of disk space, system resources, and proper network connectivity.
Make sure that clients have the proper print driver for the printer they are using. For example, if users are printing a Postscript file, they should be using a Postscript driver of their printer.
Users often think that they are printing to a specific printer, when they are actually using a different printer somewhere else in the organization.
Print server problems
If you can’t find any problems with the client computer printing setup, and if all files are being properly spooled to the print queue, your next step is to check the print server to see what is happening with the queue.
Use the lpq command to obtain information about the jobs in your print queue for a specific printer:
lpq -P[printername]
If you find that a job is stuck or perhaps corrupted and holding up the queue, you can remove it by using the lprm command:
lprm -P[printername] [job id]
536 |
Part VI Troubleshooting and Maintaining System Hardware |
The line printer daemon may not be functioning, and is not processing requests for printing. Ensure that the lpd daemon is running by using the following command:
ps -ef | grep lpd
If the service is not running, or is running but not responding to requests, you should stop and start the service as required.
Know how to properly troubleshoot a printing problem, especially by using the available command line tools.
Mail problems
A common user complaint is the inability to send or receive mail. When troubleshooting mail problems, it is generally best to start from the client end and then check connectivity up to the mail server. Most likely, you have a problem with the client, whether it’s misconfiguration or a networking problem. If no one in your organization can send or receive mail, then you know that something is wrong with the central mail services on your mail server.
When examining the client for mail problems, check the following general items before moving on to the possibility of a server problem:
Username/Password: Is the user using their proper username and password to login to mail?
E-mail addressing: Is the user typing an invalid or misspelled e-mail address? Generally, the server will send back a message stating that the e-mail was undeliverable if this is the case, but other problems may prevent this message from arriving.
Configuration: Are the incoming and outgoing mail servers set to the correct servers? Is the client using the proper protocol on the right port, such as pop3 (port 110) and imap (port 143)? The outgoing server should be using the smtp (port 25) protocol.
Networking: Is the client having any networking problems, such as slow or no network activity? Try to ping the mail server to make sure that you have connectivity. Is DNS resolving names properly? You can test DNS by using the IP address of a mail server instead of using its full domain name.
If everything on the client side seems in order, you must then move up to the server level to ensure that the mail processes are running properly. If other users are having the same problem, then you probably have a server problem. For more information of server mail problems, see the “Application Failures” section in this chapter.