Red Hat Linux 7.2

Using the r commands rlogin rcp and rsh

The rlogin, rcp, and rsh commands all use the same underlying security mechanism to enable remote login, remote file copy, and remote execution, respectively, among computers. If you use these commands, you will find that they are a quick and convenient way of exchanging information among a group of trusted computers. Caution The default security mechanism used by the r commands is not very secure. Don't use these commands if your computers protect national secrets. I recommend using these...

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...

Using the Nautilus file manager

At one time, file managers did little more than let you run applications, create data files, and open folders. These days, as the information a user needs expands beyond the local system, file managers are expected to also display Web pages, access FTP sites, and play multimedia content. The Nautilus file manager, which is the default GNOME file manager, is an example of just such a file manager. When you open the Nautilus file manager window (from the GNOME main menu or by launching 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...

Xanim viewer

The Xanim program is a viewer that runs on your X desktop. It can play animation, video, and audio files. Until Red Hat Linux 7.1, the xanim package was part of the Red Hat Linux Powertools CD. Though there is no longer a Powertools CD, you can download the xanim package from any Red Hat FTP site. The types of media formats Xanim supports are Animations Supports FLI, FLC, IFF (with support for various compression, color cycling, and display modes), GIF87a (single and multiple image support) and...

Changing the desktop

From the Control Center window, you can change the Background, Launch Feedback, Panel, Screensaver, Theme Selector, or Window Manager for your GNOME desktop. After you open the Control Center window, select one of those categories. Here are the preferences that you can change from each Background From the Background preferences, you can choose a single solid color, a two-color gradient (shading from top to bottom or left to right), or a pixmap image to use as wallpaper. If you choose a single...

CD audio players

The same CD-ROM drive that you use to install software can be used to play music CDs. A couple of basic CD players that you get with Red Hat are gtcd (an X-based CD player) and cdp (a text-based CD player). Tip Before you try any of the CD players, unmount the CD in your drive (if one is mounted) by typing umount mnt cdrom. Then you can eject the old CD and place an audio CD in the drive. One feature to look for in a CD player to use with Red Hat Linux is CD Database (CDDB) support. With CDDB,...

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...

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...

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...

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...

Audio file conversion

If you have a sound file in one format, but you want it to be in another format, Linux offers some conversion tools you can use to convert the file. The Sox utility can translate to and from any of the audio formats listed in Table 8-1. Table 8-1 Sound Formats Supported by Sox Utility Table 8-1 Sound Formats Supported by Sox Utility 8SVX Amiga musical instrument description format. Apple IIc IIgs and SGI AIFF files. May require a separate archiver to work with these files. Sun Microsystems AU...

Mounting file systems

Most of your hard disks are mounted automatically for you. When you installed Red Hat Linux, you were asked to create partitions and indicate the mount points for those partitions. When you boot Red Hat Linux, all Linux partitions should be mounted. For that reason, this section focuses mostly on how to mount other types of devices so that they become part of your Red Hat Linux file system. Besides being able to mount other types of devices, you can also use mount to mount other kinds of file...

Adding a hard disk

Adding a new hard disk to your computer so that it can be used by Linux requires a combination of steps described in previous sections. The general steps are as follows Identify the partitions on the new hard disk. Create the file systems on the new hard disk. The easiest way to add a hard disk to Linux is to have the whole hard disk devoted to a single Linux partition. You can have multiple partitions, however, and assign them each to different types of file systems and different mount points,...

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...

Gnome games

The Gnome games consist of some old text-based UNIX games, some card games, and a bunch of games that look suspiciously like games you would find on Windows systems. If you are afraid of losing your favorite applications (such as Solitaire, Freecell, and Minesweeper) when you leave Windows 9x 2000, have no fear. You can find many of them under Gnome games. Table 7-1 lists the games available by selecting Programs Games from the Main Gnome menu. Lets you select from among 28 different solitaire...

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...

Monitoring CPU usage with top and gtop

Start the top utility in a terminal window, and it displays the top CPU consuming processes on your computer. Every five seconds, top will determine which processes are consuming the most CPU time and display them in descending order on your screen. By adding the -S option to top, you can have the display show you the cumulative CPU time that the process, as well as any child processes that may already have exited, has spent. If you want to change how often the screen is updated, you can add...

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...

Adding MIME types and handlers

With the AddType directive, you can enhance the MIME types assigned for your Apache Web server without editing the mime.types file. With the AddHandler directive, you can map selected file extensions to handlers that result in certain actions being taken AddType allows you to tweak mime.types without actually editing it, or to make certain files to be certain types. For example, the PHP 3.x module not part of the Apache distribution - see http www.php.net will typically use AddType application...

Starting runlevel scripts

As previously mentioned, the etc rc.d rc script is a script that is integral to the concept of run levels. Any change of run level causes the script to be executed, with the new run level as an argument. This simple yet powerful script is shown and discussed here rc This file is responsible for starting stopping services when the runlevel changes. It is also responsible for the very first setup of basic things, such as setting the hostname. Miquel van Smoorenburg, Now find out what the current...

Checking that NIS is working

To check that your NIS client is communicating with your NIS master server, follow the instructions below. Note If your NIS server isn't configured yet, refer to the Setting Up Red Hat Linux as an NIS Master Server to configure your NIS server. Then return to this procedure to make sure that everything is working properly. From the NIS client computer, type the following command to make sure that you are communicating with the NIS server The output shown above indicates that the NIS client is...

Managing xinetd services

There are a bunch of services, particularly Internet services, that are not handled by separate run-level scripts. Instead, a single run-level script called xinetd (formerly inetd) is run to handle incoming requests for a variety of network services. For that reason, xinetd is sometimes referred to as the super-server. The xinetd run-level script (along with the xinetd daemon that it runs) offers the following advantages Less daemon processes. Instead of one (or more) daemon processes running...

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...

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...

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...

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...

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...

Using the m4 macro preprocessor

Although using an m4 preprocessor macro file doesn't make configuring sendmail a simple task, it is at least considerably more intuitive. For example, the cryptic sendmail.cf file described in this chapter was generated by the following text file (the etc mail sendmail.mc file) dnl This is the sendmail macro config file. If you make changes to this file, dnl you need the sendmail-cf rpm installed and then have to generate a dnl new etc sendmail.cf by running the following command dnl dnl m4 etc...

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...

Choosing the HTTP port number

Apache listens on particular ports for HTTP requests. The port that is used is set by the Port entry as follows Port The port to which the standalone server listens. For ports 1023, you will need httpd to be run as root initially. Port 80 is the default for HTTP traffic, which is why the URL http www.apache.org is equivalent to http www.apache.org . If the server is bound to a different port, the port number must be specified in the URL (for example, http video.dlib.vt.edu 90 history ). Most...

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 MylSAM and ISAM database tables, respectively. MyISAM 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...

Chess games

Redhat Chess Software

Chess was one of the first games played on computer systems. While the game hasn't changed over the years, the way it's played on computers has. The set of chess programs that come with Red Hat Linux lets you play against the computer (in text or graphical modes), has the computer play against itself, or replays stored chess games. You can even play chess against other users on the Internet using Internet Chess Servers (ICS). The xboard program is an X-based chess game that provides a graphical...

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...

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...

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)....

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...

