Starting the X Desktop

There are several different ways you can start your desktop in Red Hat Linux. If Red Hat Linux starts up and you see a graphical login screen, you can just log in and your desktop environment should appear. If Red Hat Linux starts up to a simple text-based login prompt, you can have the desktop environment start after you log in (either manually or automatically). Each of these methods is described in this section. Cross-Reference Procedures in this chapter assume that you have already...

Setting up an install server

If you have a LAN connection from your computer to a computer that has a CD-ROM drive and about 1.3GB of disk space and offers NFS, FTP, or Web services, you can install Red Hat Linux from that server. Likewise, you can install from a spare disk partition by using a hard disk install. The following procedures let you set up a Linux install server Because there are two CDs in the Red Hat Linux distribution, you can't just identify the location of the mounted CD as you could with previous Red Hat...

Appendix B Red Hat Linux RPMs

More than 1,200 Red Hat Package Manager (RPM) software packages are delivered with Red Hat Linux 7.2. Many of these packages are added to your computer automatically when you first install Red Hat Linux. Others can be added later, using one of several software installation tools. This appendix contains an alphabetical listing and descriptions of the Red Hat Linux 7.2 software packages. The descriptions in this appendix will help you determine the contents of those packages. Note Red Hat Linux...

Configuring Red Hat Linux as a filtering firewall

A Red Hat Linux server can make a great firewall. A variety of tools are available to help you configure your Linux box to fulfill that role. For Linux to act as a filtering firewall, it is only necessary to use the ipchains or iptables features. The iptables feature is the newer of the two and is intended to replace ipchains for configuring Linux firewalls. However, because Red Hat Linux sets up a firewall for you during installation by using ipchains, this chapter describes how to continue...

Freeciv

With Freeciv, you create a civilization that challenges competing civilizations for world dominance. The version of Freeciv that comes with Red Hat Linux contains both client software (to play the game) and server software (to connect players together). You can connect to your server and try the game yourself or (with a network connection) play against up to 14 others on the Internet. You can start Freeciv from the Gnome menu by clicking on Games FreeCiv (either the Engels or Trident tile set)....

Using filtering or proxy firewalls

The two primary types of firewalls are the filtering firewall and the proxy firewall. Often both types are employed to protect a network. A single piece of hardware may even serve both roles. A filtering firewall does just what the name implies it filters the traffic flowing between your network and the Internet, blocking certain things that may put your network at risk. It can limit access to and from the Internet to only specific computers on your network. It can also limit the type of...

Getting and installing mirrordir to clone directories

The mirrordir package is a way of doing hard-drive mirroring. Mirrordir is a powerful tool that enables you to make and maintain an exact copy of a hierarchy of directories. You can find its official Web site at http mirrordir.sourceforge.net . It can be downloaded by selecting the Download RPM button from that site. After downloading the file, install it in the same way you install any rpm. For example, if you have downloaded the rpm file to tmp, you can type

Abi Word

The AbiWord word processor is a very nice, free word processor from the AbiSource project (http www.abisource.com ). If you are creating documents from scratch, AbiWord includes many of the basic functions you need to create good-quality documents. Basic word processing features include the ability to select several font types, font sizes, bold, italics, underscore, overline, strikethrough, superscript, and subscript. You can do left, center, and right adjustment. You can cut, copy, and paste...

Common shell environment variables

When you start a shell (by logging in or opening a Terminal window), there is a bunch of environment variables already set. The following are some of the variables that are either set when you use a bash shell in Linux or that can be set by you to use with different features. BASH Contains the full path name of the bash command. This is usually bin bash. BASH_VERSION A number that represents the current version of the bash command. ENV This value identifies the location of a file that contains...

Starting the GUI at boot time

After Red Hat Linux boots up, a Red Hat logo and a GNOME (default) or KDE login window appears. You are ready to start using Red Hat Linux from an X Window GUI (probably GNOME and sawfish). Figure 4-1 shows an example of the login window that is used with GNOME ngure 4-1 Log in to start your desktop environment. ngure 4-1 Log in to start your desktop environment. Type your login and password, as prompted, and your personal desktop is displayed. It is possible to change several important options...

Reclaiming disk space from existing partitions

