Setting Up a Cable Modem Connection

To set up cable modem access, your cable TV provider must offer high-speed Internet access. If the service is available, you can call to sign up. The cable companies often have promotional offers such as no installation fee or a reduced rate for three months. Look for these offers. If you are lucky, they may have a promotion going on just when you want to sign up. The installation is typically done by a technician who splits your incoming cable into two one side goes to the TV and the other to...

Using a Graphical FTP Client

GNOME comes with gFTP, a graphical FTP client. To start gFTP, select from the GNOME desktop Applications O Internet O gFTP. This starts the gFTP application to run and display its main window. The gFTP window (see Figure 17-1) has a menu bar with menus for performing various tasks. Just below the menu bar is a toolbar with a number of buttons and text fields. Here, you can type the name of the remote host, the user name, and the password needed to log in to the remote host. After you supply the...

Trying Out a Sample Doc Book

The best way to understand DocBook is to simply try out a sample file. You can see how the same DocBook file can be used to generate different output formats. Use a text editor and prepare the file sample.xml with the following lines in it < xml version 1.0 > < DOCTYPE article PUBLIC - OASIS DTD DocBook XML V4.2 EN < title> Sample DocBook< title> < para> This is a sample DocBook article that illustrates some simple DocBook XML tags. < para> < sect1> < title>...

Deciding How to Connect to the Internet

Nowadays, you have the following popular options for connecting a small office or home office to the Internet (of course, huge corporations and governments have many other ways to connect to the Internet) Digital subscriber line (DSL) Your local telephone company as well as other telecommunications companies offer DSL a high-speed data transmission service over a regular phone line. You can use DSL to connect your Linux system to the Internet. In this case, you must connect a special DSL modem...

Setting Up a DSL Connection

To get DSL for your home or business, you have to contact a DSL provider. In addition to your phone company, there are many other DSL providers. No matter who provides the DSL service, some work has to be done at your central office the place where your phone lines connect to the rest of the phone network. The work involves connecting your phone line to equipment that can work with the DSL modem at your home or office. The central office equipment and the DSL modem at your location can then do...

Using the Nautilus Shell

Now that you know the basics of the Linux file system, you can explore it. You can access the files and directories in two ways By using a graphical file manager such as the Nautilus shell in GNOME By typing appropriate Linux commands in a terminal window or a text console The Nautilus graphical shell is intuitive to use it is similar to Windows' Active Desktop and you can perform many tasks such as navigating the file system and performing systemmanagement tasks with Nautilus. You may want to...

Perimeter Network with a Bastion Host

An Internet firewall is often more complicated than a single dual-homed host that connects to both the Internet and the protected internal network. In particular, if you provide a number of Internet services, you may need more than one system to host them. Imagine that you have two systems one to run the Web and FTP servers and the other to provide mail (SMTP) and Domain Name Service (DNS) lookups. In this case, you place these two systems on a network that sits between the Internet and the...

Fedora

Choose where you would like Fedora Core to be installed. If you do not know how to partition your system or if you need help with using the manual partitioning tools, refer to the product documentation. If you used automatic partitioning, you can either accept the current partition settings (click Next), or modify the setup using the manual partitioning tool. If you are manually partitioning your system, you can see your current hard drive(s) and p.jyejdevjhda 12861b MB) Model FUJITSU HHRjOMATj...

Updating Fedora with the Update Agent

Fedora Core comes with Up2date a graphical Update Agent that can download any new RPM files your system requires and install those files for you. Up2date is also known as the Red Hat Update Agent because Red Hat developed it for its Red Hat Network through which Red Hat provides services to its commercial customers. To update Fedora Core software packages using Up2date, follow these steps 1. Select Applications O System Tools O Red Hat Network. You can also type up2date in a terminal window....

K

See KDE K operator, sendmail agent, 467 Kabir, Mohammed J. (Apache Server 2 Bible), 426 kbdrequest command, 568 KDE (K Desktop Environment) calculator function, 294 Control Center, 280 description of, 47 desktop settings, 278-279 display manager configuration options, 267-271 General section, 267 graphical login screen, 264-265 kdmrc file, 265-266 Shutdown section, 268 X-*-Core section, 268-269 Xdmcp section, 268 X-*-Greeter section, 269-271 features, 277 Logout button,...

Understanding the Monitor Section

The Monitor section lists the technical specifications of the monitor the horizontal synchronization (or horizontal sync) frequency and vertical refresh rate. These two critical parameters of your monitor have the following meanings Horizontal synchronization frequency The number of times per second that the monitor can display a horizontal raster line, in kilohertz (kHz), referred to as HorizSync in the Monitor section. Vertical refresh rate or synchronization rate How many times a second the...

Using Aliases

While configuring the Linux kernel, I found myself changing the directory to quite a few times. After typing that directory name twice, I immediately set up a shortcut using Bash's alias feature alias gosrc 'cd I intentionally did not use any underscore characters or uppercase letters in gosrc because I wanted the alias to be quick and easy to type (and it had to mean something only to me). Now that I've defined the alias, I can go to that directory by typing the following at the Bash prompt As...

Linux Standard Base

Linux has become important enough that there is now a standard for Linux called the Linux Standard Base, or LSB for short. LSB is a set of binary standards that should help reduce variations among the Linux distributions and promote portability of applications. The idea behind LSB is to provide application binary interface (ABI) so that software applications can run on any Linux (or other UNIX) systems that conform to the LSB standard. The LSB specification references the POSIX standards as...