Modifying accounts

Occasionally, a user needs more done to an account than just a resetting of the password. A person may become married and need the full name in the comment field changed. You may need to change the groups that user is in, or the drive that a home directory resides on. The usermod command is the tool for these tasks. The usermod command is similar to the useradd command and even shares some of the same options. However, instead of adding new accounts, it enables you to change various details of...

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...

Using Anyware Office

The Anyware Office Suite for Linux from VistaSource (http www.vistasource.com ) contains a full set of publishing and office-productivity applications that run under Linux. Publishing applications that come with the suite include Anyware Words This WYSIWYG word processor contains a full set of document-publishing features for editing text and formatting pages. You can also import files from many other word processors, including Word (including Microsoft Office 97). Anyware Graphics You can...

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...

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,...

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...

Check wireless settings

You can use the iwlist and iwconfig commands to check your wireless settings. The iwconfig command can give you a quick overview of your wireless settings, while the iwlist command shows you information about specific parameters you are interested in. Use the iwconfig command, along with the name of the wireless LAN interface, to see information about that interface. For example, if the wireless interface were eth0, you could type the following eth0 IEEE 802.11-DS ESSID Homelan Nickname pine...

Starting with INN

Because so much of the INN software package that comes with Red Hat Linux is already set up for you, it helps to find out first what you are starting with. Here is a quick rundown of how INN is set up for you after you install it from the Red Hat Linux distribution News user A news user is created in your etc passwd file. Ownership of news components configuration files, spool files, and commands is assigned to this user. The group name is also news. Its home directory is the news user's spool...