Like many people, your PC probably came with a Windows operating system already installed on the entire disk. Installing Red Hat, while keeping Windows on your hard disk, presents a problem. Red Hat Linux and Windows operating systems are typically put on separate disk partitions, and right now there is only one partition (and it isn't for Red Hat Linux). If you are in this predicament, but you have a lot of unused space in your Windows partition (at least 1GB or more), follow this procedure to...

Look at the ifcfgppp0 file

The ifcg-ppp0 file contains options that are passed to the pppd daemon for features that are negotiated with the remote PPP server. Most of the problems that can occur with your PPP connection result from getting some of these options wrong (particularly asking for features that the server can't or won't provide). Here is an example of the ifcfg-pppO file that you can use to connect to a Windows NT PPP server The device name is pppO (which is associated with the configuration file ifcfg-pppO)....

Running up2date

After you have registered your computer with the Red Hat Network, you can use the up2date command to find and install updates. As with rhn_register, you need root access to your computer to run up2date. This is because up2date needs permission to change configuration files and install packages. The up2date configuration file ( etc sysconfig rhn up2date) determines the behavior of up2date. In order to help you understand what up2date will do when you launch it, here are a few of the key settings...

The Packages

The packages contained on the two installation CD-ROMs are as follows 4Suite Contains Python programming tools for manipulating XML content and object databases. a2ps Contains tools for converting text and other types of files into PostScript output for printing. abiword Contains the AbiWord word processing application. adjtimex Contains the adjtimex command for regulating the system clock. alchemist Contains back-end configuration tools used by such features as printing, DNS, and Apache Web...

Setting the number of server processes

You can have Apache dynamically change the number of server processes. To do this, set the MinSpareServers and MaxSpareServers values, as described below Server-pool size regulation. Rather than making you guess how many server processes you need, Apache dynamically adapts to the load it sees --- that is, it tries to maintain enough server processes to handle the current load, plus a few spare servers to handle transient load spikes (e.g., multiple simultaneous requests from a single It does...

Using mtools

Mtools are mostly DOS commands that have the letter m in front of them and that run in Linux (though there are a few exceptions that are named differently). Using these commands, you can easily work with DOS files and file systems. Table 5-5 lists mtools that are available with Linux (if you have the mtools package installed) Table 5-5 Mtools Available with Linux Table 5-5 Mtools Available with Linux The DOS attrib command, which is used to change an MS-DOS file attribute flag. The DOS...

The forward file

One way for users to redirect their own mail is through the use of the .forward file, as described within the previously listed sendmail.cf file. The format of a plain-text .forward file is a comma-separated list of mail recipients. Common uses of the .forward file include Piping mail to a program to filter the mailbox contents Sending mail destined for one user (for example, jkpat) to another (for example, cht09, on a different machine in this case) Delivering mail to the local user (jkpat...

Client commandline options

When you run X client commands, or put them in a configuration file to start automatically, you can add options that affect how the client looks and behaves. These options are part of the X toolkit, so they are available regardless of what window manager you are using. Table 4-2 describes options that can be used with many different X client commands. Table 4-2 Command Options for Setting X Clients Table 4-2 Command Options for Setting X Clients Set the background color of the window by...

Using a shadow password file

In early versions of UNIX, all user account and password information was stored in a file that all users could read (although only root could write to it). This was generally not a problem because the password information was encrypted. The password was encrypted using a trapdoor algorithm, meaning the nonencoded password could be encoded into a scrambled string of characters, but that scrambled string could not be translated back to the nonencoded password. How does the system check your...

Tracking Port Sentry intrusions

Besides blocking access to your system or performing some other action you assign, the activities of PortSentry are logged using your Red Hat Linux system's syslog utility. As a result, PortSentry's start-up, shutdown, and scan-detection activities are logged to your var log messages file. The following are some examples of output from PortSentry in your var log messages file. portsentry 132 5 9 portsentry 13260 portsentry 13260 portsentry 13260 portsentry 13260 portsentry 13260 adminalert...

Configuring Konqueror options

You can change many of the visual attributes of the Konqueror window. You can select which menubars and toolbars appear. You can have any of the following bars appear on the Konqueror window Menubar, Toolbar, Extra Toolbar, Location Toolbar, Bookmark Toolbar. Select Settings and then click the menu item for the bar you want to appear (or not appear). The bar appears when the checkmark is shown next to it. You can modify a variety of options for Konqueror by choosing Settings Configure...

Setting User Defaults

PASS_MAX_DAYS PASS_MIN_DAYS PASS_MIN_LEN PASS WARN AGE Min max values for automatic uid selection in useradd Min max values for automatic gid selection in groupadd If defined, this command is run when removing a user. It should remove any at cron print jobs etc. owned by the user to be removed (passed as the first argument). USERDEL_CMD usr sbin userdel_local If useradd should create home directories for users by default. On RH systems, we do. This option is ORed with on the -m flag useradd...

MIDI audio players

MIDI stands for Musical Instrument Digital Interface. MIDI files are created from synthesizers and other electronic music devices. MIDI files tend to be smaller than other kinds of audio files because, instead of storing the complete sounds, they contain the notes played. The MIDI player reproduces the notes to sound like a huge variety of MIDI instruments. There are lots of sites on the Internet for downloading MIDI files. Try the Ifni MIDI Music site (http www.ifni.com ), which contains songs...

Classless Inter Domain Routing

The class method of allocating IP addresses had several major drawbacks. First, few organizations fell neatly into one class or another. For most organizations, a Class C address (up to 256 IP addresses) was too small, and a Class B address (up to 65,534 IP addresses) was too big. The result was a lot of wasted numbers in a world where IP addresses were running short. Second, IP classes resulted in too many routing table entries. As a result, routers were becoming overloaded with information....

Creating a man page with Groff

Before HOW-TOs and info files, man pages were the foundation for information about UNIX (and UNIX-like) systems. Each command, file format, device, or other component either had its own man page or was grouped on a man page with similar components. To create your own man page requires that you learn only a few macros (in particular, man macros). Figure 6-1 is an example of the source file for a fictitious man page for a command called waycool. igure 6-1 Simple markup is required to create man...

Starting the GUI yourself

If you log in to a nongraphical interface, you can start your X GUI at any time using the startx command. The startx command is a shell script that reads your X configuration files, and starts the xinit command (which starts the X server). To run the startx command, simply type the following Tip If startx fails with a message Server is already active, it may be that a lock file was not removed the last time X ran. Assuming you are using display 0 (which is the default), type rm tmp .X0-lock. If...

Creating and formatting a LaTeX document

Because LaTeX is the most common way of using TeX, this section describes how to create and format a LaTeX document. A LaTeX macro (often referred to as a command) appears in a document in one of the two following forms string option required First there is a backslash ( ), which is followed by a string of characters. (Replace string with the name of the command.) Optional arguments are contained in braces ( ), and required arguments are in brackets ( ). optwri required First there is a...

Text processing with Groff

The nroff and troff text formatting commands were the first interfaces available for producing typeset quality documents with the UNIX system. They aren't editors rather, they are commands that you send your text through, with the result being formatted pages nroff ( Produces formatted plain text and includes the ability to do pagination, indents, and text justification, as well as other features. troff ( Produces typeset text, including everything nroff can do, plus the capability to produce...

Using linuxconf

The most complete graphical utility for working with Red Hat Linux is linuxconf. It contains features for configuring networking (client and server tasks), creating user accounts, and working with the file system. Note Red Hat is phasing out support for linuxconf. In fact, unless you do an everything install of Red Hat Linux, it's likely that linuxconf isn't even installed on your system. If linuxconf is not found, you can install it from the second Red Hat Linux installation CD (CD-2). As Red...

Creating User Accounts

Every person who uses your Red Hat Linux system should have a separate user account. Having a user account provides each person with an area in which to securely store files, as well as a means of tailoring his or her user interface (GUI, path, environment variables, and so on) to suit the way that he or she uses the computer. You can add user accounts to your Red Hat Linux system in several different ways. This chapter describes how to use the useradd command to add user accounts to Red Hat...

Customizing error responses

For different error conditions that occur, you can define specific responses. The responses can be in plain text, redirects to pages on the local server, or redirects to external pages Customizable error response (Apache style) ErrorDocument 500 The server made a boo boo. n.b. the () marks it as text, it does not get output 2) local redirects ErrorDocument 404 missing.html to redirect to local url missing.html ErrorDocument 404 cgi-bin missing_handler.pl N.B. can redirect to a script or a...

Commands for handling attachments

The following commands are used for handling data so that it can be included in a mail message as an attachment. Attachments in UNIX systems were originally handled by uuencode format. Now most mail attachments are handled using MIME format with various encoding. Note Because newer graphical mail programs, such as Mozilla Mail and Netscape Messenger, can handle attachments automatically, it is inefficient to go through the trouble of using most of these commands. uuencode Used to convert a...

Using Logcheck

After Logcheck has been set up and run, to begin using Logcheck you start by simply reading the e-mail that Logcheck sends you. By default, the root user on your Red Hat Linux system will receive an e-mail message from Logcheck each hour. Log messages that are matched, and not excluded, are sorted under one of the following three headings in each e-mail message Active System Attack Alerts Represents messages that may represent an attack on your system. Security Violations Includes failures and...

Temporarily changing boot options

From the GRUB boot screen, you can select to change or add boot options for the current boot session. First, select the operating system you want (using the arrow keys) and type e (as described earlier). You will see a text screen that looks like the following GRUB version 0.90 (639K lower 129792K upper memory) root (hd0,1) kernel boot vmlinuz-2.4.7-10 ro root dev hda3 hdc ide-scsi initrd boot initrd-2.4.7-10.img Use the ua and da keys to select which entry is highlighted. Press 'b' to boot,...

Starting and Stopping the Server

The procedure for starting and stopping the Apache Web server is no different from that of many other server processes. The apache package installation creates the etc init.d httpd file and uses the chkconfig command to create the appropriate links in the etc rcX.d directories. Cross-Reference See Chapter 12 for detailed information on the inner workings of the shell scripts that control starting and stopping daemons and server processes. The etc init.d httpd shell script accepts any of five...

Using a clock

There are several X clock programs that come with the Red Hat Linux distribution. A lot of people like to have one on their desktop and some of the clocks have nice features. Figure 5-5 shows four different X clocks (from left to right) xclock, rclock, wmclock, and xdaliclock (bottom).

Lin City

LinCity simulates building and maintaining a city, or a suburban or rural area. You add residences, monuments, communes, tracks, markets, potteries, ore mines, and other sites to create a thriving community. Connect areas together with tracks, roads, or railways. Remember that the game simulates a living community, so watch that resources aren't consumed too rapidly and that pollution doesn't grow too quickly. Try to recycle and make sure you don't spend all of your resources and go broke. Get...

Using Scanners Driven by SANE

Software for using a scanner with Linux is being driven by an effort called Scanner Access Now Easy (SANE). This effort hopes to standardize how device drivers for equipment such as scanners, digital still cameras, and digital video cameras are created, as well as help simplify the interfaces for applications that use those devices. SANE is now included with the Red Hat Linux distribution. The sane-backends and sane-frontends packages are on the first Red Hat Linux installation CD (CD-1) that...

Configuring network clients

In this example, there are a variety of Red Hat Linux and Windows operating system clients on a LAN. One Red Hat Linux computer has a connection to the Internet and is willing to act as a router between the Internet and the other computers on the LAN (as described in the previous section). To be able to reach computers on the Internet, each client must be capable of doing the following things Resolve the names it requests (for example, http www.redhat.com ) into IP addresses. Find a route to...

Sendmail options

The sendmail.cf file contains a long list of options that you can set for sendmail on your Red Hat Linux system. Option definitions start after the Options block. Here is an example of the beginning of the Options strip message body to 7 bits on input O SevenBitInput False The SevenBitInput option indicates that sendmail should not clear the most significant bit from each byte of all mail messages. The EightBitMode option dictates how sendmail should handle message data that is not explicitly...

Check the chapsecrets or papsecrets files

PPP supports two authentication protocols in Red Hat Linux Challenge Handshake Authentication Protocol (CHAP) and Password Authentication Protocol (PAP). Here is what each protocol does to authenticate CHAP The server sends the client a challenge packet (which includes the server name). The client sends back a response that includes its name and a value that combines the secret and the challenge. The client name and secret are stored in your etc ppp chap-secrets file. PAP The client sends its...

Supplying an initial bashrc file

By supplying your users with an initial .bashrc file, you provide them a starting point from which they can further customize their shell environment. Moreover, you can be sure that the file is created with the appropriate access permissions so as not to compromise system security. This script is, after all, run each time the user starts a new bash shell. So, security is a concern. It is also a good place to supply useful command aliases and additions to the command search path. Let us look at...

Recovering individual files

The restore command can also be used to recover individual files and directories. By using restore in interactive mode, you can type a series of restore commands to selectively restore files. To run restore in interactive mode, use the i parameter instead of r The restore command will then read the file index from the backup tape and present you with a restore prompt. At this prompt, you can type the commands that enable you to select which directories and files to recover. You can navigate the...

Monitoring Log Files with Logcheck

Red Hat Linux has the ability to monitor and log nearly every activity that can occur on your computer. On a busy system, massive amounts of informational and error messages are produced and placed in log files. For the administrator, the hard part of monitoring log files isn't detecting or logging security problems the hard part is remembering to check the log files and sift out those messages that pose a threat from all the other stuff that gets logged. This section describes how to monitor...

Using a simple squidconf file

You can use the etc squid squid.conf file that comes with squid to get started. Though the file contains lots of comments, the actual settings in that file are quite manageable. The following paragraphs described the lines that are contained in the default squid.conf file The hierarchy_stoplist tag indicates that when a certain string of characters appear in a URL, the content should be obtained from the original server and not from a cache peer. In this example, requests for the string cgi-bin...

Modifying the Squid configuration file

If you want to set up a more complex set of access permissions for Squid, you should start with the default squid.conf configuration file (described earlier). To begin, open the etc squid squid.conf file (as the root user). You will see a lot of information describing the values that you can set in this file. In general, most of the tags that you need to configure Squid are used to set up cache and provide host access to your proxy server. Tip Don't change the squid.conf.default file If you...

Using the mkfs command to create a file system

It is possible to create a file system, for any supported file system type, on a disk or partition that you choose. This is done with the mkfs command. While this is most useful for creating file systems on hard disk partitions, you can create file systems on floppy disks as well. Note Though supposedly you should be able to create a file system of several different supported file system types, my installation of Linux allowed me to create only ext3 and minix file systems. Here is an example of...

Mailer definitions

Mail Delivery Agents (MDAs) are described in the Mailer Definitions section. Specifically, the section enables you to define Mlocal and Mprog MDAs as other than the procmail and smrsh programs, respectively Mlocal, P usr bin procmail, F lsDFMAw5 qSPfhn9, S EnvFromL HdrFromL, R EnvToL HdrToL, T DNS RFC82 2 X-Unix, A procmail -Y -a h -d u Mprog, P usr sbin smrsh, F lsDFMoqeu9, S EnvFromL HdrFromL, R EnvToL HdrToL, D z , T X-Unix X-Unix X-Unix, A smrsh -c u In general, you shouldn't need to modify...

Running the Crack command

Before you can run it, however, you must make your password file available in a format that Crack can read. The easiest way to do this is to run the shadmrg.sv script provided with Crack. You must be running as root to run the script, so use the su command to assume root privilege. The shadmrg.sv script is in the scripts directory within the primary Crack directory. It prints the merged password data to the screen, so you will need to redirect the output to a file...

Sharing NFS file systems

To share an NFS file system from your Red Hat Linux system, you need to export it. Exporting is done in Red Hat Linux by adding entries into the etc exports file. Each entry identifies the directory in your local file system that you want to share. The entry identifies the other computers that can share the resource (or opens it to all computers) and includes other options that reflect permissions associated with the directory. Remember that when you share a directory, you are sharing all files...

Textbased mail programs

There are many text-based mail programs for reading, sending, and working with your mail. Many of these programs have been around for a long time, so they are full of features and have been well debugged. As a group, however, they are not very intuitive. The following sections describe some text-based commands. Tip Most of these programs use the value of your MAIL environment variable as your local mailbox. Usually, that location is var spool mail user, where user is your user name. To set your...

Using Free and Commercial Word Processors

With the number of Linux systems growing daily, more and more commercial applications are becoming available for Linux. In the area of word processing, several strong products have already been developed to ease the transition to Red Hat Linux for less technical-oriented users. In Red Hat 7, a free word processor (ABIWord) was added to the distribution for the first time. This section describes the following free and commercial word processors for Red Hat Linux AbiWord The AbiWord word...

Creating the kickstart file

The best way to begin creating your kickstart file is from a working ks.cfg file. You can do this either by copying one that comes with your Red Hat installation or by creating one using the mkkickstart command described in the previous section. From the Red Hat Documentation CD, copy the sample.ks file to a temporary directory so you can work on it. Here is an example cp mnt cdrom RH-DOCS sample.ks tmp ks.cfg Use any text editor to edit the ks.cfg file. Remember that required items should be...

Window System

The X Window System (X) is the graphical interface used with every Red Hat Linux desktop by default. Most new games offer X versions since everyone has X. Because X doesn't provide a dedicated graphical screen for the game, performance can be degraded. There is more overhead in X that is devoted to running the desktop and managing X applications than is needed, if you just need a GUI to play a game. Tip It is the X window manager that typically consumes most of your processing power. If you...

Permanently changing boot options

You can change the options that take effect each time you boot your computer by changing the GRUB configuration file. In Red Hat Linux, GRUB configuration centers around the boot grub grub.conf file. The boot grub grub.conf file is created when you install Red Hat Linux. Here is an example of a grub.conf file. grub.conf generated by anaconda Note that you do not have to rerun grub after making NOTICE You have a boot partition. This means that all kernel and initrd paths are relative to boot ,...

Selecting wireless cards

Not all wireless LAN cards that you can purchase today will work with Linux. When you select a card, make sure that a Linux driver has been created for the card. Beyond that, you want to look for several other features Card type Most wireless LAN cards are PCMCIA (PC card) form. To use these cards in desktop computers, you probably need an ISA or PCI adapter card. Cost If you shop around, you can find wireless LAN cards that cost between 90 and 150 (and the prices will probably go down by the...

Using the Gnome Desktop Environment

GNOME (pronounced guh-nome) provides the desktop environment that you get by default when you install Red Hat Linux. This desktop environment provides the software that is between your X Window System framework and the look-and-feel provided by the window manager. GNOME offers a stable and reliable desktop environment, with a few cool features built in. GNOME is not a window manager, so it must be used with a window manager to provide such things as window borders and window controls....

Understanding the XF86Config file

The XF86Config file (located in the etc X11 directory) contains definitions used by the X server to use your video card, keyboard, mouse, and monitor. In general, novice users should not edit this file directly, but rather, use Xconfigurator to change its contents. For some video cards, however, there is a need for some manual configuration to get the card working properly. The following is a description of the basic information contained in the XF86Config file Files section Sets the locations...

Defining indexing

It's possible to have your Apache server show different icons for different types of files. To use this feature, IndexOptions should be set to FancyIndexing, and AddIconByEncoding, AddIconByType, and AddIcon FancyIndexing whether you want fancy directory indexing or standard IndexOptions FancyIndexing NameWidth * AddIcon* directives tell the server which icon to show for different files or filename extensions. These are only displayed for AddIconByEncoding (CMP, icons compressed.gif) x-compress...

Working with File Systems

File systems in Red Hat Linux are organized in a hierarchy, beginning from root ( ) and continuing downward in a structure of directories and subdirectories. As an administrator of a Red Hat Linux system, it is your duty to make sure that all the disk drives that represent your file system are available to the users of the computer. It is also your job to make sure that there is enough disk space in the right places in the file system for users to store the information they need. File systems...

Checking directories and permissions

Associated with each shell is a location in the Linux file system known as the current or working directory. As previously mentioned, each user has a directory that is identified as the user's home directory. When you first log in to Linux, you begin with your home directory as the current directory. When you request to open or save a file, your shell uses the current directory as the point of reference. Simply give a filename when you save a file and it will be placed in the current directory....

Creating new files and folders

You can create a variety of file types when using the Konqueror window. Choose Edit Create New, and select one of the following types Illustration Document Opens a box that lets you create a document in kontour format (an illustration). Type the document name you want to create and click OK. The document should have a .kil suffix if you want it to automatically open in kontour. Presentation Document Opens a box that lets you create a document in kpresenter format (a presentation). Type the...

Partitioning with Disk Druid during installation

During a custom installation, you are given the opportunity to change how your hard disk is partitioned. Red Hat recommends using the Disk Druid. Figure 2-1 is an example of the Disk Druid screen from the Red Hat Linux Installation Guide. igure 2-1 Change disk partitions during installation using Disk Druid. igure 2-1 Change disk partitions during installation using Disk Druid. The Disk Druid screen is divided into two sections. The top shows general information about each hard disk and primary...

Understanding file permissions

After you've worked with Linux for a while, you are almost sure to get a Permission Denied message. Permissions associated with files and directories in Linux were designed to keep users from accessing other users' private files and to protect important system files. The nine bits assigned to each file for permissions define the access that you and others have to your file. Permission bits appear as rwxrwxrwx. The first three bits apply to the owner's permission, the next three apply to the...

Guarding Your Computer with Port Sentry

While Logcheck gathers and sorts log messages that may represent attempts to break into your computer system, the PortSentry takes a more active approach to protecting your system from network intrusions. PortSentry can be installed and configured on a Red Hat Linux system to monitor selected TCP and UDP ports, and can then react to attempts to access these ports (presumably by people trying to break in) in ways that you choose. Like Logcheck, PortSentry is another software package from Psionic...

Configuring Logcheck to suit your needs

After Logcheck is installed, it will run without requiring any configuration. However, to better suit your needs, there are several configuration files you can modify. The following section describes those files. The usr sbin logcheck script scans your log files and sorts the log messages that are e-mailed. You can change much of the behavior of the logcheck script by changing the values of the variables within the script. To change the behavior of the logcheck script, follow these steps Make a...

Quick Starting the Apache Web Server

There are several ways to install Apache on your machine. If it wasn't installed during Red Hat installation, you can install it later from the CD-ROMs that come with this book. The binary package can also be downloaded from any Red Hat mirror site and is included on the official Red Hat distribution CD-ROM set. Note It is possible for a new version of Apache to be released before an equivalent Red Hat package is available. Or perhaps you'd prefer to customize the server's compile-time options...

Configuring your sound card

Before you can use sound on your Red Hat Linux system, you need to install your sound card and connect the speakers. Red Hat Linux should detect this card when you install Red Hat Linux or when you reboot and install the proper driver. Drivers for many common sound cards are available when you first install Red Hat Linux. Earlier releases of Red Hat Linux did not have sound card devices built into the kernel, but the current release of Red Hat Linux automatically builds sound support into the...

Configuring a shared Samba printer

Your Red Hat Linux printers can be configured as shared SMB printers by using the Samba SWAT (Samba Web Administration Tool) program. To use SWAT, you need to have the Samba package installed and the swat service configured so that SWAT can be opened in your browser window. You also need a TCP IP connection between you and the client computers that will use your printer. Cross-Reference Chapter 18 describes how to set up Samba and SWAT to be used in your browser. With SWAT configured, you can...

Launching a remote X application

Suppose you want to run an application from a computer named remote1 on your local area network (in your same domain). Your local computer is local1, and the remote computer is remote1. The following steps show how to run an X application from remotel from your X display on locall. Caution This procedure assumes that no special security procedures are implemented. It is the default situation and is designed for sharing applications among trusted computers (usually single-user workstations) on a...

Using the LyX LaTeX Editor

You can start the LyX LaTeX editor with the lyx command (probably located in usr bin lyx). LyX comes with a lot of supporting documentation. Click Help to select a Tutorial, User's Guide, Reference Manual, or other information. To start your first document, I recommend that you select one of the templates provided with LyX. Templates are located in usr share lyx templates. To open a template, click File New from template, and select Templates. There are templates available for a letter,...

Using the ghostscript and gv commands

To display PostScript or PDF documents in Red Hat Linux, you can use the ghostscript command. The ghostscript command is a fairly crude interface, intended to let you step through documents and interpret them one line at a time. (If the ghostscript command is not installed on your system, you can get it by installing the ghostscript package from CD-1 that comes with this book.) You can display any .ps or .pdf file you happen to have on your computer. For example, if the vnc-doc package is...

Creating Documents in Groff or LaTeX

You can create documents for either of Linux's Groff (troff nroff) or LaTeX (TeX) styles of publishing using any text editor. Red Hat Linux comes with several of these text editors, or you can download lots of others from the Internet. See the Choosing a Text Editor sidebar for information on different text editors. The process for creating documents in Groff and LaTeX is generally the same. Use the following steps Create a document with any text editor. The document will contain text and...

New Features in Red Hat Linux

While the inclusion of the Linux 2.4 kernel was the major enhancement for version 7.1, Red Hat Linux 7.2 includes new features that span different areas of the operating system. In case you are upgrading from a Red Hat Linux 7.0 or earlier system, I have included descriptions of the Linux 2.4 kernel (which you may be seeing for the first time). Features that appear in Red Hat Linux for the first time in version 7.2 include a new boot manager (GRUB), a new journaling file system (ext3), and a...

Creating the Samba server configuration with SWAT

You can run the SWAT program, by typing the following URL from your local browser Instead of running SWAT from your local browser, you can also run the SWAT program from another computer on the network, by substituting the server computer's name for localhost. (To allow computers besides localhost to access the swat service, you must change or remove the only_from 127.0.0.1 line from the etc xinetd.d swat file and restart the xinetd service.) At this point, the browser will prompt you for a...

Sendmail component files

The first part of the sendmail.cf file contains a listing of component files used to create the sendmail.cf file. It also contains information about the configuration file's format and version. The following is an example of the beginning of the sendmail.cf file Copyright (c) 1998-2001 Sendmail, Inc. and its suppliers. Copyright (c) 1983, 1995 Eric P. Allman. All rights reserved. The Regents of the University of California. All rights reserved. By using this file, you agree to the terms and...

Sendmail local info entries

The next entries in the sendmail.cf file appear under the local info heading. They enable you to enter configuration information that is specific to your local host computer. Here are the first lines you see in that local info file containing names of hosts for which we receive email Fw etc mail local-host-names The previous lines have similar functions. The Cwlocalhost line defines the class macro w, which contains a list of all possible hostnames given to the machine. This includes any DNS...

Playing MP3 with XMMS Audio Player

Xmms Redhat

The XMMS Audio Player (which stands for X Multimedia System) provides a graphical interface for playing your MP3 audio files, as well as audio files in a variety of other formats. It has some nice extras too, which include an equalizer and a playlist editor. If the player looks familiar to you, that's because it is styled after the Windows winamp program. You can start the XMMS Audio Player from the Gnome desktop menu by choosing Programs Multimedia XMMS. Or you can run the xmms command from a...

Understanding dump levels

The dump command has the capacity to back up all files on a file system, or it can selectively back up only those files that have changed recently. The dump level parameter is used to specify this behavior. A dump level of 0 results in a full backup of all files on the file system. Specifying a higher number (1-9) backs up only those files that have been changed or added since the most recent dump of the same or lower dump level. I recommend you use dump levels to implement a full and...

Becoming Super User The su Command

Though the normal way to become the super user is to log in as root, sometimes that is not convenient. For example, you may be logged into a regular user account and just want to make a quick administrative change to your system without having to log out and log back in. Or, you may need to log in over the network to make a change to a Linux system but find that the system doesn't allow root users in from over the network (a common practice). The answer is that you can use the su command. From...

Copying files with FTP

Like telnet, FTP is a protocol that is available on many different operating systems. Archives of files on the Internet are stored on what are called FTP servers. To connect to those servers from Red Hat Linux, you can either type the URL of that server into a Web browser or you can use the ftp command or graphical ftp windows such as gFTP. The ftp command is available on Red Hat Linux, as well as every other Linux and UNIX system, for copying files to and from FTP servers. Like telnet, FTP has...

Obtaining the Crack package

For general information about the Crack software, read the Frequently Asked Questions Web page at Crack can be downloaded via FTP from the pub tools unix pwdutils crack directory at ftp ftp.cerias.purdue.edu . At the time of this writing, 5.0 is the current version of Crack. In this case, the file crack5.0.tar.gz is the one to download. If you find a higher version number when you look in the directory, download that newer version instead. Alternatively, you can download the file...

Configuring Port Sentry

Chances are that you will want to make some changes to the way that PortSentry runs. To change how PortSentry behaves, you can modify the etc portsentry portsentry.conf file. In that file, you can choose which ports to monitor, the mode in which to monitor, and the responses to take when a scan is detected. The responses can include Blocking access by the remote computer Rerouting messages from the remote computer to a dead host Adding a firewall rule to drop packets from the remote computer...

Using the FIPS utility

The FIPS utility came about to solve the problem of a would-be Linux user with a monolithic DOS hard disk. With FIPS, you can change the size of your DOS partition without erasing it. Though this process is risky, and nobody recommends it without major buyer beware warnings, many use it safely and save a lot of time and effort. FIPS works by changing the values in the partition table and boot sector. Space is gained by changing the partition table that is used to create a new primary DOS...

Running the FTP Server

When you install Red Hat Linux, your system is already set up as an FTP server. However, although users can log in and see the default FTP directories, no files that they can access are there yet. The default setup for your Red Hat Linux FTP server after you install the FTP software follows (the Washington University FTP Server software is the wu-ftpd package) FTP Daemon The FTP daemon is set up in the etc xinetd.d wu-ftpd file as usr sbin in.ftpd. When someone requests FTP service from your...

Configuring sendmail

If you ever find the need to strike up a conversation with a system administrator, simply mention sendmail.cf file, address rewriting rules, or mail loops back to itself, and you will be instantly understood, considered a compatriot, and find yourself the recipient of much sympathy. The sendmail.cf file (or sendmail configuration file) is legendary (and infamous) for arcane syntax, nearly indecipherable rule sets, and its capability to make an administrator tear out his or her hair. In reality,...

Understanding Network Information Service

Network Information Service (NIS) was created by Sun Microsystems as a way of managing information that is shared among a group of host computers on a network. Using NIS, computers can share a common set of user accounts, user groups, and TCP IP hostnames, as well as other information. Note NIS was originally called Yellow Pages, but Sun had to change this name because it was trademarked. Some people still refer to NIS as YP, and many of the NIS commands (and even NIS package names) begin with...

Changing GNOME preferences

There are many ways to change the behavior, look, and feel of your GNOME desktop. Some of these relate directly to GNOME, whereas others must be changed for the window manager (in this case, sawfish). Most GNOME preferences can be modified in the Control Center window. You can open that window from a Terminal window as follows The Control Center window contains categories for changing preferences related to the Desktop, Document Handlers (editors, MIME types, and URLs), the current window...

Installing and managing RPM files

When you get an application that is packaged in RPM format, you typically get a single file. The command used to work with RPM package files is rpm. To manage RPM packages, the rpm command has options that let you list all the packages that are installed, upgrade existing packages to newer versions, and query packages for information (such as the files or documentation included with the package). There is also a verify option that lets you check that all files that make up the package are...

Analyzing Web server traffic

The webalizer command can take Apache log files and produce usage reports for your server. Those reports are created in HTML format so you can display the information graphically. Information is produced in both table and graph form. To use the webalizer command, the webalizer package must be installed. You can run webalizer with no options and have it take the values in the etc webalizer.conf files to get the information it needs. As an alternative, you can use command-line options to override...

Using the pax Archiving Tool

Over the years, a variety of UNIX operating systems have arisen, resulting in a variety of similar but incompatible file archiving formats. Even tools that go by the same name may use slightly different storage formats on different systems. This can lead to big problems when trying to archive and retrieve data in a multiplatform environment. Fortunately, there is a solution. The pax program is a POSIX standard utility that can read and write a wide variety of archive formats. An RPM package for...

Understanding How the Internet Is Structured

In order to operate, the Internet relies on maintaining a unique set of names and numbers. The names are domain names and hostnames, which enable the computers connected to the Internet to be identified in a hierarchy. The numbers are Internet Protocol (IP) addresses and port numbers, which enable computers to be grouped together into interconnected sets of subnetworks, yet remain uniquely addressable by the Internet. An Internet Service Provider (ISP) will give you the information you need to...

Checking Disk Quotas

Limited disk space can be another source of user support calls. A stock Red Hat Linux system lacks true disk quotas, so it is possible for a single user to use up an entire disk, causing problems for the rest of the users. The duty then falls on the system administrator to recover enough disk space for everyone to keep working. The long-term solution is to install a larger hard drive, but in the short term, the solution is usually to contact individual users and convince them to remove unneeded...

Checking and Fixing Databases

Over time, databases can become corrupted or store information inefficiently. MySQL comes with commands that you can use to check and repair your databases. The myisamchk and isamchk commands are available to check MyISAM and ISAM database tables, respectively. MylSAM tables are used by default with MySQL. The tables are stored in the var lib mysql dbname directory by default, where dbname is replaced by the name of the database you are using. For each table, there are three files in this...

Ripping CDs with grip

The grip window provides a more graphical method of copying music from CDs to your hard disk. You can then play the songs directly from your hard disk or burn them back on to a blank CD. You can open Grip from the Gnome menu by choosing Programs Multimedia grip or by typing grip from a Terminal window. Figure 8-10 shows an example of the Grip window. igure 8-10 Rip and play songs from the grip window. To rip audio tracks from a CD with grip, do the following 1. With the grip window open, insert...

Using Corel Word Perfect

At one time, WordPerfect was the world's most popular word-processing program. Although MS Word overtook WordPerfect a few years ago, WordPerfect is still very popular and is loaded with features. Corel Corporation (http www.corel.com ) now owns WordPerfect and continues its development. Fortunately for Red Hat Linux users, WordPerfect is available for Linux. Instead of having a lot of different applications for drawing and graphics editing, those features are built into the WordPerfect...

Referencing Network Services

This section contains the quick reference information related to Red Hat Linux system services. The table listing these services (Table C-1) contains the following information Feature What type of service is it Package names What software packages must be installed for the service to be available Start-up scripts Which start-up scripts launch the service Daemon What daemon process is running to provide the service Configuration files What configuration files can you modify to tailor the service...

Booting your computer with LILO

It is the program that can stand outside the operating systems installed on the computer so you can choose which system to boot. It also lets you give special options that modify how the operating system is booted. Note LILO has been replaced by GRUB as the default boot loader for Red Hat Linux. Unless you have explicitly changed your system to use LILO, you should be reading the GRUB section for boot loader information. If LILO is being used on your computer, it...

Using a Digital Camera with gPhoto

With the gPhoto window, you can download images from digital cameras. gPhoto works by attaching one of the supported digital cameras to a serial port on your computer. You can view an index of thumbnails of the digital images from the camera, view full-size digital images, and download the ones you select from the camera to your Linux system. Check the gPhoto Web site (http www.gphoto.org ) for information on supported cameras as well as other topics related to gPhoto. Here is a list of digital...

Playing MP3 with freeamp

The freeamp MP3 player has some clever controls. You can click in the display area to cycle through the current time, remaining time, and total time associated with the music. Press and hold the left mouse button on dials on either side of the display, then move them to adjust the volume (left dial) or to seek a particular place in the song (right dial). Freeamp is not part of the Red Hat Linux distribution. The freeamp player is available from the FreeAmp Home Page (http www.freeamp.org ), or...