Sound Cards or Chipsets

ALi M1535, M1535D, M1535+, M1535D+ snd-ali 5451 AMD InterWave Advanced Gravis UltraSound PnP snd-interwave Analog Devices AD1816 Aopen FX-3D Plus snd-ad1816a Analog Devices AD11847 848 Aztech Sound Galaxy snd-ad1848 AudioTrak Prodigy 7.1 MidiMan Delta Revolution 7.1 snd-ice1724 Mad Dog Multimedia Entertainer 71 Terratec Aureon 5.1 Sky Space Aureal AU8820 Aztech PCI 338-A3D, 368-DSP snd-au8820 Turtle Beach Montego A3D Aureal AU8830 Diamond Multimedia MonsterSound mx300 snd-au8830 Turtle Beach...

Using sysctl to View and Set Kernel Parameters

As the entry for proc sys in Table 20-11 explains, you can change kernel parameters by writing to files in the proc sys directory. This is one way to tune the system's performance. Linux also comes with the sbin sysctl program that enables you to read and write kernel parameters without having to overwrite files manually in the proc sys directory. In Chapter 13, you encounter an instruction that asks you to log in as root and enable IP forwarding in the kernel by typing the following command...

Testing a Java Servlet with Sun Java System Application Server

To test the OrderBooks servlet, you need a Web server capable of running Java servlets. In the steps that follow, I test the servlet by using the Apache Tomcat 5 server that comes with Fedora. I log in as root and follow these steps to compile and test the OrderBooks servlet shown in Listing 26-4 1. Create the directories in the Tomcat 5 server's installation directory where the new Web application will be installed. Here are the commands I typed to install the new application in the book-order...

Using execshield

Buffer overflow is a major cause of many Linux security holes. When buffer overflow occurs, a cracker can overwrite data-storage areas of memory with instructions designed to execute nasty commands. The latest Linux kernel comes with a kernel setting exec-shield that enables you to stop the kernel from executing instructions from any data area. This protects against the common buffer overflow type of vulnerabilities by making many parts of a program's memory (including the stack where temporary...

Table 214 Common File System Configuration Options

Enables Linux to read from the ADFS the Acorn Disc Filing System the standard file system of the RiscOS operating system that runs on Acorn's ARM-based Risc PC systems and the Acorn Archimedes systems. Answer y if you want Linux to read from ADFS partitions on hard drives and from ADFS floppy disks. Enables support for the Amiga Fast File System (AFFS), the file system used by Amiga systems since AmigaOS version 13 (34.20). Answer y if you need to read from and write to an Amiga FFS partition...

Binary Utilities

Just as the text utilities are meant for working with text files, the GNU binary utilities are meant for performing various tasks on binary files. Some of these utilities, such as ar, as, and ld, are used when building and managing object files that are generated when source files are compiled. A number of other binary utilities enable you to examine the contents of binary files. For example, the strings command prints all strings of printable characters in a file. Here is what the strings...

Exploring Internet Services and Port Numbers

The TCP IP protocol suite has become the lingua franca of the Internet because many standard services are available on all systems that support TCP IP. These services make the Internet tick by enabling the transfer of mail, news, and Web pages. These services go by well-known names such as the following DHCP (Dynamic Host Configuration Protocol) is for dynamically configuring TCP IP network parameters on a computer. DHCP is primarily used to assign dynamic IP addresses and other networking...

Enabling Support for Loadable Modules

This group of options asks you about support for loadable modules. A loadable module is a block of code that the Linux kernel can load and execute as if it were a part of the operating system. Enable loadable module support (MODULES) Y n Module unloading (MODULE_UNLOAD) Y n Forced module unloading (MODULE_FORCE_UNLOAD) N y Module versioning support (EXPERIMENTAL) (MODVERSIONS) Y n Source checksum for all modules (MODULE_SRCVERSION_ALL) Y n Module signature verification (EXPERIMENTAL)...

Figure 33 You Can Configure the Monitor and the Video Card from the Advanced

In this example, the monitor is shown as Dell M780 and the video card type is an Intel 845 chipset. To configure the monitor, click the Configure button in the Monitor section of the tab. This causes a new window to appear, as shown in Figure 3-4. Figure 3-4 Configuring the Monitor in system-config-display. Figure 3-4 Configuring the Monitor in system-config-display. If you know your monitor's make and model, select it from the list. Otherwise, you can select a generic CRT display or a generic...

Understanding How init Starts the Display Manager

A process named init starts the initial set of processes on your Linux system. What init starts depends on the current run level, the contents of the etc inittab file, and the shell scripts located in the etc rc.d directory and its subdirectories. For now, you don't need to understand the details you must know, however, that the graphical login screen starts at run level 5. cross Chapter 20 describes in detail the init process, the etc inittab file, and the Linux ref boot process. The last line...

S

S character, RPM verification reports, 623 s character sequence, 205 s command, 246 S operator, sendmail agent, 467 S registers, modems, 989-990 safe command, 506 SAINT (Security Administrator's Integrated Network Tool), 716 Samba software package components, 552 configuring, 553-555 installing, 553 resources, 558 smbclient commands, 556-557, 578 SARA (Security Auditor's Research Assistant), 716-717 saslauthd command, 577 SATA (Serial ATA), 8, 938 sbin directory, 199 sbin hdparm program, 601...