Configuring the INN server

The inn.conf file is where most of the general news server information is configured. For your INN news server to work, you must make several changes to this file. Most of the required changes are associated with identifying your server. However, you need to consider other changes that will have a major impact on how your server performs, what and how information is logged and stored, and the location of the directories that have newsgroup information. You add or change parameters in this file...

Monitoring parameters

The innwatch program can be set up to log INN server activities. The doinnwatch parameter indicates whether or not to have the innwatch program started from the etc rc.news script (which starts automatically when the innd script starts the INN server at boot time). The logging service is off (false) by default. Other monitoring-related parameters set thresholds for a variety of INN server attributes that the monitoring service looks out for. These include watching for free space running out in...

Allowing Users to Access Your Server

As the INN software is delivered, your server will enable anyone with a login to your local host to access (or read) the news server. Requests from all other host computers are denied. To carry this out, the contents of the etc news readers.conf file are set as follows hosts localhost, 127.0.0.1, stdin default users newsgroups * access RPA In the above lines, the auth definition defines the localhost identity as including reader connections that come from different interfaces on the local...

Disabling network services

The remote shell service is just one of many services that is handled by the xinetd process. Xinetd is a daemon that listens on a great number of network port numbers. When a connection is made to a particular port number, xinetd automatically starts the appropriate program for that service and hands the connection to it. The configuration file etc xinetd.conf is used to tell xinetd what ports to listen on and what programs to start. To disable remote shell services, edit the xinetd.conf file...

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...

The anonymous FTP user

Because most visitors to your FTP site from the Internet will not have an individual login account to your computer, the anonymous user name is used on public FTP sites. With the anonymous user name, anyone who can reach the FTP site from the network can log in to the server and have minimal permission for its use. Typically, minimal means that an anonymous user can only copy files from (and not write files to) the FTP server and that only selected directories are even visible to the anonymous...

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...

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,...

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...

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...

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....

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...

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...

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...

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...

Creating the Net Ware file server

To share NetWare services from your Red Hat Linux server, you need to use IPX protocol to communicate with NetWare clients over your physical network. A common situation is to use IPX over an Ethernet LAN (which is what is described in this section). Cross-Reference See Chapter 15 for information on setting up an Ethernet LAN. Most of the configuration of your NetWare server in Linux is done in the etc nwserv.conf file. The nwserv.conf file that is delivered with mars_nwe contains a lot of...

Other miscellaneous tools and resources

The following are some useful tools that relate to computer security. Using the Web addresses provided for each, you can usually download the software. Description The FireWall Tool Kit. A useful collection of programs and libraries for building your own firewall. Homepage http web.mit.edu kerberos www Description An authentication system for network applications. It uses Private Key Cryptography. Homepage Description A single, graphical, front-end for a variety of security tools, including...

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...

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...

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...

Select wireless options

To configure the basic options you need to get your wireless LAN working, open the Network Configuration window and edit the wireless interface that appears on the Devices tab. Follow this procedure To open the Network Configuration window from the GNOME menu, click Programs System Network Configuration. (Or, as root user, type neat& from a Terminal window.) The Network Configuration window appears. Click the Devices tab. If your card was properly detected, you should see an entry for your...

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...

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...

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...

Mailbombing

Mailbombing is the practice of sending so much e-mail to a particular user or system that the computer's hard drive becomes full. There are several ways to protect yourself from mailbombing. You can install an e-mail-filtering tool such as procmail or configure your sendmail daemon. Cross-Reference See Chapter 19 for a more complete description of sendmail. Blocking mail with Procmail The Procmail e-mail-filtering tool is installed by default with RedHat Linux and is tightly integrated with the...

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...

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...