Cable and Termination Problems

The SCSI bus needs terminators at both ends to work reliably. A terminator is a set of resistors that indicate the end of the SCSI bus. One end is the controller card itself, which typically has the terminator on it. Often, a SCSI device has two SCSI connectors, so that you can daisy-chain several external SCSI devices. You are supposed to place a terminator on the last connector on the chain. insider Some SCSI controllers such as Adaptec AHA 154xC, 154xCF, and 274x (x is any insight digit) are...

Configuring the Resolver

You do not need a name server running on your system to use the DNS clients dig and host. You can use them to query one of your domain's name servers. Typically, your ISP provides you with this information. You have to list the IP addresses of these name servers in the etc resolv.conf file the resolver library reads this file to determine how to resolve host names. The format of this file is domain your-domain.com search your-domain.com nameserver A.B.C.D nameserver X.Y.Z.W where A.B.C.D and...

Configuring the Kernel

The first phase in rebuilding a kernel is configuring it. To configure the kernel, log in as root. Then change the kernel source directory by using the cd command as follows To configure the kernel, you have to indicate which features and device drivers you want to include in your Linux system. In essence, you build a copy of Linux with the mix-and-match features you want. Linux provides several ways for you to configure the kernel Type make menuconfig to enter the kernel-configuration...

Configuring XOrg X11 Using systemconfigdisplay

Fedora Core includes a GUI utility called system-config-display, written in the Python programming language, that enables you to configure X. The system-config-display utility provides a convenient way to configure X through a GUI that itself uses X. To run it, type system-config-display at a shell prompt or, if you are already on the GNOME desktop, select Desktop O System Settings O Display from GNOME's top panel. The utility probes the monitor and video card. Then it starts X (if X is not...

Preparing Documentation with Doc Book

The tradition of preparing formatted documentation using markup languages lives on. For example, the documentation for many open source software packages come in DocBook format. The remainder of this chapter briefly introduces you to DocBook and points you to sources where you can learn more about preparing documentation in DocBook. DocBook is a vocabulary a set of tags, kind of like HTML tags for writing structured documents such as books and articles (anything that has chapters, sections,...

Figure 267 The View Cal Application Displaying a Monthly Calendar

Here is how you can interact with the ViewCal application's user interface Clicking on the drop-down menu (implemented using a Choice component) displays a list of months from which you can select a specific month. That month's calendar is then displayed. You can type in a year (such as 2006) in the text field next to the drop-down menu for selecting a month. After you press Enter, ViewCal updates the monthly calendar to reflect the change in year. Clicking the Prev and Next buttons changes the...

Formatting a DOS Floppy

Suppose that you run Linux on your home PC and MS-DOS is no longer on your system, but you need to copy some files onto an MS-DOS floppy disk and take the disk to your office. If you already have a formatted MS-DOS floppy, you can simply mount that floppy and copy the file to the floppy by using the Linux cp command. But what if you don't have a formatted DOS floppy The mtools package again comes to the rescue. The mtools package provides the mformat utility, which can format a floppy disk for...

Learning the mtools Commands

The mtools package is a collection of utilities. So far, I have been using mdir the mtools counterpart of the DIR command in DOS. The other mtools commands are fairly easy to use. insider If you know the MS-DOS commands, using the mtools commands is very easy. Type insight the DOS command in lowercase letters, and remember to add m in front of each command. Because the Linux commands and filenames are case sensitive, you must use all lowercase letters as you type mtools commands. Table 12-3...

Ethernet Autoprobing

At boot time, a kernel with Ethernet support or an Ethernet driver module (being loaded by modprobe) attempts to probe and detect the Ethernet card. The probing involves reading from and writing to specific I O port addresses. Although you specify a single I O port address for a device, most devices use a block of I O addresses for their operation. The I O address you specify is the base address the rest of the I O addresses are consecutive I O ports, starting at the base address. Depending on...

Commands and Options for SELinux

Many common Linux commands include options for viewing SELinux access control information. For example, to provide the fine-grained access control, SELinux requires that each file include a security context think of it as the security attributes of the file or directory. Adding contexts to the files is referred to as labeling the file system. The file system should already be labeled when you install Fedora Linux and enable SELinux. You can easily check the context of a file, a user, or a...

Understanding the Linux File System

Like any other operating system, Linux organizes information in files and directories. The files, in turn, are contained in directories. A directory can contain other directories, giving rise to a hierarchical structure. This hierarchical organization of files is called the file system. The Linux file system provides a unified model of all storage in the system. The file system has a single root directory, indicated by a forward slash ( ). Then there is a hierarchy of files and directories....

Improved Device Handling

Linux 2.6 has a number of new features for handling devices especially hot plug devices such as the ones that connect to USB and Firewire interfaces common in today's PCs. First, the kernel uses a new virtual file system called sysfs that is meant to hold information about the devices on the system. The sysfs file system mounts on sys and it presents a hierarchical view of all the devices organized by device type, bus, and so on. Through sysfs, the 2.6 kernel makes available to other...

Dynamically Loading a Shared Library

ELF makes it simple to load a shared library in your program and to use the functions within the shared library. The header file < dlfcn.h> declares the functions for loading and using a shared library. Four functions are declared in the file dlfcn.h for dynamic loading void *dlopen(const char *filename, int flag) Loads the shared library specified by filename and returns a handle for the library. The flag can be RTD_LAZY (resolve undefined symbols as the library's code is executed) or...

Configuring Apache for Server Side Includes

Server-side include (SSI) refers to a feature of the Apache Web server whereby it can include a file or the value of an environment variable in an HTML document. The feature is like the include files in many programming languages such as C and C++. Just as a preprocessor processes the include files in a programming language, the Web browser reads the HTML file and parses the server-side includes before returning the document to the Web browser. Server-side includes provide a convenient way to...

Table 2012 Some Kernel Parameters in the procsys Directory

Fs.file-max Maximum number of file handles the Linux kernel can allocate. fs.file-nr Three values representing the number of allocated file handles, the number of used file handles, and the maximum number of file handles. kernel.acct Three values specifying high, low, and frequency that control the logging of process accounting information. When free space on the file system goes below the low (percent), accounting is suspended it resumes when free space goes above high (percent), and frequency...

Learning the KDE Display Manager

If you install only the KDE desktop or define the DISPLAYMANAGER variable in the etc sysconfig desktop file as KDE, the kdm program starts the X server for the local display and displays the graphical login window through which you log in to the system. Figure 9-3 shows the graphical login screen that you see when you run the kdm display manager. (To change to the KDE display manager, just add the line DISPLAY-MANAGER KDE to the etc sysconfig desktop file.) Figure 9-3 Graphical Login Screen...

Exporting a File System with NFS

Start with the server system that exports makes available to the client systems the contents of a directory. On the server, you must run the NFS service and also designate one or more file systems that are to be exported. To export a file system, you have to add an appropriate entry to the etc exports file. For example, suppose that you want to export the home directory and you want to enable the host named LNBP75 to mount this file system for read and write operations. You can do this by...

Running the xinetd Superserver

The client server model requires that the server be up and running before a client makes a request for service. A simplistic idea would be to run all the servers and have them listen to their respective ports all the time. However, this idea is not practical because each server process would use up system resources in the form of memory and processor time. Besides, you don't really need all the services up and ready at all times. A smart solution to this problem is to run a single server,...

Scheduling Recurring Jobs

Although at is good for running commands at a specific time, it's not useful for running a program automatically at repeated intervals. You have to use crontab to schedule such recurring jobs, also called cron jobs because they are processed by the cron daemon (crond). You need to do this, for example, if you want to back up your files to tape at midnight every day. Two files control who can schedule cron jobs using crontab etc cron.allow contains the names of the users who may submit jobs...

Serial Line Internet Protocol

SLIP originated as a simple protocol for framing an IP packet an Internet Protocol packet that consists of an IP header (which includes the source and destination IP addresses), followed by data (the data sent from source to destination). In RFC 1055, A Nonstandard for Transmission of IP Datagrams over Serial Lines SLIP, (June 1988), J. L. Romkey describes SLIP. As the title of RFC 1055 suggests, SLIP is not an official Internet standard it's a de facto standard. SLIP defines two special...

Looking up Online Documentation

You should familiarize yourself with an important source of information in Linux. Every so often, you see instructions that ask you to enter a Linux command. Once you've been working with Linux for a while, it's entirely possible that you'll remember a command's name but forget the exact syntax of what you're supposed to type. For such situations, the Linux online manual pages can come to your rescue. insider To try out the commands described in this section, you have to open a terminal...

Using IO Redirection

Linux commands designed to work together have a common feature they always read from the standard input (usually, the keyboard) and write to the standard output (usually, the screen). Error messages are sent to the standard error (usually, the screen). These three devices often are referred to as stdout, stdin, and stderr. If you want a command to read from a file, you can redirect the standard input to come from that file. Similarly, to save the output of a command in a file, redirect the...

Understanding Pluggable Authentication Modules

A Pluggable Authentication Module (PAM) performs the actual MD5 encryption, described in the Learning the Role of Shadow Passwords section. PAM provides a flexible method for authenticating users on Linux systems. Through settings in configuration files, you can change the authentication method on the fly, without having to actually modify programs, such as login and passwd, which verify a user's identity. Linux uses PAM extensively, and the configuration files are in the etc pam.d directory of...

Configuring Samba

To set up the Windows file-sharing and print-sharing services, you have to provide a configuration file named etc samba smb.conf. The configuration file is a text file that looks like a Microsoft Windows 3.1 INI file. You can prepare the file in any text editor on your Linux system. Like the old Windows INI files, the etc samba smb.conf file consists of sections, with a list of parameters in each section. Each section of the smb.conf file begins with the name of the section in brackets. The...

Using Flow Control Statements

So far, you have seen Perl statements intended to execute in a serial fashion, one after another. Perl also includes statements that enable you to control the flow of execution of the statements. You already have seen the if statement and a while loop. Perl includes a complete set of flow-control statements just like those in C, but with a few extra features. In Perl, all conditional statements take the following form Perl code to execute if conditional is true Notice that you must enclose...

Selecting a Backup Strategy and Media

Your Linux system's hard disk contains everything needed to keep the system running, as well as other files, such as documents and databases you need to keep your business running. You need to back up these files so that you can recover quickly and bring the system back to normal in case the hard disk crashes. Typically, you have to follow a strict regimen of regular backups because you can never tell when the hard disk might fail or the file system might get corrupted. To implement such a...

Downloading and Installing Java 2 SDK

To develop Java applications, you can use Sun's Java 2 Software Development Kit. You can download the latest version of this kit by following the links at the following website Sun has two Java development products Java 2 Standard Edition (J2SE) and Java 2 Enterprise Edition (J2EE). The J2SE Software Development Kit (SDK) also known as Java 2 SDK includes the Java compiler, APIs, and other tools you need to develop Java applications and applets. J2EE is meant for developing Java applications...

Running gdb

The most common way to debug a program is to run gdb by using the following command In the preceding code, progname is the name of the program's executable file. After it runs, gdb displays the following message and prompts you for a command GNU gdb Red Hat Linux (6.3.0.0-1.12rh) Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and or distribute copies of it under certain conditions. Type show copying...

Writing man Pages with groff

Before the days of graphical interfaces, typesetting with the computer meant preparing a text file containing embedded typesetting commands and then processing that marked-up text file with a computer program that generated commands for the output device a printer or some other typesetter. As you know, such markup languages still exist. A prime example is HyperText Markup Language (HTML), which you use to prepare World Wide Web pages. In the late 1970s and early 1980s, I prepared all my...

Drawing Figures with xfig

The xfig program is an interactive drawing program that runs under X and can generate encapsulated PostScript files suitable for inclusion in documents. To use xfig, you need to install three RPM files first transfig and xpdf RPMs and then the xfig RPM. To install xfig, log in as root and follow these steps 1. Mount the DVD-ROM. Insert the DVD-ROM and wait for it to be mounted (or type mount media cdrom to mount the DVD-ROM). Then, type the following command to install the transfig program cd...

Configuring Servers to Start Automatically at Boot Time

Although you can start, stop, and restart servers manually by using the scripts in the etc rc.d init.d directory, you have to set up symbolic links in the scripts for an appropriate run level. For example, to start the DNS server named in run level 5, you need an S script in the run level 5 directory ( etc rc.d rc5.d). Furthermore, that S script should be a symbolic link to the etc rc.d init.d named file. You set up such symbolic links to configure servers to start automatically at boot time....

Raster Scan Display

All video cards operate on the same principle They store an image in video memory (also called video RAM or VRAM for short) and generate the appropriate signals to display the image on the monitor's screen. The monitor is the physical device that contains the display screen where the graphic and text output appears. The display screen is typically a phosphor-coated glass tube on which an electron beam traces the output image. On laptop computers, the display screen is a liquid crystal display...

Newsgroups

To keep up with Linux developments, you need access to the Internet, especially to the newsgroups. You can find discussions on specific Linux-related topics in the newsgroups listed in Table G-1. Table G-1 Linux Newsgroups on the Internet Information about Linux system administration. Important announcements about Linux. (This is a moderated newsgroup, which means you must mail an article to the moderator, who then posts it to the newsgroup.) Questions and answers about Linux. (All the Linux...

Understanding the etcvsftpdvsftpdconf File

To learn what you can have in the etc vsftpd vsftpd.conf file and how these lines affect the vsftpd server's operation, start by looking at the etc vsftpd vsftpd.conf file that's installed by default. The comments in this file tell you what each option does. By default, vsftpd allows almost nothing. Through the options in etc vsftpd vsftpd.conf you can loosen the restrictions so that users can use FTP. It's up to you to decide how loose the settings should be. Note that most of the options are...

Working with Post Script in Ghostscript

Ghostscript is a utility for previewing and printing PostScript documents. Ghostscript enables you to print PostScript documents on many non-PostScript devices. At its heart, Ghostscript is a nearly complete implementation of the PostScript language. Ghostscript includes the interpreter that processes PostScript input and generates output on an output device. A Ghostscript device can be a printer (or display screen), as well as an image-file format, such as BMP or PCX. Ghostscript is...

Using Open Secure Shell for Remote Logins

Linux comes with the Open Secure Shell (OpenSSH) software, a suite of programs that provides a secure replacement for the Berkeley r commands rlogin (remote login), rsh (remote shell), and rcp (remote copy). OpenSSH uses public-key cryptography to authenticate users and to encrypt the communication between two hosts, so users can securely log in from remote systems and copy files securely. In this section, I briefly describe how to use the OpenSSH software in Linux. To learn more about OpenSSH...

Linux Desktop

Let's face it typing cryptic UNIX commands on a terminal is boring. Those of us who know the commands by heart may not realize it, but the installed base of UNIX is not going to increase significantly if we don't make the system easy to use. This is where the X Window System, or X, comes to the rescue. X provides a standard mechanism for displaying device-independent, bitmapped graphics. In other words, an X application can display its graphic output on many different machines that use...

C

CA (certificate authority), 194, 447 cable modem termination system (CMTS), 387 Internet connection comparisons, 381 cable networking, 15 cable problems, SCSI, 953 Ethernet cards, 969 AT modem cable, 983 null modem cables, 984 caching caching name server configuration, DNS, 525-528 cal command, 909-910 calculators calendar display, Swing class, 880, 886-887 card information structure (CIS), 1001 CardBus specification, PC cards, 1001 Carrier Sense Multiple Access Collision Detection (CSMA CD),...

Understanding Environment Variables

The shell and other Linux commands need information to work properly. If you type a command that isn't one of that shell's built-in commands, the shell has to locate an executable file (whose name matches the command you type). The shell needs to know which directories to search for those files. Similarly, a text editor, such as vi, needs to know the type of terminal (even if the terminal happens to be a terminal window in GNOME or KDE). One way to provide this kind of information to a program...

Using Variables in Perl

You don't have to declare Perl variables before using them, as you do in C. You can recognize a variable in a Perl script easily, because each variable name begins with a special character an at symbol ( ), a dollar sign ( ), or a percent sign ( ). These special characters denote the variable's type. The three variable types in Perl are as follows Scalar variables represent the basic data types integer, floating-point number, and string. A dollar sign ( ) precedes a scalar variable. Following...

Swing Programming Tips

When you use AWT components to create a user interface, you place AWT components such as buttons, labels, and check boxes inside various AWT containers such as frames and panels. Typically, you end up with a hierarchical containment structure, grouping several components in a panel and then placing several panels inside another panel. You do not have to worry much about how the components paint themselves, because the AWT components are heavyweight components that rely on the underlying...

Accessing Windows Resources with smbclient

You can use the smbclient program to access shared directories and printers on Windows systems on the LAN and to ensure that your Linux Samba server is working. One quick way to check is to use the smbclient -L command to view the list of services on the Linux Samba server itself. This is what I get when I run smbclient on my Linux Samba sever Password (I press Enter) Anonymous login successful Domain LNB SOFTWARE OS Unix Server Samba 3.0.11-6 Anonymous login successful Domain LNB SOFTWARE OS...

Displaying Widgets

Tk does not display a widget, until you use a command to position the widget in the main window. To display the widgets, you have to use a geometry manager a Tk procedure that arranges one or more child widgets in a parent widget. Tk provides two geometry-management commands for organizing and displaying widgets The place command enables you to position a widget at a fixed location in the window of a designated master widget (which does not necessarily have to be a parent widget). The master...

CDROM Troubleshooting

The initial Linux kernel comes with driver modules for all supported CD DVD drives therefore, you should not have any problem as long as Linux supports your CD DVD. Remember that the CD DVD drive's interface is what counts, not the brand name. For example, any CD DVD drive with the IDE interface works under Linux because Linux supports the IDE interface. If Linux does not seem to recognize the CD-ROM drive after you reboot the system, try the following steps to fix the problem 1. If Linux has...

Troubleshooting Sound Cards

If, after you configure the sound driver, the sound card does not produce sound when you play a sound file or an audio CD, try the following steps to diagnose and fix the problem 1. Check to see whether or not the sound driver has been loaded. One way to 1. Check to see whether or not the sound driver has been loaded. One way to check is to look at the output of the lsmod command. The following The listing should show some modules whose names begin with snd. If you don't see the sound drivers,...

Understanding Digital Signatures

The purpose of digital or electronic signatures is the same as pen-and-ink signatures, but how you sign digitally is completely different. Unlike pen-and-ink signatures, your digital signature depends on the message you are signing. The first step is to apply a mathematical function on the message and reduce it to a fixed-size message digest (also called hash). No matter how big your message is, the message digest is always around 128 or 160 bits, depending on the hashing function. The next...

Setting Up a PPP Server

The preceding sections describe how your Linux PC can establish a PPP link with another system that offers PPP service. After a PPP link is set up, both ends of the PPP link behave as peers. Before a PPP link is established, you can think of the end that initiates the dial-up connection as the client because that system asks for the connection. The other end provides the PPP connection when needed, so it's the PPP server. If you want to enable other people to connect to your Linux PC by using...

Learning the Basics of sed Commands

All sed commands have the following general form The parts shown in square brackets are optional. The command is an editing command (similar to those for the ed editor) that specifies the action sed takes on a line. The address specifies the lines to which the commands apply. The exclamation mark ( ) applies the command to all lines that do not match the address. The arguments are needed by some editing commands, such as the w or r command, that read a file for which you have to provide the...

Manually Starting and Stopping Servers

The Linux initscripts reside in the etc rc.d init.d directory. You can manually invoke scripts in this directory to start, stop, or restart specific processes usually servers. For example, to stop the Apache Web server (the program's name is httpd), type the following command The etc init.d file is defined as a symbolic link to etc rc.d init.d. Therefore, you can also execute the previous command as follows If httpd is already running and you want to restart it, all you have to do is change the...

Connecting to a Remote Network Using PPP

To set up a PPP networking connection between two systems, you must have PPP software running at both ends. Typically, your ISP provides you with an account already set up, so that the PPP software runs automatically upon login. In that case, simply start the PPP software on your system after you log in to the remote system. In some cases, the ISP might use another authentication protocol PAP or CHAP. Those require some additional configuration on your Linux system. The pppd program takes care...

Caution Do not confuse an IP subnet which is a logical division of a network with Ethernet segments which refer to

Essentially, when you define a subnet mask, you add more bits to the default network mask for that address class. If you have a class B network, for example, the default network mask would be 255.255.0.0. Then, if you decide to divide your network into 128 subnetworks, each of which has 512 hosts, you would designate 7 bits from the host address space as the subnet address. Thus, the subnet mask becomes 255.255.254.0. There are so few class A and B network addresses that they are becoming...

Understanding IP Addresses

When you have many computers on a network, you need a way to identify each one uniquely. In TCP IP networking, the address of a computer is known as the IP address. Because TCP IP deals with internetworking, the address is based on the concepts of a network address and a host address. You might think of the idea of a network address and a host address as having to provide two addresses to identify a computer uniquely Network address Indicates the network on which the computer is located Host...

Accessing a Digital Camera

Most digital cameras can connect to the Universal Serial Bus (USB) port. If you have such a camera, you can access its storage media (compact flash card, for example) as a USB mass storage device, provided your camera supports USB Mass Storage. To access the images on your USB digital camera, use the following steps 1. Read the camera manual and use the menu options of the camera to set the USB mode to Mass Storage. If the camera doesn't support USB Mass Storage, you cannot use this procedure...

POSIX Compliance

Linux is designed to comply with IEEE Std 1003.1 1996 Edition (POSIX). This standard defines the functions that applications written in the C programming language use to access the services of the operating system for tasks ranging from opening a file to allocating memory. On March 8, 1996, the Computer Systems Laboratory of the National Institute of Standards and Technology (NIST), a U.S. government agency, confirmed that Linux version 1.2.13, as packaged by Open Linux Ltd., conforms to the...

Printing the CUPS

On a multitasking and multiuser system such as Linux, a better way to print is to spool the data and schedule the printing send the output to a file, and have a separate process send the output to the printer. That way, you can continue with your work while the printing takes place in the background. In addition, if your system has more than one user, everyone can print on the same printer, without worrying about whether or not the printer is available the background printing process can take...

Saying Hello World in Tk

Tk is a major-enough extension to Tcl to warrant its own shell, called wish (the windowing shell). The wish shell interprets all built-in Tcl commands, as well as the Tk commands. You must start X before you can run wish after all, wish enables you to use X to create graphical interfaces. The wish program should be in the usr bin directory, which should be in your PATH environment variable by default. To start wish, all you have to do is type the following at the shell prompt in a terminal...

Using the forward File

Users can redirect their own mail by placing a .forward file in their home directory. The .forward file is a plaintext file with a comma-separated list of mail addresses. Any mail sent to the user is then forwarded to these addresses. If the .forward file contains a single address, all email for that user is redirected to that single email address. For example, suppose that the following .forward file is placed in the home directory of a user named All email addressed to emily is automatically...

Nessus

The Nessus Security Scanner is a modular security auditing tool that uses plugins written in Nessus scripting language to test for a wide variety of network vulnerabilities. Nessus uses a client server software architecture with a server called nessusd and a client called Before you try to install Nessus, you must install the sharutils RPM. That package includes the uudecode utility that the Nessaus installation script needs. For some reason, the sharutils package is no longer installed with...

Configuring the Sound Card

Linux needs a driver to control the sound card. The Linux kernel should automatically load the correct sound driver after you install Linux from the companion DVD-ROM. The sound drivers are provided as loadable modules that you can also manually load or unload. You will find the sound drivers organized into several directories in the lib modules 2.6.* kernel sound directory. For example, the pci directory has driver modules for PCI sound cards. If you look at the names of the module files, you...

Viewing Process Information

Every time the shell acts on a command that you type, it starts a process. The shell itself is a process so are any scripts or programs that the shell executes. Examples of such programs are the Metacity window manager and Nautilus graphical shell in GNOME. You can use the ps command to see a list of processes. When you type ps ax, for example, Bash shows you the current set of processes. Following is a typical report displayed when you enter the ps ax command in a terminal window. (I also...

Configuring CHAP and PAP Authentication

The pppd on your system has to authenticate itself to the ISP's PPP server before the PPP connection is up and running. Authentication requires proving that you have a valid account with the ISP and essentially involves providing a user name and a secret (password). PPP specifies two ways of exchanging the authentication information between the two ends of the connection CHAP Challenge Handshake Authentication Protocol (CHAP) requires the remote end to send a randomly generated challenge string...

Starting and Testing the Caching Name Server

Now that you have studied the configuration files for the caching name server, you can start the name server and see it in operation. To start the name server, log in as root and type the following command at the shell prompt service named start This starts named the name server daemon. To ensure that the server starts every time you reboot the system, log in as root and type the following command The named server writes diagnostic log messages in the var log messages file. After you start...

Understanding the Domain Name System

You can access any host computer in a TCP IP network with an IP address. Remembering the IP addresses of even a few hosts of interest, however, is tedious. This fact was recognized from the beginning of TCP IP, and the association between a host name and IP address was created. The concept is similar to that of a phone book, in which you can look up a telephone number by searching for a person's name. In the early days of the Internet, the association between names and IP addresses was...

Examining Shared Libraries That a Program Uses

Use the ldd utility to determine which shared libraries an executable program needs. The following is what ldd reports for a typical C program that uses the ELF binary format linux-gate.so.1 gt 0x0021a000 libc.so.6 gt lib libc.so.6 0x008bf000 lib ld-linux.so.2 0x008a2000 For a more complex program, such as gimp ELF version , ldd shows more shared libraries libgimpwidgets-2.0.so.0 gt usr lib libgimpwidgets-2.0.so.0 0x06eae000 libgimpcolor-2.0.so.0 gt usr lib libgimpcolor-2.0.so.0 0x0085e000...

Computing a Mode Line

Although you can live with the VESA standard video modes defined in the X server, you may sometimes have to add a ModeLine manually to get a video mode to work for a specific video card monitor combination. You specify a ModeLine on a single line with the following syntax ModeLine name CLK HRES HSS HSE HTOT VRES VSS VSE VTOT flags You must fill in all arguments, except the last argument, which is an optional keyword that indicates the type of the mode. The flags field, for example, can be...

Learning the sendmail Configuration File

You don't need to understand everything in the sendmail configuration file, etc mail sendmail.cf, but you should know how that file is created. That way, you can make minor changes if necessary and regenerate the etc mail sendmail.cf file. To be able to regenerate the sendmail.cf file, you have to install the sendmail-cf package. To check whether the sendmail-cf package is installed, type rpm -q sendmail-cf. If the command does not print the name of the sendmail-cf package, you have to install...

Configuring the xinetd Server to Disable Services

In addition to the stand-alone servers such as a Web server httpd , mail server sendmail , and domain name server named , you have to configure another server separately. That other server, xinetd the Internet superserver , starts a host of other Internet services, such as TELNET, POP3, and so on whenever a client makes a request over the network. The xinetd server includes some security features that you can use to disable the services that it can start on demand. The xinetd server reads a...

Figure 46 Accessing the CUPS Web Interface at Port 631

You can perform a variety of administration tasks through the links and the buttons on the CUPS Web interface. If you click the Do Administration Tasks link, CUPS displays a new Web page from which you can manage printer classes explained later in this section , jobs, and printers. To add a printer through the CUPS Web interface, follow these steps 1. Start the CUPS Web interface by pointing the Web browser at http localhost 631 . The Web interface appears, as shown in Figure 4-6. 2. Click the...

Understanding the Mail Delivery Mechanism

On an Internet host, the sendmail mail-transport agent delivers mail using the Simple Mail Transfer Protocol SMTP . SMTP is documented in RFC 821, Simple Mail Transfer Protocol, by Jonathan Postel, 1982. SMTP-based mail-transport agents listen to the TCP port 25 and use a small set of text commands to interact with other mail-transport agents. In fact, the commands are simple enough that you can use them directly to send a mail message. The following example shows how I use SMTP commands to...

Playing Audio CDs

You need a special application to play audio CDs in the CD DVD drive. Both GNOME and KDE come with CD Players. Before using any CD Player program, make sure you unmount any CD currently in the drive use the umount dev cdrom command , remove the CD, and place an audio CD in the drive. To play the audio CD, you must also have a sound card and the appropriate sound drivers installed, as described in earlier sections of this chapter. If you are using the GNOME desktop, you can play audio CDs by...

Modem Commands AT Commands

The now-famous AT command set first appeared in the 300-baud Hayes Smartmodem, a name coined and trademarked by Hayes Microcomputer Products, Inc. The Smartmodem worked in two distinct modes Command mode Characters sent from the PC DTE are interpreted as commands for the modem. Online mode After receiving a dial command and establishing a connection, the modem sends all received data out on the phone lines. The Hayes Smartmodem commands start with the characters AT for attention . The initial...

Getting Star Office

StarOffice is another commercial office applications suite it was created by StarDivision of Hamburg, Germany, and purchased by Sun Microsystems in 1999. StarOffice is a cross-platform solution it runs on Linux, Windows 95 98 Me NT 2000 XP, Sun Solaris SPARC, and Sun Solaris x86. Also, StarOffice is available in several languages English, French, German, Spanish, Italian, and Swedish. StarOffice is a full-featured office productivity suite. Here's what StarOffice 7 Office Suite includes...

Exploring Security Testing Tools

There are many automated tools available to perform security testing. Some tools are meant for finding the open ports on every system in a range of IP addresses. Others are meant to find the vulnerabilities associated with the open ports. Yet other tools can capture or sniff and help you analyze them so you can glean useful information about what's going on in your network. You can browse a list of top 50 security tools based on an informal poll of nmap users at www.insecure.org tools.html....

SCSI Disk Controllers and Linux

SCSI pronounced scuzzy is an increasingly popular interface for connecting up to seven different devices on the SCSI bus. Each device, and the SCSI controller, has a unique SCSI identifier ID in the range 0 through 7. The controller usually is set to SCSI ID 7 the other devices use numbers between 0 and 6 that means you can connect up to seven devices to a SCSI controller . Typically, a SCSI hard disk is set to SCSI ID 0. Table B-1 lists the SCSI controllers that the version of Linux kernel on...

The Video Card

X.Org X11 already provides an X server that loads an appropriate video driver designed to work with a particular video chipset the integrated circuit chips that generate the signals needed to control the monitor . To select the correct video driver, you have to indicate the video chipset your video card uses. Even within a family of video cards based on a specific chipset, many configurable parameters may vary from one card to another. Therefore, you also must specify the vendor name and the...

Setting Up Linux for Dialin

You can set up the same modem for dial-in use as well as dial-out use only one operation is allowed at any one time, of course . Setting up a modem for dial-in use involves setting up a program that monitors the serial port for any incoming calls this program provides the login prompt. You can use the mgetty program for this purpose. Chapter 13 describes how to set up Linux as a dial-in PPP server. That description also tells you how to set up the mgetty program for dial-in. You can learn more...