Commercial Linux Games

Commercial software vendors believe that Linux will become a viable gaming platform. Popular commercial games like Quake, Myth II, and Civilization Call to Power all have shrink-wrapped versions that you can purchase for Linux. To support those games, video card manufacturers such as Nvidia, ATI, and Matrox offer 3D graphic accelerator drivers that work in Linux. There still aren't a ton of commercial games that run in Linux, but some of the best are making their way to Linux. To get an idea of...

Civilization Call to Power

You can build online civilizations with Civilization Call to Power (CCP). Like earlier versions and public spin-offs (such as the Freeciv described earlier in this chapter), Civilization Call to Power for Linux lets you explore the world, build cities, and manage your empire. This latest version offers multiplayer network competition and extensions that let you extend cities into outer space and under the sea. CCP is produced by Activision (http www.activision.com ), although the Linux version...

Format of the inittab file

The plain-text inittab file consists of several colon-separated fields in the format The id field is a unique identifier, one to four alphanumeric characters in length that represents a particular action to take during system start-up. The run levels field contains a list of run levels in which the command will be run. Common run levels are 0, 1, 2, 3, 4, 5, and 6 (s and S represent single-user mode, which is equivalent to 1). Run levels 7, 8, and 9 are not standard they can also be used as the...

Understanding runlevel scripts

A software package that has a service that needs to start at boot time (or when the system changes to any run level) can add a script to the etc init.d directory. That script can then be linked to an appropriate run-level directory and either be started or stopped (to start or stop the service). Table 12-6 lists many of the typical run-level scripts that are found in etc init.d, and explains their function. Depending on the Red Hat Linux software packages you installed on your system, you may...

Adding runlevel scripts

Adding the appropriate files for new run-level scripts is very similar, for both methods. After installing the binaries for the fictitious my_daemon program, it needs to be configured to start up in run levels 3, 4, and 5, and terminated in any other run level. To do this, just place a shell script called my_daemon (or some other reasonably intuitive name) in etc init.d. This script should minimally support the start and stop command-line options. For the manual method, just create the...

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 ,...

Using the cron facility

Another way to run commands unattended is via the cron facility. Part of the vixie-cron RPM package, cron addresses the need to run commands periodically or routinely (at least, more often than you'd care to manually enter them) and allows considerable flexibility in automating the execution of the command. As with the at facility, any output or error messages that haven't been redirected elsewhere are e-mailed to the user that submitted the job. Also like the at facility, cron includes two...

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...

Using TCP wrappers

Completely disabling an unused service is fine, but what about the services that you really need How can you selectively grant and deny access to these services In previous versions of Red Hat Linux, the TCP wrapper daemon (tcpd) was used to facilitate this sort of selective access. In the current version of Red Hat Linux, TCP wrapper support has been integrated into xinetd. Xinetd will look at the files etc hosts.allow and etc hosts.deny to determine when a particular connection should be...

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...

Configuring systemwide shell options

Allowing individually customizable shell startup files for each user is a very flexible and useful practice. But sometimes you need more centralized control than that. You may have an environment variable or other shell setting that you want set for every user, without exception. If you add that setting to each individual shell, the user has the ability to edit that file and remove it. Furthermore, if that setting must be changed in the future, you must change it in every single user's shell...

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...

Using a calculator

The X Calculator window (xcalc) provides the functions of a scientific calculator. The calculator can operate in modes that emulate two different types of calculators the Texas Instruments TI-30 and the Hewlett-Packard HP-10C. To start up a scientific calculator, type This starts the calculator in TI-30 mode. To start the calculator in HP-10C mode, type the following Figure 5-4 shows the calculator in two different modes. The TI-30 is on the right and the HP-10C is on the left. Figure 5-4 The...

Running Security Audits with Tiger

By now you have observed that attending to the security of your Red Hat Linux box can be a time-consuming process. Fortunately, there are some tools that help automate the more routine tasks performed in crack-proofing your system. Tiger is one such tool. It performs security audits, automatically scanning your computer for bad configuration files, altered programs, and other potential security problems. It looks for weaknesses in all the following Specific file and directory access permissions...

The aliases file

A more flexible method of handling mail delivery (systemwide rather than being specific to one particular user) involves the etc aliases file, which is also a plain-text file. The aliases file (described earlier in the sendmail.cf section) contains a name followed by a colon, and then a user name, another alias, a list of addresses, a file, or a program to which mail will be delivered. The name on the left side of the colon (which can be a valid user name or just an alias) can then be used as...

Setting Up a DHCP Client

Configuring a network client to get addresses from your DHCP server is fairly easy. Different types of operating systems, however, have different ways of using DHCP. Here are examples for setting up Windows and Red Hat Linux DHCP clients. From most Windows operating systems (Windows 95, 98, ME, and so on), you open the Network window from the Control Panel (Start Settings Control Panel). From the Configuration tab, click the TCP IP interface associated with your Ethernet card (something like...

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...

Setting the global environment

In Section 1 Global Environment of the httpd.conf file, you set directives that affect the general workings of the Apache server. Here is what the different directives are for The directives in this section affect the overall operation of Apache, such as the number of concurrent requests it can handle or where it can find its configuration files. You can choose how server daemons are spawned to handle http requests. To do that, you can set the ServerType is either inetd, or standalone. Inetd...

Introduction to SMTP and sendmail

Even with multimedia attachments and HTML encoding prevalent in e-mail messages today, the technology behind message transfer hasn't changed significantly since the early 1980s. The framework for the Simple Mail Transfer Protocol (SMTP) was initially described in RFC 821 in 1982. The protocol itself was extended in 1993 (by RFC 1425), yielding the Extended Simple Mail Transfer Protocol (ESMTP), which provides several additional commands and new delivery modes. The three parts to message...

Converting documents

Documents can come to you in many different formats. Search just some of the Linux FTP sites on the Internet and you will find files in PostScript, DVI, man, PDF, HTML, and TeX. There is also a variety of graphics formats. The capability to convert files from one format to another can be especially important if you are switching your documentation platforms from one word processing application to another. Red Hat Linux comes with lots of utilities for converting documents and graphics from one...

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...

Changing passwords periodically

Even really good passwords can be broken if a cracker has enough time to work at it. That is why periodically changing your password is an extremely good idea. This way, by the time a cracker does arrive at the correct password, it will already be changed to something different. It is even possible to set an expiration date on Linux passwords. You can use the chage command to change the expiration date of passwords on your Red Hat Linux system. For example, to set the password expiration so...

Removing print jobs with lprm

Users can remove their own print jobs from the queue with the lprm command. Used alone on the command line, lprm will remove all the user's print jobs from the default printer. To remove jobs from a specific printer, use the -P option, as follows To remove all print jobs for the current user, type the following The root user can remove all the print jobs for a specific user by indicating that user on the lprm command line. For example, to remove all print jobs for the user named mike, the root...

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 majordomo

Unfortunately, none of these wonderful features works quite yet. First, the alias database needs to be rebuilt, using the newaliases command or sendmail -bi. Next, because all mail delivered directly to a program is handled by the smrsh program, the smrsh program needs to be configured to allow majordomo's wrapper program to receive mail. To accomplish this, just create the appropriate symbolic link using the following command ln -s var lib majordomo wrapper etc smrsh wrapper I also recommend...

Getting cdrecord for writable CDs

To write CDs with Red Hat Linux you need to install the cdrecord package. This package contains components such as the cdrecord, devdump, isodump, isoinfo, isovfy, and readcd command. The cdrecord package is included with the Red Hat Linux distribution. Note The cdrecord package requires that you use a SCSI CD drive. If you have an IDE ATAPI CD drive, which is a very popular device, you maymay need to configure that drive to do SCSI emulation. See Chapter 8 for a description of how to configure...

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...

Character Based Games

There aren't many character-based games delivered with the basic Red Hat Linux installation. If you are interested in trying some of the legacy UNIX games, some of which were created many years ago, you can install the bsd-games package (which is available from Red Hat FTP sites). The games that come in the bsd-games package include simple card games, shooting games, and adventure games. As previously noted, games are stored in the usr games directory by default, so you may want to add that...