Linux Gazette

September 1999, Issue 45 Published by Linux Journal

indent

Visit Our Sponsors:

Linux Journal
InfoMagic
SuSE
Red Hat
LinuxMall
cyclades
indent

Table of Contents:

There is no Graphics Muse this month. The column will return next month.

indent

TWDT 1 (gzipped text file)
TWDT 2 (HTML file)
are files containing the entire issue: one in text format, one in HTML. They are provided strictly as a way to save the contents as one file for later printing in the format of your choice; there is no guarantee of working links in the HTML version.
indent
Linux Gazette, http://www.linuxgazette.com/
This page maintained by the Editor of Linux Gazette, gazette@ssc.com

Copyright © 1996-99 Specialized Systems Consultants, Inc.
indent

"The Linux Gazette...making Linux just a little more fun!"


 The Linux Gazette FAQ

Updated 31-Aug-1999


Contents

This FAQ is updated at the end of every month. Because it is a new feature, it will be changing significantly over the next few months.


Questions about the Linux Gazette

1. Why this FAQ?

These are the most Frequently Asked Questions in the LG Mailbag. With this FAQ, I hope to save all our fingers from a little bit of typing, or at least allow all that effort to go into something No (Wo)man Has Ever Typed Before.


2. Where can I find the HTML version of the Gazette?


3. Which formats is the Gazette available in?


4. Which formats is the Gazette not available in?

Other archive formats. We need to keep disk space on the FTP site at a minimum for the sake of the mirrors. Also, the Editor rebels at the thought of the additional hand labor involved in maintaining more formats. Therefore, we have chosen the formats required by the majority of Gazette readers. Anybody is free to maintain the Gazette in another format if they wish, and if it is available publicly, I'll consider listing it on the mirrors page.

Zip, the compression format most common under Windows. If your unzipping program doesn't understand the *.tar.gz format, get Winzip at www.winzip.com.

Macintosh formats. (I haven't had a Mac since I sold my Mac Classic because Linux wouldn't run on it. If anybody has any suggestions for Mac users, I'll put them here.)

Other printable formats.

PostScript
You can use Netscape's "print to file" routine will create a PostScript file complete with images.
PDF
I know Adobe and others consider PDF a "universal" format, but to me it's still a one-company format that requires a custom viewer--not something I'm eager to maintain. If you can view PDF, can't you view HTML?
Word
I'll be nice and not say anything about Word....

E-mail. The Gazette is too big to send via e-mail. Issue #44 is 754 KB; the largest issue (#34) was 2.7 MB. Even the text-only version of #44 is 146 K compressed, 413 K uncompressed. If anybody wishes to distribute the text version via e-mail, be my guest. There is an announcement mailing list where I announce each issue; e-mail lg-announce-request@ssc.com with "subscribe" in the message body to subscribe. Or read the announcement on comp.os.linux.announce.

On paper. I know of no companies offering printed copies of the Gazette.


5. How can I find all the articles about a certain subject?

Use the Linux Gazette search engine. A link to it is on the Front Page, in the middle of the page. Be aware this engine has some limitations, which are listed on the search page under the search form.

Use the Index of Articles. A link to it is on the Front Page, at the bottom of the issues links, called "Index of All Issues". All the Tables of Contents are concatenated here onto one page. Use your browser's "Find in Page" dialog to find keywords in the title or author's names.


6. May I copy and distribute the Gazette or portions thereof?

Certainly. The Gazette is freely redistributable. You can copy it, give it away, sell it, translate it into another language, whatever you wish. Just keep the copyright notices attached to the articles, since each article is copyright by its author. We request that you provide a link back to www.linuxgazette.com.

If your copy is publicly available, we would like to list it on our mirrors page, especially if it's a foreign language translation. Use the submission form at the bottom of the page to tell us about your site. This is also the most effective way to help Gazette readers find you.


7. You have my competitor's logo on the Front Page; will you put mine up too?

All logos on the Front Page and on each issue's Table of Contents are from our sponsors. Sponsors make a financial contribution to help defray the cost of producing the Gazette. This is what keeps the Gazette free (both in the senses of "freely redistributable" and "free of ads" :)) To recognize and give thanks to our sponsors, we display their logo.

If you would like more information about sponsoring the Linux Gazette, e-mail sponsor@ssc.com.


Linux tech support questions

This section comprises the most frequently-asked questions in The Mailbag and The Answer Guy columns.


1. How can I get help on Linux?

(A proper answer will be posted in the next issue. In the meantime...)

Check the FAQ. (Oh, you already are. :)

Questions sent to gazette@ssc.com will be published in the Mailbag in the next issue. Make sure your From: or Reply-to: address is correct in your e-mail, so that respondents can send you an answer directly. Otherwise you will have to wait till the following issue to see whether somebody replied.

Questions sent to linux-questions-only@ssc.com will be published in The Answer Guy column.

If your system is hosed and your data is lost and your homework is due tomorrow but your computer ate it, and it's the beginning of the month and the next Mailbag won't be published for four weeks, write to the Answer Guy. He gets a few hundred slices of mail a day, but when he answers, it's direct to you. He also copies the Gazette so that it will be published when the month end comes comes along.

You might want to check the new Answer Guy Index and see if your question got asked before, or if the Answer Guy's curiosity and ramblings from a related question covered what you need to know.


2. Can I run Windows applications under Linux?

An excellent summary of the current state of WINE, DOSEMU and other Windows/DOS emulators is in issue #44, The Answer Guy, "Running Win '95 Apps under Linux".

There is also a program called VMWare which lets you run several "virtual computers" concurrently as applications, each with its own Operating System. There is a review in Linux Journal about it.


3. Do you answer Windows questions too?

Answers in either the Tips or Answer Guy columns which relate to troubleshooting hardware, might be equally valuable to Linux and Windows users. This is however the Linux Gazette... so all the examples are likely to describe Linux methods and tools.

The Answer Guy has ranted about this many times before. He will gladly answer questions involving getting Linux and MS Windows systems to interact properly; this usually covers filesystems, use of Samba (shares) and other networking, and discussion of how to use drivers.

However, he hasn't used Windows in many years, and in fact avoids the graphical user interfaces available to Linux. So he is not your best bet for asking about something which only involves Windows. Try one of the Windows magazines' letter-to-the-editor columns, an open forum offered at the online sites for such magazines, or (gasp) the tech support that was offered with your commercial product. Also, there are newsgroups for an amazing variety of topics, including MS Windows.


4. How do I find the help files in my Linux system?

The usual command to ask for a help page on the command line is the word man followed by the name of the command you need help with. You can get started with man man. It might help you to remember this, if you realize it's short for "manual."

A lot of plain text documents about packages can be found in /usr/doc/packages in modern distributions. If you installed them, you can also usually find the FAQs and HOWTOs installed in respective directories there.

Some applications have their own built-in access to help files (even those are usually text stored in another file, which can be reached in other ways). For example, pressing F1 in vim, ? in lynx, or ctrl-H followed by a key in Emacs, will get you into their help system. These may be confusing to novices, though.

Many programs provide minimal help about their command-line interface if given the command-line option --help or -?. Even if these don't work, most give a usage message if they don't understand their command line arguments. The GNU project has especially forwarded this idea. It's a good one; every programmer creating a small utility should have it self-documented at least this much.

Graphical interfaces such as tkman and tkinfo will help quite a bit because they know where to find these kinds of help files; you can use their menus to help you find what you need. The better ones may also have more complex search functions.

Some of the bigger distributions link their default web pages to HTML versions of the help files. They may also have a link to help directly from the menus in their default X Windowing setup. Therefore, it's wise to install the default window manager, even if you (or the friend helping you) have a preference for another one, and to explore its menus a bit.


This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1999, Specialized Systems Consultants, Inc.,


"Linux Gazette...making Linux just a little more fun!"


 The Mailbag!

Write the Gazette at gazette@ssc.com

Contents:


Help Wanted -- Article Ideas

Answers to these questions should be sent directly to the e-mail address of the inquirer with or without a copy to gazette@ssc.com. Answers that are copied to LG will be printed in the next issue in the Tips column.

Before asking a question, please check the new Linux Gazette FAQ to see if it has been answered there.


 Wed, 04 Aug 1999 06:09:15 +0300
From: Marius Andreiana <Marius_And@usa.net>
Subject: Article idea

Hi this is Marius.

I think a very good article could be made about PostgreSQL. One which wouldn't repeat what's in the HOWTO, but present how to use it on the web, some interfaces to it ( like Java, Php3, Perl, ... ), with advantages/disadvantages, links to good sites for newcomers etc.

I used to developed some Visual FoxPro applications, but I'd like something more powerful ( and free ) for use over TCP/IP. I've read the web section in the HOWTO but I don't have the time to get the tools described there ( must learn for getting admitted in university ).

Thank you, Marius


 Thu, 05 Aug 1999 09:25:03 +1000
From: Dave Mason <91001832@snetnzwe.cpg.com.au>
Subject: Which distribution for an advanced user?

i was just curious if you had a mailing list? if you i would be very grateful if you could add me to your mailing list.. as i am interested in learning the problems and solutions of Linux and other important information.

Which distribution of Linux would you recommend for an Advanced Linux user? at the moment i am using Debian 2.0 as my root source and Redhat 5.1 as my server... I've installed and ran FreeBSD 2.8.8 but i find linux more useable...

[See the LG FAQ for the mailing list question.

I use Debian because it doesn't get in the way of the advanced user the way some other distros do. Plus I like the "designed by volunteers" aspect, and the fact that I can participate in the development process to whatever extent I want. (I'm not a developer, but I read debian-devel sometimes and worked at the Debian booth at LinuxWorld in March.)

The question is, are you dissatisfied with your current systems? If not, why switch? -Ed.]

Thanks Alot Sifer


 Fri, 30 Jul 1999 23:21:57 -0400
From: AP <adpias@golden.net>
Subject: modem

I am a new Linux Red Hat 6.0 user.

I cannot connect to the Internet (still using W98). My 3com-USR 56K voice faxmodem-V90 is not working under Linux. The serial # of my modem is 5685. It's p-n-p Sportster with jumper to set com-port and IRQ manually.

I could not get any help from Red Hat!

I am looking for anybody who can help me to make this modem working with Linux. If it is impossible, which modem should I buy?

Please help, don't leave me with Windows!

Adam


 Sun, 01 Aug 1999 04:00:26 -0400
From: Zeb Morgan <n4zm@mindspring.com>
Subject: Digitizing program

I have a ton of documents that I wish to digitize. Is there a program running under Linux that is similar to PaperPort, Pagis Pro, and/or PageKeeper?

Thanks.


 Tue, 3 Aug 1999 12:32:35 -0000
From: JUIN Aymeric <Aymeric.JUIN@DGI2000.com>
Subject: linux on a laptop

I'm a linux newbie. I installed linux (redhat 5.2) on a laptop with an ATI rage LT PRO AGP2X, and there's no driver for this graphic card to run Xwindow, I tried to find one on the web, but without success, I also tried other ATI drivers (like ATI rage pro and other MACH64 drivers) without better results. Is there any solution ? Please help me...

PS : sorry for my poor english.


 Thu, 05 Aug 1999 07:36:55 +1000
From: Dave Mason <91001832@snetnzwe.cpg.com.au>
Subject: Running Windows Programs In Linux?

Is there any way of Running Windows Applications and Programs from Linux? i've heard of dosemu, but that only supports some of the dos games, if there is such a product, could you tell me the name of it and where to get it from... and is it also multi-platform Unix?,

[This is answered in the FAQ. -Ed.]


 Thu, 5 Aug 1999 00:49:33 +0100
From: Advanced one corporation <advanced1@ibm.net>
Subject: I have a question I hope you don't mind this question, but I am a newbie at Linux Red Hat 5.2 and I am trying to find out what is a mount point and how do I define it during installation? T

A mount point is an empty directory upon which another disk partition is (or will be) mounted. When mounted, it creates the illusion that the entire partition is inside that directory. This is how UNIX handles multiple partitions, different from the C: D: E: drive letters that Dos/Windows uses.

I use Debian, so I'm not very familiar with Red Hat's installation program. I believe the partitioning dialog (Disk Druid?) has a column where you define the mount point for each partition, and it automatically creates directories as needed.

Later, you'll use mount points to access floppy disks, CD-ROMs, network filesystems, etc, the same way. The "mount" and "umount" commands (or an equivalent GUI dialog) open and close access to these devices, through the mount point directory. -Ed.


 Thu, 05 Aug 1999 00:19:16 -0400
From: M.Myszkowski <myszy@home.com>
Subject: Network with Win98

Hi,

I want to put in network my two computers. First one as a server has Win98 and is connected to the internet via cable modem (using different ethernet card).Second one - client has Red Hat Linux 5.2 Deluxe. I am a beginner with Linux and I don't know how to set up network configuration in both computers.

Thanks,
Marek


 Wed, 04 Aug 1999 22:09:27 -0400
From: Myk <mykill5@mindspring.com>
Subject: Essential Software...When will we get it?

I have been using Linux from the early days when Slackware and Debian where the kings. I have always had a dislike for Windows 3.1 straight through to Win 98; but the one thing Windows has is some great software from great vendors Like Macromedia. I switch from Windows to Linux just to use programs like Flash, DreamWeaver, QuarkXpress, as well as small programs like Rio GUI, ReBirth, etc. When can we see these programs ported to Linux? Are there any rumors of companies trying to port se to Linux? Is there a competant Emulator available that can run these programs without a problem? I now use Linux as my OS of choice. It dominates my HD and I use nothing else; but I do miss some of the great WYSIWYG HTML Editors and Flash etc...Oh well guess I will have to make do with what I got. The other thing is that I just purchased a laptop and before it is delivered is there anything I should know about installing Linux on my Laptop with minimal casulties? How should I go about installation? What about video, sound, etc...?

Thanx,

Lance Miller


 Wed, 4 Aug 1999 21:55:42 -0700 (PDT)
From: BurleyRon@aol.com <BurleyRon@aol.com>
Subject: A Request for Assistance

When I first read of Linux in a catalog, I had hopes that it would be my personal ticket out of Microsoft's sticky hands. I had hoped it would be analogous to a modern DOS or something like that. I would typify myself as an expert in pre-Windows DOS and as passable in post-Windows DOS.

Well, frankly, I hardly understand many of the words. Right away I knew I had made a mistake. This Linux is for computer jocks and developers of the first magnitude.

My question for you is, "Am I right?" Have I stepped through the looking-glass of computer literacy into the wonderland of the developmental dervish? There could be one other explanation -- I jumped into the middle of the story when I should have begun at the beginning. Is there a beginning for the computer literate person -- where terms are defined, examples are given, teachers are patient and I can begin to gradually "wean" myself from Mother Windows?


 Fri, 6 Aug 1999 12:13:28 +0100
From: Geoff Hare <geoff@hare21.freeserve.co.uk>
Subject: Setting up LINUX

I am in the process of acquiring a new PII - 450 Machine. I have decided to have 2 x 10Gb hard drives. One of these drives will be partitioned for LINUX programmes and LINUX Data.

Is these anyone in the CROYDON-CATERHAM-CRAWLEY area would be interested enough to help me carry out the installation process?

Geoff Hare (who spotted Linux some time ago and felt that it might come to something!)


 Mon, 09 Aug 1999 09:35:19 -0400
From: Rajani K Yellamanchili <Rajani.Yellamanchili@wmich.edu>
Subject: Unix Startup

Dear Administrator:

I am a student at Western Michigan University, and am currently collecting resources for the startup tasks performed by unix/linux. I request you to help me if you can. I state my exact requirement below.

I am looking for all the files invoked/used by the init process at startup, when a work station boots up in a network. I am also looking for the organization of the /etc directory and its probable contents.

Looking forward for your reply, I remain

Regards
Raj

The boot loader starts init, which reads /etc/inittab. See man 8 init, man 5 inittab. Most distributions follow the Linux Filesystem Standard for the sake of interoperability. A newer document is the File Hierarchy Standard; the distributions have not yet implemented this, but are expected to in the near future. http://www.pathname.com/fhs/ The runlevels use configuration files in or near /etc/init.d and /etc/rc.d. The "System V" method is used by Debian and Red Hat. In it, /etc/init.d contains scripts named after a package. Symbolic links in the /etc/rc*.d directories (numbered according to runlevel) specify which services should be started or killed when switching to that runlevel. The "BSD" method is used by older (and current?) Slackware systems: /etc/init.d doesn't exist, and /etc/rc*.d are scripts (one for each runlevel) which handle the starting and stopping of services. -Ed.


 Wed, 11 Aug 1999 18:38:04 +0000
From: R. Smith <rsmith13@tampabay.rr.com>
Subject: Why are they trying to telnet in to my Linux box?

Sir,

Recently I noticed that, most every time, my niece used her Win 95 computer (on my lan), I would start getting a lot of telnet attempts to my Linux masq box. Most of them were from dalnet.somthing.or .other. So I sent email to several of them asking why they were trying to telnet to my box. Here's the reply that I got from one:

Jason wrote:

Dear Sir or Madam, The "attack" you have seen is not an attack at all, but a check for an open Wingate or SOCKS server on your computer. Toledo Internet Access is the host of glass.oh.us.dal.net. We have recently implemented a policy of checking users on connect for open Wingate and SOCKS servers to attempt to cut back in the abuse of Dalnet via these often abusive services. We apologize for any inconvience this may have caused you. Jason Slagle Network Administrator Toledo Internet Access Raistlin_Mejere - CSOP - Dalnet IRC Network

It seems that every time a client connects to a irc server, the server tries to telnet into the client's box! This is about the dumbest thing that I have ever heard of! I don't like having my intruder alarm go off at 2 am because my niece wanted to use irc. I don't like anyone trying to telnet in to my box for any reason! No sir, I don't like it at all.

I suppose I will have to turn irc access off for my niece.

--
Rick,
The Linux Gazette Editor wrote:

Hi. This will be printed in the August Linux Gazette at the end of the month. In the meantime... I don't use IRC, SOCKS or WinGate, so I can't say whether they're being reasonable or not.

This is something new that the irc servers, all have started doing in the past few weeks.

Of course, you can always comment out telnetd in inetd, if you don't otherwise need it.

I only allow telnet in from local machines (via hosts.allow). I have everything else turned off in inetd per standard practice. I have host.deny setup to log all incoming attempts and wavplay to sound an alarm. (I haven't had any trouble since getting Road-Runner but I've been port scanned a few times with my previous IP.) I just wrote a new log script that will skip the alarm if the in.telnetd attempt is from a "know" dalnet server. (So I can get some sleep!) It still logs the suckers though!

I'm not sure whether [disablling telnet] would cause the IRC servers to refuse service or not...

I doubt it, they are use to working with win 95. How many 95 boxes are running incoming telnet service? That's what they are trying to find out.

[Have other people had problems with IRC authentication recently? What are the servers doing and why? Why should they care whether Win95 boxen are running telnetd or not? -Ed.


 Fri, 13 Aug 1999 04:42:18 +0500
From: Zahid Mannan Butt <zmbutt@hotmail.com>
Subject: Sis6326 Driver

I am new user on Lunix IS There any way to configure my SIS6326 8Mb AGP card for lunix? Even I contect to the vendors but they can't Help me. Please If you Know something about to configure it tell me other then sis.com.tm/driver/driver

Thanks
Zahid Mannan Butt


 Fri, 13 Aug 1999 14:19:13 +0530
From: regan <to_regan@hotmail.com>
Subject: Help Help

Hi!

I've installed RedHat 6.0 and have a SiS 6215 display card. During installation, I had to specify the card details as Red Hat was unable to detect it.

Now in Gnome, my display is larger than my monitor screen. I can only see the top 4 icons on the desktop. Also when I open any folder, the size is four times my screen size. Is there any way I can change my resolution or find support for this particular card. I've tried the SiS home site and redhat.com but there's nothing available there. If anyone has any info as to how I could solve this problem, contact me at to_regan@hotmail.com

Thanks
Regan <regan@irpl.com>
India


 Fri, 13 Aug 1999 06:08:47 -0700
From: Bobby Prater <bprater4@bellsouth.net>
Subject: Problems with the speed my computer connects and scrolls while connected to my phone line.

Is it possible the phone line we had installed solely for internet use could slow my computer down? I have 400mhz and 128 meg ram, We decided since all other ideas failed we would try what a friend suggested and just bring my hard drive to their home and see if we had the same problem, Amazingly it performed as it should I was so happy thinking when I came home it would do for me as well as when on his phone line; IT DID NOT!!!! it's as poky as ever. I have tried connecting to ebay.com to view and bid on some items for over three hours and after we connect an error message pops up as I'm waiting for their reply, I have never had this problem. I'm ready to quit because it is impossible for me to find spare time in the bulk presently required to use the net. I am completely out of solutions to try so please if you have any ideas or suggestions email me

please! Any help will be greatly appreciated.
Thank You,
Mrs. B. Prater


 Fri, 13 Aug 1999 16:16:38 +0000
From: R. Smith <rsmith13@tampabay.rr.com>
Subject: Re: Why are they trying to telnet in to my Linux box?

Linux Gazette wrote:


 Sat, 14 Aug 1999 06:04:01 PDT
From: Zahid Mannan butt <zmbutt@hotmail.com>
Subject:

I read your message Kindly I thanks you to response me but I try to configure the driver from www.suse.com (both) but I am fail Tell some other than www.suse.com this one I am really thanks you again Zahid Butt

______________________________________________________ Get Your Private, Free Email at http://www.hotmail.com


 Sun, 15 Aug 1999 18:16:03 PDT
From: Joe Bubba <gundog1@hotmail.com>
Subject: RedHat 6.0

To whom it may concern,

I am trying to download RedHat 6.0 from a mirror site but WSFTP.exe errors out. It errors out in the \misc directory. The files that cause the errors look like part binary or part folder icons (a file that contains a directory structure). I am using WSFTP32.exe on a Win95/NT machine and my goal is to copy the files to a hard drive and burn them to a CDROM later.

The only information I could find was to create a mirror, then copy the files to a CDROM.

Any help would be greatly appreciated,

Rob
gundog1@hotmail.com


 Mon, 16 Aug 1999 09:00:42 -0700
From: Douglas Nichols <dnichols@fhcrc.org>
Subject: Concerning the Toshiba 8000

I have installed Red hat 6.0 distribution of Linux on my Toshiba 8000. I have not been able to boot into any runlevel except 5, otherwise linux doesn't seem to respond to the keyboard- I believe this has something to do with the mouse. Everything else is working fine with apm I am using gnome. The pcmcia card was a problem, but I finely upgraded to 3.0.14 and everything seems to work well now. Periodically some process doesn't allow to umount the disk( I think it's gnome) and when I reboot, I have to fsck. If I can provide you with a ccopy of any of my config files just e-mail me.

--
Cheers, dn


 Mon, 16 Aug 1999 20:08:34 -0400
From: Mulualem Takele <m.takele@worldnet.att.net>
Subject: MS WinModem Linux

Before a month I purchased a Dell Dimension XPS T450 Pentium (r) III PC with US Robotics 56K Voice Win (soft ware driven) Modem. Unfortunately, I realized now that the modem I ordered is not supported by Redhat/Linux 6. Now, I am wondering if there is anything I have to do so that I can run Netscape Navigator on Linux. If not, what possibilities do I have?

[Get another modem. Until the winmodem manufacturers release Linux drivers, or provide enough technical info so we can write our own drivers, that's your only choice.

In any case, a winmodem is not a complete modem. Several hardware parts are missing, which are emulated by the Windows driver. But why waste CPU time and memory doing something the modem should be doing? Look for a modem that says it will work with UNIX, DOS or Macintosh as well as Windows. If it can work with anything besides Windows, it should be OK. The US Robotics Sportster series is good, as are other brands. (PS. US Robotics is owned by 3Com. So if you see a 3Com modem, it's the same as a US Robotics modem.) -Ed.


 Tue, 17 Aug 1999 01:55:51 EDT
From: <HUEBRIGHT@aol.com>
Subject: 466 dell

When I try to mount my CD ROM and floppy through my system it says it is unable. I am running my CD ROM through a sound blaster 16 help

Jim


 Tue, 17 Aug 1999 19:12:49 +0900
From: hansy <sysop@ultari.co.kr>
Subject: Can you tell me the way to adduser by cgi-script?

hi. This is seyong from Korea.

I have so many users above 60,000, and now i have to make them the shell id.

can you tell me the way to adduser by cgi-script? i will be waiting and waiting for your reply.

if you can't, i'm so thank you.

my website is http://www.ultari.com (now under construction because of the +cgi-script). and now i'm using the redhat linux 6.0. thank you. The Linux Gazette Editor wrote:

Hi, Seyong. This will be published in the September Linux Gazette on August 31.

Just to make sure I understand your question: You want a form and a CGI script that runs the "adduser" command?

I do not know of any. There are Linux products which allow central administration of a network, and some of them have web interfaces, but I do not know the names of the products.

You can of course write a CGI script yourself which runs adduser, or hire a programmer to do this. But allowing a CGI script to run as root (which it would have to, to have permission to run adduser) is a potential security nightmare. Be sure the program analyses its input very carefully before passing it on to "adduser".

hi, this is seyong han. i'm so thanks for your replying. i want to adduser by web interface. the program will run as root mode. i made an java application to run the cgi. it will run as root mode. so i want the cgi program it get id and password and then add user to +/etc/passwd.

[Is there any existing code to do this? -Ed.


 Wed, 18 Aug 1999 18:10:55 +1000
From: Cooma School of Music <csm@cooma.snowy.net.au>
Subject: Downloading Redhat 6

Hi there. Sorry about the From, but I can't seem to change it. I really want to have Redhat linux, but it's been hell trying to find a document how how to download it. I assume these are in packages or images or something. Could you possibly publish a guide on how to download it, or could you tell me the location of a how-to.

-- SK


 Thu, 19 Aug 1999 09:24:20 +0200
From: Carlo Vinante <vinante@igi.pd.cnr.it>
Subject: upgrade problem

Hi ti everybody.

I would ask some help on a problem recently occourred to me during an upgrade of my system. I ran SuSe 5.3 very smoothly until I decide to upgrade it to rev. 6, with kernel 2.2.1. then I have encountered two problems : 1) I'm not anymore able to print, except using the copy command to the printer. The aps filter is configured for my printer (a HP Dj 550c); the lpr command doesn't "exist". 2) no sound .....

Does anybody know a good "rule of thumb" to avoid these kind of problems when performing an upgrade ?

Thanks to everybody

Greetings Carlo


 Sat, 21 Aug 1999 02:07:53 -0500
From: Lawrence A. Bombac II <Lawrence_A_Bombac_II@lor.net>
Subject: hey

would you be able to direct me to a place that will give me the source code for linux,or could you send it to me yourself,preferably a version that is not copyrighted,if that makes any sense

[Do you mean the Linux kernel or an entire distribution?

The source code to the Linux kernel is available at FTP sites all over the world. A list of major sites is at www.kernel.org/mirrors. See also the www.kernel.org home page. This is the core of the Linux system, or what differentiates Linux from all other operating systems. I cannot email it because it is 14 MB big.

However, you need more than just the kernel to have a useful computer system. You also need hundreds of third-party programs and utilities. The easiest way to get a hold of the source code to all these programs at once is to buy or download a Linux distribution. Be sure the product says it "includes source". Before downloading an entire distribution of several hundred megabytes, remember that it's often cheaper and more convenient to simply buy a CD instead.

The Linux kernel and the vast majority of programs included in any Linux distribution are copyright according to the GNU Public License (GPL) www.gnu.org/copyleft/gpl.html or to a similar license which allows the copying and distribution of both the source code and compiled programs without asking anybody's permission or paying royalties. In fact, the GPL in particular *requires* that any company that sells a GPL'd program (and the Linux kernel is GPL'd) *must* make the source code available. -Ed.


 Sun, 22 Aug 1999 03:28:18 +0200
From: Philippe COVAL <philc@writeme.com>
Subject: Question: HD brute format

Question: HD brute format

How to format a disfunctional HD ? (hum, i know the "buy a new one" solution)

how to low level format it ? partitioning can't be aplied using fdisk ?

whazup?


 Sun, 22 Aug 1999 21:33:30 -0400
From: Robert Rocconella <roko@worldnet.att.net>
Subject: module not found

I have installed Mandrake 6.0 on a P166 system. It runs fine except for. I have a 4mm DAT Archive PYTHON drive, booting off a SCSI 1Gig drive. On bootup when the system looks at my Buslogic controller and identifies devices, it shows the tape drive as st0. The unit was in the system when I installed it. BUT during the bootup it will report module not found when it gets to the part where I assume it is trying to initialize the driver used to access the st0 device. I have been looking thru various sources of documentation but cannot find a reference to the module not found problem or where to install it from. Thanx in advance.


 Mon, 23 Aug 1999 11:38:21 -0000
From: JUIN Aymeric <Aymeric.JUIN@DGI2000.com>
Subject: RE: linux on a laptop I'm a linux newbie. I installed linux (redhat 5.2) on a laptop with an ATI rage LT PRO AGP2X, and there's no driver for this graphic card to run Xwindow, I tried to find one on the web, but without success, I also tried other ATI drivers (like ATI rage pro and other MACH64 drivers) without better results. Is there any solution ? Please help me...

PS : sorry for my poor english.

The Linux Gazette Editor replied:

Can you use the standard SVGA driver?

Aymeric responded:

No, it works so bad. it seems to interlace about 5 vertical stripes on the screen. I think several linux-users have this problem, because ATI rage LT pro is a widely used graphic card on notebook.


 Mon, 23 Aug 1999 22:57:18 -0400
From: wible <wible@uplink.net>
Subject: installing linux on laptop.

i'm trying to fegure out haw to install linux on my laptop.but i can only have a floppy or a cd-rom.they use the same slot.so how do you istall a cd without a boot floppy? I'm comleattly new to this OS.please advise.


 Tue, 24 Aug 1999 22:52:01 +0200
From: Hans Borg <Hans.Borg@Physics.umu.se>
Subject: Color depth 8/16 and Xlib

Hi everybody,

I am not sure this is the right forum, but if anyone can give me some hints to solve the problem or give an alternative FAQ-site it would be utmost appreciated.

I have written a number of Xwindow applications for special purposes. They do all run without any problems if the Xserver is configured for a color depth of 8. Actually those applications do not need many color- map entries (less than 10). However, for other applications like xv and netscape a color depth of 16 is preferred. There are no problem to run eg. xv and netscape with a depth of 16 (I guess they set up their own colormap). But if in depth 16 then my own applications can't set up its color entries. The idea is to be able to run simultaneously both my own applications and applications like xv,netscape with a reasonable color resolution.

To set up my colors I basically do:

	screen=3DDefaultScreen(display);
	   colormap=3DDefaultColormap(display,screen);

	XLookupColor(diplay,colormap,"color",exact_color,screen_color);
	
or alternatively
	XAllocNamedColor(.....);

When in depth 16 both XLookupColor and XAllocNamedColor both raises the Xerror: BadValue (parameter out of range) ... something like this. I don't know which parameter causing it and apart from display it must be colormap or "color". It is hardly "color" and if so it must be the colormap. I have checked the "visual" on colormap and it seems OK. I have also tried XCreateColormap(...) and other "give it a chance" methods but I am stuck.

So, please, anyone having an idea, let me know.

With my best regards.

Hans.


 Tue, 24 Aug 1999 18:57:47 -0500
From: Amy Bellows <enigma99@earthlink.net>
Subject: ls color

Hi, I have a small yet annoying problem. I'm running RedHat Linux 5.2, and I'm still fairly new to the whole OS.

I can't get ls to display defined extensions in my chosen colors, although it does color directories, executables, etc.. I have tried changing definitions in /etc/DIR_COLORS, and get nothing. Is there something I'm missing?


 Fri, 2 Jul 1999 00:18:00 -0400
From: Coleman, James (GEP) <james.coleman@gepex.ge.com>
Subject: color ls headache

OK. I've used Linux for just over a year but have a problem with one of three Linux PCs in our household. On one, a 486DX 50, I get color ls on every user ID except one. I've configured /etc/bashrc as usual (alias ls = "ls --color") and as I've done on each of the other Linux boxes. An ls command produced a colored display with every user except one! I've tried adding an ls alias to that user's own .bashrc file but nothing helps. If I type "ls --color" as that user, I get color! Without it, black and white. What might be going on and what should I look for?

The problem PC is running RedHat 5.2 with all the errata upgrades. Stock kernel, though... The other PCs are all running version 6 (stock kernels).

Thanks!!!


 Wed, 25 Aug 1999 20:21:07 +0100
From: helen <helen@dougal1.freeserve.co.uk>
Subject: Suse Linux 6.1

Hi All, I am a new user (possibly) who is having problems setting up xf86config. I have an old IBM PS1/50 which has an xga-2 video card in it, (2 megs mem on card). After trying a lot of the video card database entries, it still refuses to work. All other parameters in xf86config are correct. Has anyone any idea which driver is compatible for the ibm xga-2 video card?

The problem starts when I type STARTX. In most cases I get a screen which is nor resolvable, or, I get the following message:

The file XF86_xxxx (binary of X-Server) does'nt appear to be a binary file.
Please check it or / and install a new X-Server binary.

Regards to All.
Geoff <Geoff_G0GLW@yahoo.com> Geoff_G0GLW@yahoo.com


 Mon, 30 Aug 1999 20:58:36 -0300
From: Carlos Massolo <litos@ciudad.com.ar>
Subject: Problems with Diamond SpeedStar A50

I am new to linux and learning fast. I just got one problem when I use startx or kde my screen just shows Black and gray stripes. I have a Diamond SpeedStar A50 AGP card and a Samsung SyncMaster 3Monitor. I tried the Options nolinear, noaccel and swcursor and none worked. Any help would be great.

Litos


 Wed, 25 Aug 1999 12:48:22 -0400
From: wible <wible@uplink.net>
Subject: Re: installing linux on laptop.

i'm trying to fegure out haw to install linux on my laptop.but i can only have a floppy or a cd-rom.they use the same slot.so how do you istall a cd wethout a boot floppy?i'm comleattly new to this o/s.please advise.

The Editor wrote to Wible, and Wible responded, adding:

it sez cdrom includes caldera open linux 1.3 and staroffice 4.0... and no my laptop doe's not boot to cd. is there a way to start the install from dos using a command line or somthing? and can you install over a network card in pcmica by booting to the floppy?

[You can install it over the network if you have another computer that can act as an FTP server. Or as a NFS server, if your installation program supports installing via NFS.

As far as having a DOS/Windows command that installs Linux (LINUX.EXE?), people have talked about this theoretically, but I don't think it's ever been tried. -Ed.


 Thu, 26 Aug 1999 10:41:58 -0400
From: Mark Jenkins <jenkinsm@mint.net>
Subject: USR 33.6 Modem Help

I am running redhat 6.0, I have tried to my modem going in minicom (say already online) I have tied in the KDE PPP dialer (get modem busy error) I have tried setting and the jumpers for coms 2,3,4 with coresponding IRQs. Each time I do set the modem com port in the control panel. Any help would be great, I assume it may be a string command, I just can't seem to find anything on it.

Thanks Mark


 Thu, 26 Aug 1999 17:58:38 IST
From: Bala Krishna H.V. <balak@pushpak.india.hp.com>
Subject: Telnet would not work

I installed Linux on my PC successfully.But when I try telnet or ftp to log on to the PC I get the error "login incorrect". I tried changeing the password and even removing it.But no use. Finally I changed the default shell to sh.Still I can't log on. Could you help?

--
With Regards,
Bala Krishna


 Thu, 01 Jul 1999 07:40:36 +0200
From: Christopher Richardson <rdn@tara.n.uunet.de>
Subject: Help Wanted - How to best install glibc onto an existing system

I have the SuSe 5.1 distribution on my machine which works fine - as I do not want to fix a running system I need some advice on how to best install the glibc package on my machine. Newer software is linked usually written to be linked to this package. My computer is busy compiling the glibc package, but I am going to wait until I hear from someone before I install.

Thanks Chris Richardson


 Fri, Jul 02, 1999 at 12:15:06AM -0400
From: robert Nuzum <rnuzum@earthlink.net>
Subject: Unzipping commands

I would like some info on good sources about how to run commands, especially when unziping files. I'm trying to get some sound on Netscape but can't seem to get the downloaded x-audio file to be recognized in order to unzip it. I'll probably stumble upon the solution after playing around with it, but shortcuts would be appreciated.

I have SuSE Linux 6.1 installed.

Bob

[There is an unzip command which will unzip *.zip files. If Netscape won't unzip it on the fly, you may have to save it to a file and unzip it yourself.

There are several books now which give an overview of Linux commands. Try your local bookstore. -Ed.]


 Wed, 4 Aug 1999 23:46:00 -0700
From: Mark Wagnon <mwagnon1@home.com>
Subject: Article Idea: Setting up Procmail

Hi,

I found the article "Setting Up Mail for a Home Network Using Exim" (July 99) extremely helpful on setting up mail services for my home network. How about a follow up on using procmail to filter mail into separate folders?


 Sun, 29 Aug 1999 22:09:56 -0400
From: Steve Allen <steveallen@earthlink.net>
Subject: Publishing Dynamic IP address on startup

I have my Linux machine hooked to an X-10 teleresponder so I can dial-up and turn the Linux box remotely, and I have it set to dial my ISP as soon as it boots. I want to publish the dynamic IP address given by my ISP to my home page as soon as I connect. I've been successful getting the dynamic IP address by referring to the variable $4 in the script "/etc/ppp/ip-up" that's called by pppd. The problem is FTP'ing it to my homepage. When I try FTP'ing with a script containing the following line from the command line as root, it works fine (I have my logon/passwd and init macro defined in .netrc in my Linux home directory for root).

ftp ftp.homepagesite.com

However, when I insert the above line in my "/etc/ppp/ip-up" script, nothing seems to happen as my homepage is not updated with the new IP address. Any suggestions on how to easily publish my dynamic IP address as soon as I log on? Thanks.



From: peter <peter@anet.lv>
Subject: IDE Zip drive

Hello! I have some problem! How I can Install ZIP-Drive ATAPI verssion?


 Tue, 10 Aug 1999 22:25:57 EDT
From:Symeon Vafiadi <>
Subject: AOL and minicom

How do I dial from Linux using minicom having an AOL account? Everytime I dial in it asks me for my login and when I put in my login name it says incorrect login.


General Mail


 Fri, 27 Aug 1999 20:04:32 +0200
From: Bjorn Eriksson <mdeans@algonet.se>
Subject: SV: Ooops, your page(s) formats less-optimum when viewed in Opera (http://www.operasoftware.com/)

[Bjorn wrote in to say that recent issues of the Gazette (starting with #39, April 1999) do not format properly under Opera. Is anybody else experiencing this? Any clues about how to make Opera happy? Here are sample screenshots of the middle of the screen:

Opera
Internet Explorer

Opera is a commercial web browser for Windows. A 30-day evaluation version is available at www.operasoftware.com. The Linux port is 25% complete; ports to other platforms are also in progress. -Ed.]


 Sun, 08 Aug 1999 17:43:37 +0530
From: Prakash Advani <prakash@freeos.com>
Subject: FreeOS.com

Hello,

I am posting this message to thank Linux Gazette for publishing my article last December and all the readers who have responded positively and helped in developing our website www.freeos.com

The site is finally up and running and is being updated regularly. Any more people willing to help can e-mail me.

Regards,
Prakash


 Fri, 13 Aug 1999 02:14:21 +0200 (CEST)
From: Roland Smith <rsmith@xs4all.nl>
Subject: Re: Ramdisk for Linux

Hi Mark,

I've got a quaestion about your ramdisk article.

AFAIK Linux uses all the memory that is not in use by programs as a unified buffer-cache. So I'd guess that all frequently used files will probably be cached in RAM, assuming you've got enough RAM.

So why go to all the trouble of using ramdisks? Is there really an substantial speed increase?

Regards,
Roland


 Thu, 19 Aug 1999 00:49:03 -0400 (EDT)
From: Nicholas Bodley <nbodley@shell2.tiac.net>
Subject: Original definition of bench mark

It's quite possible that this is a surveying term, for accurately-located reference markers embedded into the ground; these are used as working references when doing a survey. I'm just about sure you'll see bronze domes (almost flat), maybe 4" in diameter, surrounded by concrete, with their exact latitude and longitude (and altitude?) marked on them. Tampering with them is a criminal offense, I believe.

Sorry not to offer much help in how the term came to mean what it does to the computer community; perhaps the idea of comparing to a reference explains it.

Any surveyors "out there"?

Regards to all.


 Sat, 28 Aug 1999 19:01:31 -0500
From: DENNIS L PHIFER <den1317@intellisys.net>
Subject: inconsiderate

My opinion you have to much stuff on the net . U got in the way of my search. Out of 391 u had at least 350 . Hope your paper goes under with highest malice.


 Sun, 29 Aug 1999 11:40:20 -0400
From: Mark Moran <mmoran@mmoran.com>
Subject: DNS for home network

I just wanted to drop a quick note of thanks for the article: "DNS for the Home Network" in the August 1999 (Issue 44) issue of the Linux Gazette. I had tried on several occasions to setup bind on my home Linux server only to become frustrated and give up after hours of work. Well thanks to your succinct and accurate article my home DNS server is working great now for a few hours!

Mark Moran


This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1999, Specialized Systems Consultants, Inc.
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


News Bytes

Contents:


News in General


 October 1999 Linux Journal

The October issue of Linux Journal will be hitting the newsstands in mid-September. This issue focuses on embedded systems.

Linux Journal now has articles that appear "Strictly On-Line". Check out the Table of Contents at http://www.linuxjournal.com/issue66/index.html for articles in this issue as well as links to the on-line articles. To subscribe to Linux Journal, go to http://www.linuxjournal.com/subscribe/ljsubsorder.html.

For Subcribers Only: Linux Journal archives are now available on-line at http://interactive.linuxjournal.com/


 TuxFinder.com Launched

TuxFinder.com is a Linux-dedicated group of search engines designed to help you find anything you need as a Linux user. Whatever you are looking for: packages, RFCs, FAQs, or HOWTOs, TuxFinder.com can help you. TuxFinder.com is also a mirror for the Linux Documentation Project. With both English- and French-language capability, it is growing in popularity on both sides of the Atlantic due to its simplicity, power and efficiency.

Co-founder Olivier Macchioni said about TuxFinder.com: "As a Linux user,I wanted something like this, and wondered how easy it was to program. Well, it's easy and fun - and hopefully useful for some other Linux users too."


 [Debian logo] Debian chooses new logo

The Debian project has chosen "The Swirl" as its new distribution logo.
Actually, a pair of logos was chosen. This is the "open use" logo, which anybody can use to refer to Debian with. The "official" logo is only for Debian-endorsed products. It shows the swirl rising up like smoke out of a genie's bottle. See www.debian.org/logos/ for more samples of both logos.


 Corel preview Corel LINUX

San Jose, California August 10, 1999 -- Today at LinuxWorld in San Jose, Corel Corporation (NASDAQ: CORL, TSE: COR) unveils its distribution of the Linux operating system, Corel LINUX, to the public for the first time.

Corel LINUX is based on the Debian/GNU distribution of the Linux OS and includes the K Desktop Environment (KDE). In its distribution, Corel has enhanced the graphical user interface and created a new installation program that greatly simplifies the installation process. A beta version of Corel LINUX will be available in September 1999, and the first release is planned for the end of the year.

Corel LINUX will be available as a stand-alone product and will also be bundled with the upcoming WordPerfect® Office for LINUX suite, which is expected to be available in early 2000. The prices for both the stand-alone version and the suite will be announced at a later date.


 MandrakeSoft announces North American Support

Dallas, TX August 17th, 1999. MandrakeSoft SA, publisher of the popular Linux-Mandrake, announced today the selection of Bynari Systems Group to provide Mandrake's customers in North America with complete support services.


 Upcoming events

Atlanta Linux Showcase
October 12-16, 1999
Atlanta, GA
http://www.linuxshowcase.org

COMDEX Fall /
Linux Business Expo

November 15-19, 1999
Las Vegas, NV
http://www.comdex.com/comdex/owa/event_home?v_event_id=289

http://www.zdevents.com/linuxbizexpo/

A more complete list of events is at www.linuxjournal.com/events/index.html


 Operating System Supertest

The massive Operating System Supertest, held by reviews 'r' us has begun work today, and Linux still looks set to be the star of the show. Still, the Supertest as a whole should a good read, and with a bit of luck draw more people away from the windows domination. This supertest has over 30 Articles and interviews, and countless reviews of free, and commercial software. With over 40 volunteers offering their services, the date of publication has been reduced to the end of August.

We still need help with this supertest though, and if you feel you could help at all, in any way, please email Sandy Smith ( sandy@reviews-r-us.com )and offer your services. We need this to be the biggest, best ever definition of Operating Systems, and a comparison of many types, and articles that everyone from beginner to expert will find interesting.

Current roles needing filled: PR person, Artwork, reviewing of software.

Do you need more info? Background info? please please tell me if you do


 O'Reilly releases Perl CD Bookshelf

Sebastopol, CA--Arguably the best Perl books in print--"Programming Perl", "Learning Perl", "Perl in a Nutshell", "Perl Cookbook", "Learning Perl on Win32 Systems", and "Advanced Perl Programming"--are now available on a single CD ROM in the immensely convenient "Perl CD Bookshelf" by O'Reilly & Associates.

Together these 6 books would retail for $199.70, but the "Perl CD Bookshelf", which includes all 6 on a searchable CD-ROM as well as a hard copy of "Perl in a Nutshell", sells for only $59.95.

For more information about the book see: http://www.oreilly.com/catalog/perlcdbs/


 Tru64 UNIX and LINUX Update

Tru64 UNIX & LINUX JumpStart
Las Vegas, NV September 8-10
Orlando, FL November 1-5

Due to popular demand, ISA has extended it's UNIX JumpStart to include LINUX, the fastest growing Operating System in the World.

The Digital UNIX JumpStarts have been a huge success. Students have raved about this unique training venue which has enabled them to get a quick and comprehensive immersion into UNIX technology in a time efficient manner. Check out our website for the new LINUX Track and the new and updated Tru64 UNIX courses.

www.softadv.com/UNIX/Digital_UNIX_JumpStart/Tru64_UNIX_&_LINUX_Home_Page.htm


 Ziatech introduces LinuxPCI Development System

Ziatech Corporation, the leading innovator of applied computing solutions for telecom and Internet applications, introduced today the first in a series of LinuxPCI development systems, a rack mount CompactPCI=AE development platform using the Linux(tm) operating system. Designed to speed the development of carrier-grade computing applications, the new LinuxPCI 1000 Development System for Applied Computing combines the reliable, open CompactPCI architecture with MontaVista Software's Hard Hat(tm) Linux software. Open CompactPCI platform for OEM fast-track development Original equipment manufacturers on the fast-track to develop Linux-based applications for DSL systems, PBX systems, IP telephony, voice processing, and other telecom and Internet equipment, now have an open architecture platform designed with the bandwidth, reliability and features those applications require. The LinuxPCI 1000 comes with the first version of Linux designed specifically for embedded applications. The Hard Hat Linux operating system from MontaVista Software, Inc. (Sunnyvale, CA, www.mvista.com) combines the cost-effectiveness, openness and flexibility of Linux with the reliability and responsiveness required for embedded and applied computing applications. MontaVista will supplement the operating system's enhancements with comprehensive technical support, porting and customization services.


 Clustering for TurboLinux

TurboLinux is releasing the industry's first high-availability clustering software solution for the enterprise-TurboCluster Server. TurboCluster Server is the industry's FIRST Linux clustering application available and scalable for Web servers on Intel and Alpha architecture platforms. Unlike Beowulf clustering systems that are designed for highly specialized scientific computing applications, TurboCluster Server delivers clustering technology for Linux servers running mission-critical Web applications. For Net businesses, the availability of TurboCluster Server offers, for the first time, a low-cost alternative to proprietary and more expensive Microsoft NT and UNIX cluster solutions. Additional information on TurboCluster Server, including a white paper and FAQ, is available at www.community.turbolinux.com.


 Linux Webdrive available

SAN DIEGO, Aug. 8--StoragePoint.Com announced that it now offers a Linux version of WebDrive, providing secure file management features never before available to Linux users.

Linux WebDrive from StoragePoint becomes the only Web-based file manager offering automatic folder management, encryption, compression, with integrated e-mail, calendar, and contact manager. The free service is compatible with Netscape 4.5+ and Linux version 2.2.

For more information see storagepoint.com.


 GBdirect Delivers UK's Largest Ever Linux Training Programme?

Release Date: 11th August, 1999.

GBdirect and Planet Online, both leading players in the European market for Linux skills and services, today announced what is believed to be the UK's biggest ever Linux training programme. Over the next six weeks, 60 delegates from Planet Online will attend GBdirect's basic, intermediate and advanced courses in Linux Systems Administration. The students will be engineers and technical staff from Planet's Leeds headquarters, the home of Freeserve, and already the greatest concentration of Linux expertise in Europe.

The GBdirect's company web site is at www.gbdirect.co.uk and their Linux training site is at www.linuxtraining.co.uk. The Planet Online web site can be visited at www.theplanet.net.


 Linux Press book: The Best of Linux Distributions

PENNGROVE, CA (August 16, 1999) Linux Press today announced the second title in its new Linux Resource Series. Designed to provide comprehensive documentation for the latest Linux distributions and concepts, the Linux Resource Series enables users of all levels to access Linux information.

The Best of Linux Distributions is based on Matt Welshs cult classic Linux Installation & Getting Started. Revised, expanded, and updated, The Best of Linux Distributions includes a general introduction to Linux; detailed explanations of drive partitioning, filesystems, and software package installation; distribution-specific instructions for installing Debian GNU/Linux, Slackware, Caldera OpenLinux, and Red Hat Linux; a complete, low-stress Linux tutorial; system administration under Linux; X Window; and Networking.

Also included are 4 CD-ROMs containing the latest Linux operating system for Red Hat Linux, Caldera OpenLinux, Debian GNU/Linux, and Slackware.


 Linux System Solution Limited (LSSL) and INFOMATEC - IGEL Asia LTDP cooperate

Linux System Solution Limited (LSSL) and INFOMATEC - IGEL Asia LTD have today formally announced their co-operation in the Internet device, Thin Client and Networking arena.

IGEL Asia LTD will endeavour to promote, market and educate customers towards a complete Linux based Thin Client / Server solution based on TurboLinux's product ranges complementing IGEL's Firmware. LSSL will help promote, support, develop application solutions and, provide maintenance and support services in the use of Thin Clients for corporate, commercial and educational use.

LSSL and IGEL will co-operate in the localisation and development of Chinese applications and solutions via their respective engineering and research departments.

Linux System Solution Limited is a strategic partner of TurboLinux who are deemed as the major Linux player in the Asian Market. The Japanese version of TurboLinux has been outselling Microsoft Windows and this trend looks set to continue throughout the Asian Region.


 TurboLinux partnership with Enlighten Software

SAN FRANCISCO, Calif. (August 9, 1999) - TurboLinux and Enlighten Software Solutions, Inc. (Nasdaq: SFTW), announced today a strategic partnership to bundle the first enterprise-ready workgroup systems management software for Linux with the full line of TurboLinux products.

TurboLinux will be bundling a full multi-platform working version of EnlightenDSM administration and event management software on its entire product line for immediate, single-point management of all TurboLinux machines. In addition, the bundled product is immediately ready for customers to monitor and manage their existing heterogeneous Linux, UNIX and Windows environments from the same single console.


 32BitsOnline.com to Develop UnixApps.com

Vancouver, BC - August 19, 1999 - Medullas Publishing Company, parent company of 32BitsOnline Magazine, and Linux Applications announced its new upcoming site, Unix Applications (www.UnixApps.com), today.

The new software download portal will merge Linux Applications and include applications from all Unices including FreeBSD and Herd operating systems. Moreover, Unix Applications will also feature applications from BeOS and other operating systems.

Unix Applications will feature a brand new interface and will be rolled out along with 0x20.com and linuxtalks.com this Fall.


 Network giants install Linux-based test bed

Chicago, IL (August 23, 1999) -Linux continues to receive solid backing from major players, with Cabletron Systems, Xylan and FORE Systems installing network test equipment based on the popular open-source software. Designed by benchmarking specialist Neal Nelson & Associates, the Network Stress Test is the first large-scale tool to use real clients and servers to send actual network traffic at very high bit rates. The speed and bandwidth capacity of the Linux platform, coupled with Nelson's unique testing methodology, enables manufacturers and potential buyers alike to evaluate new products using the most extreme, real-world network traffic patterns.

Unlocking the power of Linux "Linux is an excellent operating system for large clusters of computers," comments John Hynds, Director of Systems Engineering for Xylan. "It has very efficient LAN drivers, can generate high volumes of network traffic and comes with a full set of client and server application software. Also, there are no additional licensing charges when it is installed on a cluster with any number of individual machines. It is a very powerful and cost-effective option."

Real network traffic provides superior testing While other testing methods generate artificial packets of data from simulated applications, Nelson's breakthrough in network testing enables technicians to quickly and easily configure thousands of real clients talking to thousands of real servers in a laboratory environment. Billions of bits per second of real network traffic are generated by the technique, and the network throughput can be immediately analyzed to uncover problem areas.

"This type of testing makes a lot of sense," says Kevin Brown, Senior Marketing Director for Cabletron. "Using high volumes of real network traffic is completely different from, and in some ways superior to, testing with artificial traffic generators. Neal Nelson's method assures us that we have put our products through the most realistic stress test possible."

Automated test execution: the Network Stress Test is a fully automated benchmark that can conduct long and complicated tests with just a few clicks of the mouse. Vendors can now conduct quality testing more efficiently, ensuring that their products are of the highest reliability before they are released in the market. This automation significantly improves on the industry standard 30-minute tests, which needed to be re-set manually.

The Network Stress Test runs on a cluster of Linux-based computers with multiple local area network adapters in each machine. The infrastructure can support 10,000 simultaneous user sessions and perform a variety of common network activities like web browsing, Telnet/Rlogin sessions, FTP file transfers, email, streaming video and multicast communications.

Neal Nelson, founder of Neal Nelson & Associates, originally developed the testing infrastructure for use at the US Army Technology Integration Center in Fort Huachuca, Arizona. He comments: "Modern networks are being challenged to handle increasingly complex loads that include huge volumes of World Wide Web traffic, audio streams, video streams and multicast data. These rapid innovations in network technology required that we develop similar advances in network testing techniques. The result is our Network Stress Test - one tough test that can assure vendors and buyers that their products won't let them down in high-traffic, real-world conditions."

About Cabletron: Cabletron Systems is a pioneer in high-performance computer networking and provides dependable network access and communications to millions of people worldwide. With scaleable products designed for Fortune 1000 enterprise networks, service providers and small businesses, Cabletron provides simple, reliable and cost-effective business solutions for the information age.

About FORE Systems: FORE Systems is a leading global supplier of high performance networking solutions. FORE's Networks of SteelT deliver the increased capacity, resiliency and scalability necessary to build networks that last. Thousands of enterprise and service provider customers worldwide have put FORE Systems' solutions at the heart of their networks.

About Xylan: Xylan is an Alcatel company focused on developing powerful internetworking products for enterprises and service providers. For enterprise customers, Xylan's networks are so powerful that they can bypass an entire generation of network change. They combine ease of management, high performance, and easy integration with existing equipment and software. For service providers, Xylan builds equipment for high-speed multi-service VPNs. Xylan's solutions integrate broad connectivity options, advanced software for partitioning and security, and any-to-any switching. Xylan helps service providers build profitable networks.

About Neal Nelson & Associates: Neal Nelson & Associates is an independent testing and consulting company founded in 1973. It is not affiliated with any manufacturer or vendor and offers a number of products and services including the Business Benchmarkâ, the industry's premier multi-tasking artificial batch benchmark. The firm has its primary office and a testing laboratory in Chicago. Neal Nelson & Associates' client list includes companies such as: FedEx, IBM, McDonald's, Northern Telecom, Sprint and major government agencies including the Internal Revenue Service, US Department of the Air Force, US Department of the Navy and US Department of the Army.


 Aspen Systems ships 64-bit Alpha Linux

Wheat Ridge, Colorado, August 23, 1999 - Aspen Systems, Inc., a leading high-performance computer designer and integrator, has commenced shipping its Twin Peaks® II line of 667MHz, 64-bit dual-Alpha 21264 processor workstation, server, and cluster solutions.

Twin Peaks II is a ruggedized line of custom solutions that incorporates the world's fastest microprocessor technology with high-performance hardware and the latest Linux and Tru64 UNIX versions to create performance-optimized solutions for key markets such as scientific, multimedia, ISP, and other critical applications. At SPECfp95 53.7, Twin Peaks II offers not only the fastest Linux and UNIX processing, but also a price/performance ratio that is up to eight times better than its nearest competitor.


 News from LinuxMall

Here at LinuxMall.com we've finally unleashed our new web site, and we're very pleased with the results. We've added tons of new features, and improved old ones.

Legislative Lunacy

Some very scary pieces of legislation are floating around these days. The National Conference of Commissioners on Uniform State Laws (NCCUSL) has voted in favor of The Uniform Computer Information Transactions Act (UCITA). The UCITA would deregulate software licensing - something that would allow software publishers more power and guarantee the end user even fewer rights.

[For more information about this, see Shrink-Wrapped UCITA on the Linux Journal web site. -Ed]

Linux and Education

Two Open Source projects focusing on education have been initiated recently. SEUL-EDU is part of the Simple End User Linux project and provides a mailing list and central Homepage for all aspects of educational uses of Linux, by teachers, parents, and students. You can find out more about SEUL-EDU at: www.seul.org/edu/

The OpenClassroom Initiative has announced a distribution and server tools designed to be of use in an educational environment. All of the materials are available free of charge and are under the GNU Public License. You can check out the OpenClassroom Inititiative at: www.openclassroom.org/developers

--------------------------------------------------------------------------------

Cracking Windows2000 beta

Eric S. Raymond comments on Microsoft's latest publicity stunt: putting a Windows2000 beta machine on the Net and daring anyone to crack it. Someone did, apparently, but it wasn't up long anyway - it promptly crashed under the load. Eric explains why he doesn't think that Windows is a platform that's capable of being secure or stable.

More Linux Newsletter articles. Distributed via GPL.


 Seagate is Linux-compatible

COSTA MESA, Calif., June 28, 1999 -- Seagate Technology, Inc. (NYSE: SEG) today announced that its entire line of tape backup drives has been certified with Linux, which is quickly gaining momentum as a powerful network operating system for servers. After thorough testing, Seagate received certification on its Hornet Travan, Scorpion DAT and Sidewinder AIT tape drives through the Linux tape certification program, managed by Enhanced Software Technologies, Inc., (EST).


 PC-Tel software modem

San Jose, CA - August 2, 1999 - PC-TEL announced the availability of the industry's first Linux-compatible software modem. This newest version of PC-TEL's popular host signal processing (HSP) technology will facilitate the availability of low-cost, Internet-enabled devices featuring the Linux open-source operating system.

HSP modems offer leading hardware OEMs a faster time to market, higher system reliability and a lower cost of manufacturing. Perhaps more importantly, these solutions are much more flexible than traditional hardware modem technology, enabling easy modem upgradeability and international customizability through simple software changes. The Caldera OpenLinux 2.2 version and Red Hat Linux 6.0 of PC-TEL's Linux-PCI based MicroModem are available immediately to OEMs developing systems requiring Internet access.


 Linux Links

Linus announced his intention for a kernel code freeze to pave the way for Linux 2.4. (Most of the discussion in this thread is about the state of the ISDN drivers.) "Linus the Libertator" -- a San Jose Mercury-News interview with Linus that discusses his background, family and life. DVD drives and Linux: the current state of the art. DVD is also mentioned in an article by Bill Bennet in this month's Gazette.

Linux Not Mission Critical Ready? IBM says 'think' again. ZDnet article. Thanks to LinuxMall for bringing this to our attention.

Scary airport photo.


Software Announcements


 Sun acquires StarOffice, makes it available for download

Sun Microsystems has acquired Star Division, the German company who made the StarOffice office suite. For a free download or a $9.95 CD (plus shipping), point your browser to sun.com.

Sun plans to make the application suite more web-centric, so that you can use it via a web browser.

The source code will be available through Sun's Community Licensing program to encourage industry-wide collaboration on future versions of the software.


 C.O.L.A software news

OpenDIS -- Open Digita Services 0.0.2. A library and utility program for cameras such as the Kodak DC-220 and DC-260 that run Flashpoint's Digita Operating system. The utility ("ks") is a simple command-line program for standalone downloading, taking, deleting of photos and querying and moding the camera.

r2d2 uses a configuration file rather than the symlinus of System V Init.

FTP site
ftp.guug.de/pub/members/truemper/r2d2/
Mailing list
www.guug.de/lists/
Rationale
www.guug.de/lists/r2d2/msg00012.html

Weekly Linux Newsletter. No spam, no advertising, just heaps of Linux tips, tricks and news from the world of Linux. subscribe@thebits.co.uk.

Hinv produces a concise hardware inventory of your system. GPL.

KStock -- a KDE stock ticker.


 H-P Openmail to support Linux

PALO ALTO, Calif., Aug. 2, 1999 -- Hewlett-Packard Company today announced that OpenMail 6.0, HP's strategic business-messaging and collaboration solution for UNIX(R) system computers, also will support the Linux operating system. By supporting Linux, OpenMail 6.0 will provide its upgraded functionality and e-services(1) capabilities to the growing number of Linux-based businesses, offering a low-cost alternative to other enterprise-messaging solutions.

HP expects OpenMail for Linux to be available in September. A free beta version is available now on the Internet at http://www.hp.com/go/openmail.

"HP believes that many Linux-based businesses need the type of proven enterprise capabilities that today's OpenMail customers enjoy," said Nigel Upton, general manager of HP's OpenMail business. "OpenMail gives the Linux community a compelling alternative to 'generic' Internet e-mail servers."

In addition to robust Internet e-mail-standards support, the Linux edition of OpenMail will include rich support for Microsoft(R) Outlook (including full wide-area calendar/schedule access) and OpenMail 6.0's new Web client.

More OpenMail information is available at on the web at http://www.hp.com/go/openmail.


 Voice over IP from Vovida Networks

First Free Open Source (GNU LGPL) MGCP and RTP Stacks Running On Linux Operating System Available from Vovida Networks

MGCP is a protocol used for controlling Voice over IP (VoIP) Gateways from external call control elements. MGCP is the emerging protocol that is receiving wide interest from both the voice and data industries. RTP is a protocol used to carry streaming real-time multi-media data over IP Networks.

For further information about Vovida Networks, support packages and downloading of the MGCP and RTP stacks, please visit the Vovida Networks web site at www.vovida.com. Download code at www.vovida.com/sub_mgcp.html and www.vovida.com/sub_rtp.html.


 Cygnus Shipping Code Fusion IDE for Linux

LINUXWORLD, San Jose, Calif., August 09, 1999 - Cygnus Solutions, the leader in open-source software, announced today it is shipping Code Fusion*, the industry's highest performing(1), most complete Integrated Development Environment (IDE) for Linux developers. Code Fusion IDE makes it possible for developers familiar with programming on Windows platforms to quickly become productive in developing applications for Linux.

With Code Fusion, Cygnus combines the latest Cygnus-certified, open-source GNU tools release with an intuitive graphical IDE framework. It features a C, C++, and Java tools project manager, editor, graphical browsers and the Cygnus Insight debugger.

Code Fusion IDE is priced at $299. For more information see www.cygnus.com/codefusion.

Cygnus also announced version 2.0 of its GNUPro Development Kit. See www.cygnus.com/linux for details.


 Magic Software news

At a press conference held at the LinuxWorld Expo in San Jose, Jack Dunietz (CEO of Magic Software Enterprises), announced that Magic had ported its award-winning e-commerce solution (eMerchant ) to the Linux platform.


 Intel LANDesk Management Suite

AMERICAN FORK, UT, Aug. 9, 1999 -- Intel Corporation today announced it has extended the Intel LANDesk Management Suite to provide support for Linux-based systems. A new software module for Intel LANDesk Management Suite 6.3, available today for download from the Internet, enables IT managers to inventory the hardware and software assets on Linux-based laptops, PCs and servers and take remote control of those systems when diagnosing or repairing problems. "As many of our customers deploy Linux-based systems throughout their organizations, especially for web, e-commerce and file and print servers, it is imperative that they have the tools to manage and maintain these heterogeneous environments," said Ed Ekstrom, vice president and general manager for Intel's Systems Management Division. "Intel is committed to supporting IT managers across the application environments they support."


 HELIOS slashes cost of network computing

August 10, 1999 =8B Garbsen, Germany HELIOS Software GmbH, a leading vendor of network and prepress server software, announced a new 5-user version of EtherShare to retail at just $1,490 USD.

Helios EtherShare 2.5.1 offers state-of-the-art file, print, font, mail and timeservers with extremely fast AppleTalk routing, AppleShare IP file transfers, and user friendly remote administration. And, when combined with PCShare, EtherShare OPI 2.0, PDF Handshake and Print Preview, the Helios server suite provides a true cross-platform solutio n that can handle even the most demanding networking and printing environments.

Smart Ideas for Better Networking HELIOS software products support the UNIX and Pentium-based Linux operating systems, in addition to Apple Computer's new Mac OS X Server platform.

Helios products run on powerful and scalable servers from Apple Computer, Data General, Digital, HP, IBM, Motorola, a wide vareity of Pentium-based CPUs, SGI, and Sun, providing reliable cross-platform support for Macintosh, DOS/Windows, Windows 2000, Linux and UNIX-based clients. Distributors sell Helios products worldwide to value-added resellers who provide complete networking solutions to customers. Helios software products are also available as part of OEM solutions by many major vendors in the prepress industry.


 Stalker CommuniGate Pro 3.1

MILL VALLEY, CA - August 9, 1999 - Stalker Software, Inc. today announced the version 3.1 of their hi-end CommuniGate Pro messaging system. CommuniGate Pro is a Unified Messaging Server which supports most major operating systems. CommuniGate Pro is recognized for its many features, high speed and reliability.

Since its first commercial release in September 1998, Stalker has expanded the operating systems it supports to include Linux/LinuxPPC, Solaris, FreeBSD, WindowsNT, MacOS X, BSDi, AIX, D/Unix, and IRIX. On all platforms, CommuniGate Pro presents the same interface and uses the same file formats, allowing any organization to switch server platforms in less than an hour.

CommuniGate Pro can support 100,000-200,000 accounts from one server making it a viable solution for small to mid-size ISP's. For extra large ISP's handling millions of accounts, CommuniGate Pro offers clustering support.

In addition, the new 3.1 version of CommuniGate Pro supports Personal Web Sites with automated publishing. Users can create their own Web sites and upload web files to the CommuniGate Pro server using any composer application that supports the HTTP PUT method (like Netscape(r) Composer). Besides, Personal Web Sites can be updated using simple HTML forms. Support for uploading via the CommuniGate Pro FTP server should follow in the next release.

CommuniGate Pro supports secure connections for all services it supports. Not only the HTTP services (Web Administration and WebUser interface to E-mail) can be used via secure internet connections, but all other communications, such as IMAP, POP, SMTP, LDAP, ACAP can be secured.

There is a Free Trial Version available at www.stalker.com/CommuniGatePro/.


 Giganet cLAN (MPI Software Technology)

At Linux World, Giganet announced that MPI Software Technology, Inc. will distribute its cLAN server cluster interconnects for Windows NT and Linux. The cLAN cluster interconnects, combined with MPI Software Technology’s MPI/Pro (Message Passing Interface) software, enable compute-intensive applications to scale at new levels of performance at a very low-cost.

Applications such as weather modeling, fluid flow analysis, real-time ray tracing and molecular modeling, traditionally have been run on supercomputers. Through the clustering of high-performance Windows NT servers or Beowulf Linux clusters, engineers and scientists can achieve the advantages of speed and availability, leverage the latest technologies and lower costs. The clustered systems work in parallel on a scientific challenge, coordinating with each other on the intermediate results. The combined MPI/Pro and cLAN solution enables high-speed passing of messages among systems, with minimal delay.


 Udanax (Xanadu) hypertext system now open source

Monterey, California(August 23, 1999): Ted Nelson announced today that the source code for a working implementation of the Xanadu hypertext system are being made open source for developers. Udanax.com -- formerly Xanadu Operating Company (XOC, Inc.) -- released the code and will serve as the focal point for continuing development and application of these powerful hypertext systems.

In 1960, Nelson, who coined the term "hypertext", envisioned a revolutionary system of publishing. He foresaw the power of publishing over computer networks like the World Wide Web but his original vision exceeded the capabilities of the Web. Nelson termed this vision "Xanadu" and has sought to implement it through numerous efforts. Udanax is the result of some of this effort.

With the Xanadu schemes developed by Udanax.com:

According to Nelson, "The Web is a foam of ever popping bubbles, rather than stable literature." The key technical difference between the Udanax implementations of hypertext and the WWW mechanism (HTML) is in how connections between documents are tracked. In HTML, the links are embedded in the document itself and are essentially named by the location of the machine where the document is stored. Move the cited document -- the link breaks (404 errors). In the Udanax systems, the connections between documents are managed independently of the documents using sophisticated software algorithms.

The Udanax development efforts focused on the "back-end" or server component of the software. By making Udanax open source, developers can work on "front-ends" or browsers for different applications. "Rather than focusing on a glossy user interface, the Udanax team has focused on building a complex and robust system to manage the information." Gregory said. To date, over 1,500 developers have indicated interest in developing applications for the Udanax system.

udanax.xanadu.com


 Memory-resident Anti-Virus Protection for Linux

Moscow, Russia, July 15, 1999 -- Kaspersky Lab, a fast-growing international anti-virus software development company, reports the release of beta-version of world's first memory resident virus interceptor for Linux - AVP Monitor.

AVP Monitor for Linux is a client part of AVP Daemon that intercepts all file operations (starting, opening and initialisation of modules) and checks objects for viruses. Constant presence of the program in computer's memory allows reliable control over all possible ways of virus attacks on a computer or corporate network. Besides, AVP Monitor makes anti-virus defense very convenient and easy to use: it is enough to install and launch the program each time the computer starts.

A beta-version of AVP Monitor for Linux is available free of charge at Kaspersky Lab's WWW site at www.avp.ru.

Kaspersky Lab is a fast-growing international company with offices in Moscow, Russia, Dublin, Ireland and Cambridge, UK. Started the business in 1992 is has concentrated in development of world-leading anti-virus technologies and software.


 Other software

CodeWizard for C++ 3.0

Linda and Paradise, parallel and distributed computing development tools, by Scientific Computing Associates, Inc.Trial versions of the software are included on Red Hat's Applications CD, part of Red Hat's Official Linux 6.0 operating system.


This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1999, Specialized Systems Consultants, Inc.
Published in Issue 45 of Linux Gazette, September 1999

Contents:

(!)Greetings From Jim Dennis

(?)Linux to NT PPP Connection Over Null Modem
(?)Printing --or--
Printing to old "Pin Printer"
(?)Internet Access Control --or--
Limiting Internet Access through Cable Modems
(?)unix question --or--
Quotas on a Sublet Web Server?
(?)Mars NWE --or--
MarS NWE: HOWTO and Docs in English?
(?)java curses library and jxterm? --or--
Old Question Revisited: Java Curses Support
(?)RH6 Virtual Email - POP3 problem --or--
Virtual E-mail Domains
(?)Setting up Windows and Linux --or--
Dual Booting without Re-Partitioning
(?)LINUX File System Standard. --or--
/bin vs /sbin and the FHS Revisited
(?)How to Print 2 pages on 1 sheet --or--
Saving Trees: Laying up Multiple Pages per Printer Sheet
(?)Telnet trouble --or--
More "Can't Telnet Around My LAN" Problems
(?)Getting on the Internet --or--
Getting Access to the Internet
(?)Cash In On ... Spam!

(!) Greetings from Jim Dennis

So, I spent half of the month in Japan. The first week that I was there I was too busy, tired and disoriented to get any e-mail.

So my column this month is a bit thin. Of course there is this one message that's pretty long. I think it's the second longest I've ever written here. The longest was on Internet Routing. That one is being used as supplemental reading for a couple of college course from what I hear. This one is not likely to join it.

Meanwhile I still have about 3000 messages in my backlog folder which will take some going through. Luckily I use MH, so I'll probably develop a script to process most of the routine stuff.

Speaking of "routine" Mike Orr, and Heather have taken steps to reduce the number of "routine" questions we get here in Linux Gazette. They've created an FAQ and an index to all of my previous "Answer Guy" questions. I haven't seen it yet --- but hopefully we can convince people to use it. There are about 900 questions that I've answered listed.

That, and the fact that the WebGlimpse engine at Linux Gazette (http://www.linuxgazette.com) seems to be working at last, might help people answer alot of their own questions (which is the whole reason I put so much time into TAG anyway).


(?) Linux to NT PPP Connection Over Null Modem

From Neal Gieselman on Wed, 28 Jul 1999

Hello,

You got any tips on how to get Linux to connect to NT over a null modem cable? We intend to eventually replace the null modem with a wireless connection.

Neal Gieselman

(!) I don't know anything about supporting NT PPP. I've never used it. For the Linux end you'd just use the directive "local" instead of "modem." So, look for a similar option among the NT GUIs and dialogs. They might have a "modems" or "serial ports" control panel which might have a "null" or "direct" entry in the list of supported modem models. Try that first.
Call MS technical support for info on making any sort of null modem PPP connection (ask them how to make two NT boxes connect over a null modem cable). Whatever they suggest --- if it is standards conformant PPP or even close --- Linux should be able to cope with it when you replace one NT endpoint with your Linux system.
Why isn't there an NT answer guy?
You'd probably be better off installing ethernet cards in the two boxes in question, and running a cross-over cable between them.
Questions to the rest of the readership: Are there any short-haul modems out there that provide the same interface as a basic Hayes compatible modem? Are there any devices which emulate dial-tone (TM), DTMF signaling and ring/busy signals? (Such telco wire simulators would obviously be quite handy for teaching PPP and other modem skills in a class room setting).

(?) Printing to old "Pin Printer"

From Philippe on Mon, 26 Jul 1999

Hello Answerguy!

I have been unable to print with Applixware 3.5. I am using RH6.0 and my printer is an (old) NEC pinwriter. I use the Epson LQ850 driver with Windows. Of course, it is not a Postscript printer. I checked all the How-To but I am still clueless. Could you please help?

Thanks in advance. Philippe.

(!) Install Ghostscript. This will implement PostScript on your system, and it's drivers will convert that to pin rasters that most printers can handle.
Once you have Postscript emulation working, you can feed your Applixware output to it through the normal lpr/lpd (BSDish) print filtering facilities (as listed in your /etc/printcap file).

(?) Limiting Internet Access through Cable Modems

From Chris Dahl on Fri, 20 Aug 1999

(?) I have a Linux box set up at home that is connected to the Internet through a Cable Modem. Myself and my kids share this connection through IP-Masquerading using Windows Clients. Is there a program, or option that will run on Linux that will allow me to control when they use the Internet and for how long?

Or is this better controlled through the workstation?

Chris

(!) There isn't an option or program that I know of. However, it should be possible to write some.
To limit them to specific times of the day I'd just set up a set of cron jobs that periodically remove and replace the routes and packet filters between your kids' systems and the Internet.
Let's say you give the kids' systems IP addresses like 192.168.2.*, and you give your own systems 192.168.1.* addresses. Now you can have cron jobs that add packet filtering REJECT statements that prevent the masquerading system from forwarding packets from the 192.168.2.0 network.
The exact rules would depend on your needs and the version of the Linux kernel that was running on your router.
Setting up limits own now long their connections are allowed to persist would be more challenging. I'd probably look at doing that using DHCP --- where you'd assign each kid's system an IP address (via it's ethernet MAC address) and you configure the leases so that they expire in a set time. Then you hack the DHCP daemon's code a bit so that it refuses to reissue those specific IP addresses within some other set time period (say, one day).
Another approach would be to hack up a copy of diald to just add and remove routes/IP masquerading entries (read through the sources, find out where it's calling the PPP daemon and replaces those system() calls --- or whatever they are, with your own calls to the ipfwadm or ipchains utilities. The same code that adds your masquerading entries can also use an 'at' command to schedule a time to remove them).
These don't sound like horribly difficult programs to write --- although it might be easier and ultimately more effective to enforce your household rules through old-fashioned parental supervision.

(?) Quotas on a Sublet Web Server?

From Tim Pellett on Fri, 20 Aug 1999

AnswerGuy,

I found you on the internet and was wondering if you could answer my question/problem.

I am renting space on a Unix/Apache server and am at the user level. We are allowed to redistribute the space given to us and I want to set up file quotas. I do not want to give space to other people w/o setting up file size limits.

I asked the ISP and they said I can do it myself using 'file quota software'. I cannot find such a product for a unix/apache server. Everything is Win 95/NT etc. I cannot use the quota command b/c I do not have access to sys admin files.

Do you have any suggestions? I have been trying to figure this out for months now, and am getting frustrated!

Thanks, Tim

(!) Let's see if I got this right ... you have some virtual hosted web space (not a co-located server but an account on your ISP's web server). They somehow allow you to create further accounts in your virtual space. You want to do this, and to apply quotas to those sublet accounts.
I can't help but ask the obvious economic question, why would someone go through you to get this service rather than getting directly from your ISP? Is there really enough wiggle room in the margins for an arbitrage opportunity here?
In any event, getting back to the technical question...
You don't mention which version of UNIX you are using. Suppport for system quotas is one of those things that varies considerably from one version of UNIX to another.
If your ISPs support people say it can be done with software that they know of --- please press them for the specifics.
My guess would be that the solution would depend quite a bit on which version of UNIX this system was running, and a bit on the specifics of their account management system. If they are providing you with your own chroot jail, and giving you access to create your own UNIX accounts within that jail, they'd have to be providing some pretty hairy clones to a large number of administrative utilities in order to have any chance of maintaining any semblance of system security.
(Technically all of the account management in UNIX is done in user space. The kernel only respects UIDs and GIDs for making access determinations. Consequently, you could theoretically create almost any sort of account management scheme you wanted, if you were willing to rewrite enough of the utility and library infrastructure to support it. I doubt they've done this, so I have serious misgivings about the security of their approach).
Of course I'm guessing that you're talking about some sort of relatively generalized shell/FTP/mail support for these "sublet" user IDs.
If you're willing to force your customers to go through a custom interface to update their web pages (and you're constraining them solely to web page publication) you could use somewhat simpler models.
Let's assume that you are only interested in web page publication. I'm guessing that the account management then boils down to something like a set of CGI/PHP scripts that allow users to update their accounts (and manage the usernames, passwords, directory structures and any accounting data that you maintain).
You'd also be providing some sort of mechanism for them to upload their new web masterpieces. Whatever mechanism you provide to do this (presumably a set of CGI programs or scripts) can perform the quota calculations and implement your policy enforcement. It seems like quite a lot of custom coding to duplicate a set of functions that are already provided by the underlying operating system.
All in all it seems like it would be much easier and not much more expensive to co-locate a server of your own at some ISP site. Then you could use established OS system features and utilities to manage all of this.
Otherwise I can see a general solution to your question that doesn't involve an utter lack of security on the part of your ISP. If they essentially give you 'root' access to this shared server then you have to ask what protection they are offering their customers from one another. That becomes a question of how they are protecting your customers from their other customers (some of whom might be your competitors in this bizarre multi-level ISP scheme).
I notice that you don't actually say you're trying to sell this space to other people. The technical problems are the same in any event.
In any event you'd have to provide quite a bit more details about what version of UNIX this ISP is using, (and keep in mind that I'm the Linux AnswerGuy so Solaris, AIX, and other UNIX questions may be ignored), about what account management mechanisms they are using, about which services you intend to provide and about what mechanisms and protocols you intend for them to use in updating their web pages.

(?) MarS NWE: HOWTO and Docs in English?

From Paul Sullivan on Fri, 20 Aug 1999

Hi Jim,

I'm not sure if it's fair to address this question to you, but I've drawn a blank everywhere.

No one seems to ever make mention of the Netware emulator for Linux "Mars" (in english anyway). I've done a few searches on the web, and can only find communication in a foreign language. Is there anywhere (group of english folk) that discuss mars?

Regards Paul Sullivan

(!) Hmm. It looks like you're right. Martin Stover, the author of MarS NWE (and presumably the person after which it gets its first name) seems to be German (or at least the pages I looked at list a .de e-mail address for him).
I did find some docs and READMEs in English at a mirror site in Columbia University:
http://omnicam.cs.columbia.edu/linux-docs/mars-nwe-0.99pl10
But that looks like the same files you'd get from the package itself.
It looks like your best source of information is the IPX HOWTO (http://metalab.unc.edu/LDP/HOWTO/IPX-HOWTO.html) which seems to cover it reasonably well.

(?) Old Question Revisited: Java Curses Support

From Wilson Yeung on Fri, 20 Aug 1999

Hello James,

I don't mean to be too critical -- afterall, I realize that you must be faced with many emails and deadlines when writing your articles for The Answer Guy.

Still, I thought I should point out that you didn't help Spencer T. Kittelson when he asked for a "Java equiv. of a C curses library". You pointed him to Java terminal emulation applications like JXTerm or SCO's Tarantella. If he was asking for a java telnet program, I'm sure JXTerm would have been a good answer. Unfortunately, he wasn't (I think the use of the words "curses library" gives it away here).

(!) That's an old one. I remember that I searched around quite a bit on the net for the suggestions that I did give him. SCO's Tarantella is closed source, of course. I remember that part of what I was looking for was an open source Java terminal emulator (on the silly idea that this might be built over a curses-like library).
Come to think of it, how hard would it be to port ncurses to Java? Of course you have to get Java to provide a terminal interface (which is why I started with the suggestions that related to that).

(?) In actual fact, he was asking for a framework/library for developing terminal applications in the Java Programming Language. In other words, he wanted to be able to write in Java something like PINE or "top" or irc-ii, but without Swing or AWT and relying solely on a user having only terminal capabilities.

-Wilson

(!) Oh! That is a different interpretation of the question.
Using Java to write curses mode programs? Well, that would be nice --- but I don't think it will gain any attention. I'd think that C and Python and PERL have that space pretty solidly sewn up.
Python seems to have pretty decent curses support, and it has many of the same OO features and dynamic protections that Java promises. Meanwhile text-mode/curses support seems so far away from Java's core focus that it seems like an unlikely avenue for future development.

(?) Virtual E-mail Domains

From Netvigator on Fri, 20 Aug 1999

Dear Answerguy,

I recently install RH6 and use linuxconf to add virtual email domain as well as POP3 account. I test it with sending email to that virtual email domain and sucessfull without returning mail. However, I cannot retrieve mail using POP3. Can you give me any idea about that ? (The DNS setup is OK since the Web virtual domain can function properly).

Regards

(!) When you send mail to the account into which you are funneling this virtual e-mail domain traffic, is the spool file created under /var/spool/mail/?
Is it a normal mbox file (a text file with a series of e-mail messages concatenated together, delimited by lines of the form ^From ....*)?
Does your POP daemon work for any of your other accounts?
What mail client are you using? Does 'fetchmail' work when you use it to fetch your POP mail from localhost?
Are there any messages in /var/log/messages that might be related to any of this?
You'll have to at least isolate the problem to the MTA (mail transport agent, presumably sendmail) or the MSA (mail storage agent: presumably UW's IMAP/POP3 daemon package), or the client/delivery agents (procmail, fetchmail, or whatever you're using).
Once you've isolated a problem down to the relevant subsystem you can then work on isolating it to a specific operation. Is your POP3 daemon being started by TCP wrappers, tcpd (almost certainly)? Is tcpd preventing the access from your client (quite a common problem)?
The fact that this is being done through linuxconf doesn't offer me any clues. I've only played with linuxconf very briefly, and so far I don't like it and wouldn't trust it to set up a virtual e-mail domain.
Is it generating a .mc file for sendmail? I don't want to see a sendmail.cf --- those are too long and too tedious to read. However, if the mbox file(s) are being properly created under /var/spool/mail as you expect then you don't need to worry about the MTA at all.
Incidentally, the fact that your virtually hosted web server works doesn't actually eliminate the possibility of DNS problems. It could be that you have MX records pointing to never-never-land. Those would take precedence over the A records (which are all that are required for web browsers to resolve your server's IP address).
Try doing a bit of troubleshooting to isolate the symptoms in more detail. That will probably make the problem more clear and suggest a solution.

(?) Dual Booting without Re-Partitioning

From John Vance on Fri, 20 Aug 1999

Until I migrate fully to Linux, I want to keep Windows 95/98 installed, due to the fact that I do all my school assignments on my Win98 OS. Is there an easy way to dual boot besides using any of the partitioning software? I am studying UNIX/Linux at College and need to be able to do this so I can study and further investigate Linux

(!) Well there are several options for you.
First you can install a "Mini-distribution." There are several distributions of Linux which can be installed in a subdirectory of your MS-DOS or Win '9x system and started via LOADLIN.EXE.
Linux supports a filesystem driver called UMSDOS (including UVFAT for FAT32 and VFAT drives under Win '9x). This allows Linux to store and use UNIX filesystem semantics (including ownership, group association, and permissions) under MS-DOS compatible filesystems. It's even possible (with the hackery employed by these mini-distributions) to mount a subdirectory of your C: or other MS-DOS compatible drive as the root filesystem under a Linux kernel.
The most popular Mini-distribution these days is probably Kent Robotti's DOSLinux. You can find that at:
DOSLinux at Tux.org:
http://www.tux.org/pub/people/kent-robotti

[ You could also try ZipSlack:
http://www.slackware.com/zipslack
It's designed to fit on a ZIP cartridge, and uses UMSDOS. -- Heather ]

That's probably the easiest approach. Of course there are other options. You could install a second (or third or fourth, etc.) hard drive. In that case you wouldn't need to re-partition. Just put your Linux filesystems on some parts of the new drives. (Of course you can devote the whole new drive to Linux if you like).
I'd still use LOADLIN.EXE. The difference here is that you're only storing a copy of the LOADLIN.EXE program and a copy of any kernels that you want to boot on your C: (or other MS-DOS) drive. The Linux kernel can be told to mount root filesystems off of any drive that it can access (through its built-in drivers, or via the drivers and programs stored init its initrd, initial RAMdisk). There is no constraint that requires a Linux kernel to be located on the same filesystem or even on the same drive or physical system as it will be mounting for its rootfs.
Yet another option would be to convert your system fully over to Linux. Then you'd purchase and install VMWare or one of its clones. You'd use it to create a Win '9x partition and re-install your copy of Win '9x under that.
This is a relatively new option. Also VMWare is not free or open source software. However, it does seem to be much more usable than the currently available free software in the same class (Bochs, WINE, etc.).
One of the founders at Linuxcare (http://www.linuxcare.com : where I currently work for my "day" job) chuckles every time he gets a "blue screen of death" under NT --- as he kills that Linux process and boots up a new virtual machine.
(I also know one guy who is running a copy of Linux under a VMWare virtual machine that's running under a different distribution of Linux. It's an odd way to test a new distribution).
My preferred approach is to buy an extra hard drive. They are pretty inexpensive these days --- and you'll probably find some way to use the extra space, even if you decide to consolidate all of your operations unto one OS.

(?) /bin vs /sbin and the FHS Revisited

From Greg Morse on Fri, 20 Aug 1999

I enjoyed your little write up on bin vs /sbin etc. Is there somewhere that a file standard for non-linux systems exists? I have heard reference to a system V standard. How different is it from Linux?

(!) There are many standards that relate to various facets of various forms of UNIX. However, I don't know of anything quite like the FHS for non-Linux systems.
I've heard that HP was looking at the Linux FHS as a possible model for their own HP-UX filesystem/layout specification. However that is an unsubstantiated rumor. Of course UNIX vendors are welcome to adopt the FHS and adapt their systems to match it. This would be of benefit to all UNIX and Linux users.

(?) Also linux does not seem to have a /opt filesystem which is quite heavily used on my AIX and HPUX boxes. What is the Linux equivalent?

(!) Linux does offer /opt. I usually make mine a symlink to /usr/local/opt. It is supposed to be for "applications binaries" (so things like KDE, WordPerfect, Applixware, and StarOffice all go into the /opt hierarchy.

(?) I would also appreciate it if you could go a bit deeper down the directory tree, explaining as you go. The whole unix directory structure is a mess and could really do with some xplanation as to what the common idoms are. Thank you.

(!) Oooh! That would be a bit of a project. I don't think I have time for it this month (that two week trip to Japan and the demands of a full-time job are catching up to me). However, I'll leave this in my inbox until the end of the month in case I can spend a bit more time on it.
Note that there is a bit of a fractal quality to some parts of the typical/conventional Linux/UNIX directory tree.
For example we find bin, sbin, etc, lib and doc subdirectories under /usr/local/ which serve purposes that are analogous to the same directories that are found under / and/or under /usr. We commonly find a similar set of directories under /opt. It's also common to see users who put tmp, bin, src, and even lib subdirectories under their home directories.
Some of the same things can be seen under the /usr/X11R6 directory tree.
Beyond that quite a bit of the directory structure is specific to the packages that are installed.
Remember all of these are guidelines rather than strict rules. Sysadmins frequently will set things a bit differently --- though deviating too far from the expectations of their software will require quite a bit of programming and patching on their part.

(?) Saving Trees: Laying up Multiple Pages per Printer Sheet

From Kong Liong Wong on Tue, 24 Aug 1999

Hi Answerguy

I'm running Solaris 2.6 and I'm using HP Jetadmin to administer my network HP laser printers. I've seen some organization who are able to print double pages on 1 sheet, with the time stamp, user as well as page number information neatly printed on the side. All I'm able to achieve now is printing 1 page per sheet and the formatting is ugly. I know I can use HP JetPrint to format my printing, but is there any other alternative way?

Please help

regards Kong Liong

(!) Is this a PostScript (TM) printer? If not you probably want to install a Ghostcript filter so that any PostScript that you send to the queue will be converted into your printer's native control language (some version of PCL for your HP).
Once that is accomplished it's very easy to configure your system to perform lay up as you describe. There's a program called 'mpage' which is commonly available with Linux distributions (you'll have to dig around to find the sources and compile them for Solaris). It's what you want.
'mpage' (http://gate.mesa.nl/pub/mpage) allows you to print 1, 2, 4 or 8 pages of text per side of a printed sheet. It does this by arranging the text into PostScript pages, and using the scaling and rotation features of PostScript to do the the layout.
'mpage' will add a small frame and a set of headers and footers to each printed sheet by default. It offers a number of options to disable or control these features. There's where you can get your filename, date, username and other information onto the output.
That's fine for text. However, your output is already in PostScript there's a program called 'pstops' which can do a PostScript to PostScript "conversion/translation" according to the parameters you specify. In that model you can provide it with parameters to scale each odd numbered page to 60%, rotate it ninety degrees, position it on an output sheet, take every even numbered page, scale it, rotate it another direction, add it to your output page, etc.
Notice that I gave an example of scaling/reducing the pages by less than 50% for a reason. It turns out that typical margins around your original pages are just a bit larger than they need to be when you do this layout. So scaling by 55% to 65% actually produces better looking and more readable output.
It can be a bit tricky to get your pstops parameters right. While I was writing my book I'd generate the PS file from my LaTeX .dvi files (using 'dvips'), then for some of the draft printouts I'd use 'pstops' to lay that out and 'gv' to select the even sheets (print those), and finally use 'gv' to toggle my sheet/page selections, turn the paper around and print the other sides. Most of the work was done by my book's Makefile (using 'make'). The result was that I could generate a full draft of my book while only using about 100 sheets of paper for 400 pages of writing. (Luckily my eyes are fine with the reduction).
Here's a sample 'pstops' command like the one that I used:
pstops -q -pletter "2:0L@.7(21cm,0)+1L@.7(21cm,11.6cm)" lsa.ps > /tmp/quarto.ps
(The term "quarto" is probably a misnomer here --- but that's what I called it in my Makefile).
While writing this I've been running a couple of web searches in my other 'screen' terminals (to get a good URL on mpage and to check the man page). While I was doing that I noticed that 'mpage' wasn't installed on my Debian box so I did an 'apt-get install' of that and found that it apparently supports layup of PostScript as well as text files. It's probably a newer version than I remember. Possibly it's just a feature that's been there for years, which I just never noticed before.
Considering how obtuse the 'pstops' command arguments can be perhaps you should just stick with 'mpage'.
'pstops' is part of the PSUtils page by Angus J. C. Duggan (http://www.tardis.ed.ac.uk/home/ajcd/psutils). There are a number of other free tools that he's provided which might be of interest to anyone with advanced printing needs. In fact, glancing at his web page I see that I probably should have been using 'psnup' instead of 'pstops' for what I was doing.
Oh well. Live long enough and you can learn lots. One of the reasons I spent so much time on TAG is that it gives me the incentive to double check the man pages and look up the web sites for packages that I use --- so I often learn new tricks in the process.
Incidentally I'd like to make a special notice on Angus' web page for the PSUtils package. It's beautiful. There's lots of very useful information about the package --- and he's taken the time to give credit to a large number of people that inspired his work or otherwise contributed to the package.
Thanks, Angus. (I've copied you, and the current maintainer of 'mpage' on this message. It will be published in the Linux Gazette Answer Guy column later this month. Linux Gazette is at http://www.linuxgazette.com --- which is odd since it's a free webazine with very little commercial sponsorship).

[ Given the number of commercial support bullets, and the generous hosting by SSC, I'm tempted to disagree on the amount of commercial sponsorship, though I must admit that I'm very pleased not to see it smothered with "regulation size" banner ads. -- Heather ]

In any event, Mr. Wong, I hope these tips will help you get what you want out of your printer. Of course, there are many other print filtering packages available for Linux and other forms of UNIX. I'm sure I'll learn about a few more, probably as a result of some future "Answer Guy" question.

(?) More "Can't Telnet Around My LAN" Problems

From Bobby Mathew on Thu, 22 Jul 1999

I have a lan of 20 machines with one NT server and remaining Win95 clients and today I just added my LINUX Server. After Installation of the RedHat 5.2 LINUX I have trouble telnetting to the machine from any other machine on the lan. I am able to ping the ip address of the LINUX server from the nodes and visa versa but not able to ping its name. When I try telnet from the Win95 clients by specifying the ip it says connected but nothing appears...no username..no password nothing...... I am a newbie to LINUX and so it is kind of frustrating experience not knowing what to do. Please can you help ?

bob

(!) It sounds like you don't have reasonable DNS or other name services properly configured.
Being unable to ping a machine by its name requires that the client (the running running the ping command) be able to translate that name into an IP address (called "resolving" in the vernacular). This is usually done via the DNS system (using the named program from the BIND --- Berkeley Internet Naming Daemon --- package).
If you can do normal web browsing of Internet web pages, ping Internet hosts by name etc --- then you do have the resolvers on your Win '95 and NT systems configured reasonably for that purpose.
When you try to telnet to the Linux box by its IP address then your client is able to establish the connection. However a standard Linux distribution such as Red Hat will have a utility called "TCP Wrappers" (tcpd) installed and configured to protect your system from some relatively common forms of attack.
tcpd will attempt to perform a "Double reverse lookup" to match the source IP address of any telnet, rlogin, rsh or similar (inetd launched, or "dynamic" TCP service) to a fully qualified domain/host name (FQDN) and back. First it performs a reverse lookup.
Let's say the connection is coming from 123.45.6.78 --- tcpd will look that up in the reverse DNS system (actually looking up 78.6.45.123.in-addr.arpa for crufty historical reasons). If it got a reply from that (this IP address example is obviously for pedogogical use --- it doesn't seem to actually be in use on the Internet) it will do a forward lookup on the alleged name.
Let's say that the hostmaster of 123.45.6.* configured his copy of named to return the name "mybad.mit.edu" for his ...78 address. It would be naive to assume that this was actually an MIT address from that piece of info. All we know is that some claims that this is an MIT address. That response probably came from a caching server, which probably got it from an authoritative server for the 123.45.6.* or 123.46.*.* or 123.*.*.* PTR zone, whichprobably was uncompromised and probably was under the control of the proper hostmaster for that zone. This doesn't imply that the any 123.*.*.* addresses were ever delegated to MIT.
So tcpd now does a forward lookup asking for any IP addresses that are assigned to mybad.mit.edu. That response will probably be legitimate (subject to the same issues as the reverse lookup). It should contain a list of all IP addresses that are assigned to that hostname. Note that there is no one-to-one correspondence between FQDN/host names and IP addresses. Any host can have multiple interfaces each with its own IP addresses. A host can also have a different name for each of it's interfaces and it can have multiple IP addresses on any interface (a technique called IP aliasing, which used to be used extensively for web server "virtual hosting" before the widespread support for HTTP 1.1 virtual hosting).
So, if tcpd finds the original IP address of the connecting client among the list of addresses returned by the reverse lookup then it logs the name and processes the connection according to the access rules listed in the /etc/hosts.allow and /etc/hosts.deny. Those two files allow you to accept, deny, or specially handle requests according to where they are (or seem to be) coming from, which service they are requesting and which interface/IP alias they are accessing.
I've described this "double reverse lookup" process before (although not usually in such detail).
The key point for you is that this can cause a very long delay when you are trying access a Linux box via telnet and most any other service that's listed in the /etc/inetd.conf file.
This delay will also affect NFS mounts off of a Linux server because the most command portmapper on Linux systems is apparently derived from one written by Wietse Venema (the author of TCP Wrappers) and is linked with the libwrap --- a programming library which implements the same checks and access control semantics as tcpd.
So, the problem is that you don't have name services correctly configured for your LAN. Even if you properly configured your forward (name to IP address) mapping, you'd have this problem if you didn't ensure that the reverse mappings were consistent with them.
If you waited for several minutes you'd probably find that the telnet would work. Once you logged it, everything would work at normal speeds. This only affects the behaviour on initial connections. The fact that ping works as you expect suggests that your addressing and routing is fine. The Linux kernel handles ping (and other ICMP) directly --- so tcpd doesn't protect you for (nor otherwise interfere with) these packets.
The web server, mail daemon (sendmail, smtpd), and named (DNS/BIND) processes on your Linux systems generally are not dynamically launched. They usually are not linked with libwrap either. Therefore they are some common services which are usually unaffected by this problem.
The question then becomes: "How do you provide name services for your LAN?"
One way would be to use static files. On UNIX and Linux systems you can add entries to your /etc/hosts files on each system. This would contain entries like:
127.0.0.1	localhost		localhost.localdomain
192.168.2.192	win1.example.org	win1
192.168.2.193	win2.example.org	win2
192.168.2.194	wnt1.example.org	wnt1
I've heard that there's a HOSTS file facility that can be enabled in Win '9x (presumably through a registry entry). I don't know where the file would be located and I can't guarantee that is uses the same syntax as a UNIX hosts file. It would be similar to their LMHOSTS files (which are for old IBM LAN Manager implementations of their SMB file sharing protocol).
If you put the IP addresses and names (any names) of your client systems into the /etc/hosts file on your Linux box it will immediately solve the reverse DNS problems.
Actually this assumes that your /etc/nsswitch.conf is properly configured. That should look a bit like:
# /etc/nsswitch.conf
#
# An example Name Service Switch config file. This file should be
# sorted with the most-used services at the beginning.
#
# The entry '[NOTFOUND=return]' means that the search for an
# entry should stop if the search in the previous entry turned
# up nothing. Note that if the search failed due to some other reason
# (like no NIS server responding) then the search continues with the
# next entry.
#
# Legal entries are:
#
#       nisplus or nis+         Use NIS+ (NIS version 3)
#       nis or yp               Use NIS (NIS version 2), also called YP
#       dns                     Use DNS (Domain Name Service)
#       files                   Use the local files
#       [NOTFOUND=return]       Stop searching if not found so far
#

passwd:         files [NOTFOUND=return] nisplus nis
shadow:         files [NOTFOUND=return] nisplus nis
group:          files [NOTFOUND=return] nisplus nis

hosts:          files dns [NOTFOUND=return] nisplus nis

services:       files [NOTFOUND=return] nisplus
networks:       files [NOTFOUND=return] nisplus
protocols:      files [NOTFOUND=return] nisplus
rpc:            files [NOTFOUND=return] nisplus
ethers:         files [NOTFOUND=return] nisplus
netmasks:       files [NOTFOUND=return] nisplus
bootparams:     files [NOTFOUND=return] nisplus

netgroup:   nisplus
publickey:  nisplus

automount:  files [NOTFOUND=return] nisplus
aliases:    db files [NOTFOUND=return] nisplus
Since you're using Red Hat 5.2 or later you should have one of these files (though their default settings are wrong for most sites --- files should generally be preferred over DNS or any other source; if you bothered to edit a name into a file the system should respect that).
The settings I've shown here insert an optional action to stop trying to resolve most of these mappings without bothering to try NIS and NIS+ (since I don't use those in my domain).
I realize you may be a bit confused at this point (I'm rambling again). Basically all this NSS stuff has to do with how a modern Linux system's "resolver" works.
The resolution of names into IP addresses, services, and even account and group names into UIDs and GIDs (the numeric objects which the kernel and filesystems use to manage ownership and permissions) are all done through libraries (think DLLs since you're from an MS Windows background).
There are various mechanisms for performing these mappings. Originally it was all done through simple text files. Thus the host name to IP address mapping was done by searching the /etc/hosts files, and the user accounts were found in the /etc/passwd file, and the groups were in the /etc/group, etc. Under UNIX and Linux these files are still respected and very widely used (especially for users and groups).
DNS was added to provide a host name to IP address service that was scalable to the needs of the Internet. This also provided for some facilities that were not possible in the /etc/hosts file (like MX records which specify alternative locations to forward mail for a system that doesn't have its own smtpd running).
Then Sun introduced its "Yellow Pages" (YP) service for distributing user, group, host and other sorts of information over a network. Apparently British Telecom prevailed in some legal wrangling, forcing Sun to officially rename YP to NIS (Network Information System). This is vaguely analogous to Novell's NDS (Netware Directory Services), LDAP (lightweight directory acces protocol) and to the "Active Directory" vaporware that Microsoft is promising to deliver in NT 5.x ... err ... Windows 2000 ... err ... Windows "Consumer" or whenever.
(Later Sun implemented a more advanced version of the NIS protocols called NIS+).
MIT developed and used (uses?) a naming/directory service called "Hesiod" (as part of their Athena project if I understood it correctly). This is essentially a way of distributing lines from /etc/passwd and /etc/group through DNS using a particular type of record. It's the most obscure and rare of the existing naming services that I'll mention.
In the bad old days the sysadmin had no control over what order the various naming and directory services were queried. The big commercial versions of UNIX provide a "Names Services Switch" configuration file named /etc/nsswitch.conf. (I think that would have been introduced in Solaris 2.x by Sun and emulated by HP-UX, AIX and others shortly thereafter).
In older versions of Linux (those relying on libc version 5.x) there were different versions of the libraries with and without support for files, DNS, NIS and NIS+. The version of libc that supported NIS was often referred to as the "NYS libc." You could use the /etc/hosts.conf file to give you limited control over the resolving process.
With the adoption of GNU glibc version 2.x (which is Linux libc version 6.x) Linux distributions gained support for /etc/nsswitch.conf and a fully modular NSS infrastructure. files, db, DNS, and NIS support is provided with most distributions. NIS+, LDAP, Hesiod, NDS and even custom and as yet undeveloped naming services can be plugged in and supported without recompiling any of the software that ships with a typical Linux system.
Through the magic of dynamic linking this modular NSS will also be supported by all programs that conform to the standard glibc APIs for their name services request.
In all of these cases the DNS resolver further relies on an /etc/resolv.conf (NOTE: no 'e' on the end of that!). That's where the resolver libraries find pointer to "nearby" name servers. (Actually the libraries and code don't care if your name servers are "nearby" or not. However, your sysadmin and others might be understandably irritated if you configure you system to send packets to Bangladesh for every name lookup that it performs).
That finally brings us back to your situation. You can use just files through your network. With only 20 or 30 hosts that generally isn't too cumbersome. It's a bit of a hassle to add new hosts or change them around (you have make sure that all of the files get changed). That's the whole reason all these other naming services were developed.
You can also configure your own DNS service for your network.
This gets to be a much more complex discussion.
Let's say that you have an Internet domain registered with the InterNIC. That requires that you register primary and secondary nameservers with them. These days many smaller domains (such as yours) are served by their ISPs nameservers. ISPs that provide name services generally should have co-operative agreements with other ISPs or Internet sites so that each provides secondary services for the others.
This is all managed automatically by the BIND software --- once it's properly configured then it will automatically synchronize secondaries to primaries (using zone transfers).
It is also common for network administrators to run "caching" nameservers. These aren't configured as primary or secondary authorites for any domain. However they can have DNS requests directed to them and they will respond from their cache if they have recieved an authoritative answer recently enough. The DNS protocols include plenty of information regarding the acceptable caching periods for any given record. So they can be configured by the hostmasters of each domain.
BIND nameservers can be used for caching, and they can concurrently be primary to some domains, secondary to others.
So, why don't you just give a list of your machines to your ISP and one of their admins put all their names and IP addresses into your zones for you?
If you are a typical small site on the Internet these days you don't use IANA assigned addresses for all of your system. You might have a dedicated connection to the Internet. Perhaps you have an ISN line or even a modem that's configured for dial-on-demand. Your ISP has probably only devoted a few IP addresses to you. If you have a publiclly accessible web site it might be "virtual hosted" at your ISPs site on one of their servers. The same might be true of your FTP server and your e-mail might be served to you through some POP mailbox hack.
Most of your system are probably using RFC1918 "Private Network" IP addresses (10.*.*.*, 172.16.*.* through 172.31.*.*, or 192.168.*.*) and be accessing the Internet through IP masquerading (as provided by the Linux kernel or most modern routers) or through applications proxies (such as SOCKS).
In these cases you cannot publish those host names and their IP addresses through your public DNS records.
Even if you do have "real IP addresses" (which I refer to as DRIPs --- directly routable IP addresses) you might not want to publish them. You really only need to publish the names and addresses of those systems which interact directly with the Internet (public web servers, mail exchange hubs, routers, proxy hosts, etc).
You want your LAN nodes to "see" one set of names and addresses in addition to allowing them to see the Internet name space. As your network gets larger you don't want to have to manually synchronize alll those hosts files (and you might not want to even hack up Win '95 to force it to work with them in the first place).
So, what do you do?
This is where you configure your system to use "split DNS."
Basically you point your client systems to a nameserver that you set up (on your Linux system would be the natural choice). This is their primary nameserver. It is configured to be authoritative to your domain but it is NOT registered as an authoritative name server with the InterNIC. In other words your domain services have a "split" personality.
Your internal systems look to one system for all name requests while the outside world looks to some other server (probably one maintained by your ISP or one of your ISP's secondaries).
This sounds much more complicated in discussion than it turns out to be in practice. If you maintain a "flat" domain namespace (you don't create named subdomains within your organization) then running "split DNS" is fairly easy.
If you delegate subdomain zones to their own servers (departmental or regional, for example) then you'll have an added complication. Typically you'd have to ensure that each of internal authoritative name servers is a secondary for each of the "other" subdomains.
In other words, let's you're running the foo.not domain. You decide to create subdomains for finance, engineering, and IS and call them: fin.foo.not, eng.foo.not, and is.foo.not. You can just maintain a set of zone files for all of these on the same primary (internal) server. However, you might want to delegate these zone --- give the sysadmin/hostmaster of the engineering group his/her own internal DNS server. In order for split DNS to work, and for the fin.foo.not and is.foo.not DNS servers to find hosts in the eng.foo.not subdomain --- the name servers for fin. and is. must be configured as secondaries to eng.
You can read more about why this is the case at:
Creating a split DNS environment
http://www.acmebw.com/askmrdns/00408.htm
However, it is relatively rare to have this problem. You probably are only running a small organization, and maintaining all of your domain in a single zone delegation is probably feasible. In that case here's what you can do:
You can easily run a copy of named on your Linux box. It's included with all major Linux distributions. (Just install the BIND package from your Red Hat CD).
Red Hat 5.2 and later ship with BIND 8.x (there was a major change in the configuration file format between BIND 4.9x and 8.x --- as well as jump in the version numbering).
Once you've installed BIND all you have to do is to prepare a configuration file and a set of zone files for you forward and (especially) reverse zones.
Here's an example of a configuration file (similar to the one I use for my domain):
options {
        directory "/var/named";
        dump-file "/var/tmp/named_dump.db";
        pid-file "/var/run/named.pid";
        statistics-file "/var/tmp/named.stats";
        memstatistics-file "/var/tmp/named.memstats";
        check-names master warn;
        datasize 20M;
	forwarders { 209.157.85.7; 209.157.85.2; 123.45.6.7;};
};

zone "." {
        type hint;
        file "named.root";
};

zone "localhost" {
        type master;
        file "master/localhost";
        check-names fail;
        allow-update { none; };
        allow-transfer { any; };

};

zone "0.0.127.in-addr.arpa" {
        type master;
        file "master/127.0.0";
        allow-update { none; };
        allow-transfer { any; };
};

acl "internal" {
        { 192.168.64.0/24; };
        };

zone "starshine.org" {
        type master;
        file "master/starshine.org";
        check-names fail;
        allow-update { none; };
        allow-transfer { any; };        // just allow the secondaries
        allow-query { any; };

zone "64.168.192.in-addr.arpa" {
        type master;
        file "master/192.168.64";
        allow-update { none; };
        allow-transfer { internal; localnets; localhost; };
};

This configuration file refers to the starshine.org and 192.168.64 files in the "master/" directory. There are also localhost and 127.0.0 files under the master/ directory. Here are copies of those two:
master/localhost:
$ORIGIN localhost.
@               IN      SOA     @       root.localhost. (
                                2               ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                1D )            ; minimum
                        IN NS   @
                        IN A    127.0.0.1

master/127.0.0:
$ORIGIN 0.0.127.in-addr.arpa.
@               IN      SOA     localhost. root.localhost. (
                                2               ; serial
                                3H              ; refresh
                                15M             ; retry
                                1W              ; expire
                                1D )            ; minimum
                IN NS   localhost.

1       IN PTR  localhost.
Those two should be the same for every DNS server. (I won't get into the history surrounding this --- just take it as a quirk).
Here's a set of sample zone file excerpts from my domain:
master/starshine.org
 @       IN      SOA     ns1.starshine.org. hostmaster.starshine.org. (
                        1999071603      ; serial, todays date + todays serial #
                        8H              ; refresh, seconds
                        2H              ; retry, seconds
                        1W              ; expire, seconds
                        1D )            ; minimum, seconds
                IN NS      ns1.starshine.org.
                IN NS      ns2.idiom.com.
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.
                IN MX 30   www.starshine.org.
                IN MX 90   mx.myisp.net.
                IN TXT     "Starshine Technical Services"
		IN A	   209.157.85.7


flowpoint	IN CNAME   gw.starshine.org.
gw		IN A       209.157.85.1
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.

pulsar		IN A       209.157.85.2
ntp		IN CNAME   ntp.starshine.org.

mx		IN A       209.157.85.7
mail		IN A       209.157.85.17

www		IN A       209.157.85.7
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.

ftp		IN A       192.168.64.3
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.

staging		IN A       192.168.64.4
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.

lasfs		IN A       192.168.64.5
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.

antares		IN A       192.168.64.11
                IN MX 20   mx.starshine.org.
ant		IN CNAME   antares.starshine.org.

betelgeuse	IN A       192.168.64.12
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.
bet		IN CNAME   betelgeuse.starshine.org.

canopus		IN A       192.168.64.13
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.
can		IN CNAME   canopus.starshine.org.

venus		IN A       192.168.64.14
                IN MX 10   antares.in.starshine.org.
                IN MX 20   mx.starshine.org.
startop		IN CNAME   venus.starshine.org.

quit		IN CNAME	use-exit-to-quit-nslookup.

master/192.168.64
$ORIGIN	64.168.192.in-addr.arpa.
@  IN SOA	64.168.192.in-addr.arpa. hostmaster.starshine.org. (
				4		; serial
				3H		; refresh
				15M		; retry
				1W		; expire
				1D )		; minimum
@                IN NS      ns1.starshine.org.
@                IN NS      ns1.idiom.com.

1	IN PTR	 antares.starshine.org.
2	IN PTR	 betelgeuse.starshine.org.
3	IN PTR	 canopus.starshine.org.
4	IN PTR	 deneb.starshine.org.
5	IN PTR	 eridani.starshine.org.
6	IN PTR	 fomalhaut.starshine.org.
18	IN PTR	 rigel.starshine.org.
19	IN PTR	 spica.starshine.org.
22	IN PTR	 vega.starshine.org.
33	IN PTR	 andromeda.starshine.org.
97	IN PTR	 mercury.starshine.org.
98	IN PTR	 venus.starshine.org.
99	IN PTR	 earth.starshine.org.
100	IN PTR	 mars.starshine.org.
101	IN PTR	 jupiter.starshine.org.
102	IN PTR	 saturn.starshine.org.
103	IN PTR	 neptune.starshine.org.
104	IN PTR	 uranus.starshine.org.
105	IN PTR	 pluto.starshine.org.
106	IN PTR	 luna.starshine.org.
107	IN PTR	 deimos.starshine.org.
108	IN PTR	 phobos.starshine.org.
109	IN PTR	 titan.starshine.org.
110	IN PTR	 europa.starshine.org.
111	IN PTR	 io.starshine.org.
112	IN PTR	 ceres.starshine.org.
... etc.
So you could take these as samples (though you'll have to edit in various values). Every hostmaster I know uses a set of templates for all of their files. Occasionally someone needs to build one "from scratch" but most of us maintain our zones in "monkey-mode" (as in "monkey see; monkey do!).
For more information you could read the "cricket book" whole book on DNS/BIND (*)
You can also can peruse the DNS Resources Directory (http://www.dns.net/dnsrd) web site, and you could visit the Internet Software Consortium at: http://www.isc.org. ISC is headed up by Paul Vixie, who has been the principle programmer and maintainer of BIND for about 20 years.
Hope that helps. Sorry such a simple question leads to such a long answer. I've been meaning to write up something on split DNS for awhile.
Incidentally the examples I showed were for the internal systems. The publicly accessible servers and any hosts with "real" IP addresses would have entries in a different set of zone files which would be stored on a publicly access DNS server. Keeping the two sets of zone files relatively in sync is one of the principle disadvantages of split DNS. There are systems out there that generate zone (and reverse zone) files from simple text tables and/or as reports from a database. I don't know of any that specifically support zone "splitting" (though it would be a simple feature to add).
In my case I'd only have about three or four entries in my public DNS and I don't maintain a reverse DNS zone for it directly (my ISP offers a web form (CGI) driven means to allow me to submit changes to my reverse names to his zone. That is a complex issue that I won't cover this time around.

(?) Thanks

From Bobby Mathew on Fri, 23 Jul 1999

Dear Jim,

I am so really impressed by your explanation of my problem. I am also grateful for your initiative to help out. I had given up on the problem after recieving no response for so long. But your email has encouraged me to venture into LINUX a little more deeply. I am a novice to LINUX and so very hesitant to venture far. Thanks a lot for your detailed explanation. Though I must admit that most of it went over me but neverthless your email has certainly inspired and enlightened me to go back to see if I can correct the problem.

Thanks a ton for sharing your expertise and your time. I will try it out and get back to you.....

God Bless you
bobby


(?) Getting Access to the Internet

From albuquerque on Tue, 31 Aug 1999

Hope you can help me. I have a DELL I7K laptop running WIN98 and Linux RH6.0.

Linux seems to be running fine, have GNOME as my window stuff, I can access the PCMCIA card and use a SYQUEST SCSI drive.

Now I'd like to use Linux to access the Internet!!!!!!!!!!!!!

I have read most or many How TO s etc. and keep getting lost in the forest.

(!) That's a common problem. The answer will be a rather lengthy one. To answer this question I'll have to start with a view from "ten thousand feet" and then swoop down for a closer look at some details.
As with the answers to many questions about Linux quite a bit of my response will be qualified with: "It depends..."
Since Linux, and UNIX are written following a "toolbox" model it provides us with tools to apply to the whole class of problems. We have to know how to use those tools to fashion our own solution.
In the case of connecting to the Internet most of the "It depends" clauses are followed by the phrase "...on your ISP." Other things depend on your hardware, your distribution, and even on your personal preferences.

(?) Problem? What are the steps need to get on the Internet. (RH says use Linuxcfg's special command - which I can't find.) What is need to set up the Modem; What is needed to set up the DNS numbers(like Win98); What is needed to set up E-Mail; Where is the "Dialer"?

(!) I think Red Hat recommends the use of the linuxconf package. I don't know what Linuxcfg would be, or what sort of "special commands" it might offer.
(I suspect that you have simply mangled the name of the package and haven't referred to HOWTOs in the conventional way. These may seem like nitpicks. However attention to details of this sort, linuxconf vs. Linuxcfg and HOWTOs vs. "How TO s" is actually quite important in using most operating systems, particularly in using any UNIX like system).
So, your questions were:
That looks like five questions. It could also be considered as one broad question for which you've provided four specifications to clarify what you mean by "get on the Internet". I'll revisit each of these questions, with answers, below.
However, first I'll comment on some of the overall problems that lead to these sorts of questions. The first thought might be to say: "Linux is too hard to use." Getting on the Internet is one of the most common operations for PCs these days so it SHOULD be easy and straightforward.
Indeed it could be. If we were buying our computers with appropriate modems included and with Linux pre-installed and pre-configured for our modems AND if we were subscribing to ISPs who catered specifically to the particular Linux distribution that our hardware vendor was providing. If we didn't have so many choices --- then connecting to the Internet would be pretty easy.
Let's compare this to the typical experience of Window '98 user buying a new system and accepting whatever options are presented "up front" in that process. They buy a system with a cheesy little winmodem pre-installed. It includes icons to access MSN (the Microsoft Network) and possibly AOL. These are already on the desktop.
Under those circumstances (and the similar ones which predominate the experience of new Mac users) it is pretty easy to "get on the Internet." We'll ignore the trifling argument that being on MSN or AOL might not quite be the same as "being on the Internet." That's a matter of personal bias.
That process is easy. It sometimes isn't reliable. It certainly isn't flexible and may not be economical nor convenient (you have to put up with quite a bit of advertising if you subscribe to either of these "loss leader" ISPs). When things don't work right you are up against an unyielding brick wall. Lost in all that "ease of use" is any control over the underlying mechanics (much like the situation under the hood of most modern vehicles --- somewhere deeply wedged under all those proprietary electronics is your basic internal combustion, gasoline driven piston engine).
Things get very interesting if you want to have choices; to do things your own way. Linux is very much about "doing things your way." This is a facet of it that comes with quite a cost. It requires quite a time commitment to climb the Linux learning curve.
To complicate issues more every distribution starts out with a set of assumptions how things "should" be done. For example RedHat 6.0 includes 'linuxconf' --- and Red Hat Inc is encouraging people to use it.
Personally I don't like Linuxconf (nitpick, linuxconf is the command, Linuxconf is the subsystem which includes the command, some libraries, help files, an API and some other stuff). What I want from a system configuration management tool is much more focused than Linuxconf is written to provide.
The biggest difference between configuring UNIX-like systems and managing the configuration of NT, Win '9x, MacOS, and other proprietary systems, is that UNIX (and Linux) use text files to store almost all configuration data.
The Microsoft operating systems use a "Registry" (which represents a giant single point of failure as well as a key, performance limiting lock point for which many critical subsystems compete). Almost anything "interesting" that you want to do to configure an NT or Win '9x system involves tweaks to the registry. Anyone from that background who complains about how "non-intuitive" UNIX/Linux configuration file names are should take a good look at those \HKLM\... references to which they've become accustomed.
So, what I want out of a configuration management interface is one which primarily consolidates the process of creating and modifying these configuration text files and integrates that with a documentation and context sensitive help system.
A nice thing about having lots of small, individual text configuration file is that you can prepare one canonical or template that is suited for a given site or situation and easily distribute that to as many systems as necessary. It's scaleable with simple distribution and processing (scripting and text processing) tools.
The dark side of this model is that each of these conf files has a unique syntax and set of semantics. It's like having to know dozens of dialects of Hindi and Punjab to work within one administrative domain. That's the problem that I want solved.
Linuxconf tries to do too many other things and doesn't offer me a way to just spit out the conf files.
So, I don't use it.
This means that its quite possible that you could use Linuxconf to do what you want with a minimum of fuss and virtually no understanding of what all the "moving parts" mean or how they relate. However, I can't guide you along that path --- since I've taken the low road (or the "low-level" road as it were).

(?) Any help or assistance you can provide would be ever so greatly appreciated!

Thankyou Al

(!) So, let's revisit those questions:
What do you mean by "on the Internet?" You mention using a modem and using e-mail. So I'll guess that you want to be a simple, dial-in PPP client, to access web and e-mail (presumably through a POP mailbox) from a conventional ISP.
Note that I'm guessing here. There are many other ways to be "on the Internet."
For example you might want to have your own domain, configure one modem to maintain a persistent connection to the Internet, set up your own web and mail servers, configure another modem for dial-in by some associates etc. That would an equally legitimate interpretation of your question.
In general the process of connecting a Linux box consists of the following steps:
Most of these correspond to the other questions you asked. Fans of the OSI networking reference model will note that I've listed these roughly in order from the lowest level (physical) towards the upper (applications) layer. We're "stacking" each step on top of the ones on which it depends. (I bet some of you have wondered by they call it a "TCP/IP stack").
In your case you've said that you want to use a modem. So that will be your communications channel. We'll cover that with your next question.
Once you've dialed into your ISP and established a modem connnection, you'll have to run some protocol over that connection in order to provide any sort of networking through it. These days that will almost certainly be PPP. In the days of yore (about 4 or 5 years ago) you might have been coping with SLIP. That's virtually unheard of these days.
Under Linux PPP is provided by the PPP daemon, usually installed as /usr/sbin/pppd.
Your ISP probably defaults to issuing "dynamic IP" addresses. The PPP protocol has features for negotiating and establishing addressing, masking, and routing for each new connection. So long as you stick with reasonable defaults then you won't have to deal with those issues directly. We'll talk about that, and LAN addressing when we address your third question.
Almost all operations on the Internet are done using host and domain names. So one of the most vital "glue" services provided by the Internet is DNS.
This is usually classified as an "applications layer" service, because the Internet TCP/IP protocols don't conform to the seven layer OSI reference model. I tend to think of it as a "presentation layer" service (having to do with the translation between user/applications representation in the form of names to a lower level machine representation, IP addresses). I'm sure some OSI purist will correct me on this.
In any event there is a bit of a chicken-and-egg problem when we think about DNS. We have to provide an egg, in the form of one or more IP addresses, to gives us the whole specifies of other nameservers that form the DNS system.
So we list a few nameservers in our /etc/resolv.conf.
Conventionally these would either being a local caching name server or one of the name servers operated and maintained by our ISP. This makes quite alot of sense since it minimizes the number of network hops taken by our name resolution requests and their replies. In other words it results in faster name resolution at less overall cost in bandwidth across the Internet.
Usually you can just create one /etc/resolv.conf and leave it in place permanently. Even if you have multiple ISPs its possible to refer to any nameserver on the Internet, even if it isn't the "closest."
Once you have these networking basics in place you can access most Internet services. You can browse the web, fetch Linux package updates over FTP, telnet, use the finger command etc.
Note that your ISP might provide a proxy/cache for its customers. If that's the case you might be a bit happier (and make your ISP much happier) if you configure your web browsers to point to his Squid server, or whatever he's using. If that's the case, your ISP should provide you with the information and support to use the feature (it's really of more benefit to him and your fellow customers than anyone else).
E-mail is special case. There are many ways for you and your ISP to configure your e-mail services. In the simplest case you have an address of the form: YourName@YourISP.com and you just periodically use a POP or IMAP client to fetch your mail from your ISP's server.
Your POP/IMAP client might be part of a mail user agent (MUA: a program for reading and composing/sending e-mail) or it be a separate utility like 'fetchmail' which relays your mail from an mail store to a local "spool" (mailbox).
Note that POP is only a way of receiving e-mail. When it comes to sending e-mail there are two methods that are commonly employed by UNIX MUAs.
Most well-behaved programs call on a local program named /usr/lib/sendmail (which might be a copy of the classic 'sendmail' MTA, mail transport agent, or it might be any program that provides a sufficiently compatible interface to allow MUAs to feed mail to the local system transport agents).
Some programs ("know-it-alls") will bypass the local MTA and attempt to directly open their own connections to the mail transport agent on the recipients home host (or MX as the case may be). Netscape Communicator is an example of this class of program.
The reason I make this distinction is that your choice of MUA has implications regarding how your configure your system so that the mail you generate has an appropriate return address. It generates another "It depends..."
If you don't configure your system correctly then most people will not be able to respond to any mail you send them. They'll have to remember your address and type that in every time rather than being able to use the "reply" feature of their MUA. That would not endear you to your correspondents.
We'll get to that in a bit more detail later.
That's the overview of "getting on the Internet." Obviously most of the details are left to the constituent questions that you've provided.
First you need a real modem. This seems so obvious you might wonder why I'd even mention it.
winmodems (a.k.a. "losemodems").
To understand the difference between a real modem and a "winmodem" you have to know a little bit about how modems work.
The term modem originally stood for "modulator/demodulator" (which sounds like something Marvin the Martian might be brandishing as he says "Take me to your leader").
Telephone lines carry electrical signals which are normally analog modulations of sound. The fact that sound can be easily represented and transmitted by and replayed from electrical signals (in the forms of telephone, radio and phonograph, for example) is the major realization on which Thomas Edison built his fortune and his historical legacy.
For computers to make use of this medium they must be able to convert their digital signals into modulated electrical signals and vice versa. Thus we have devices that modulate and demodulate.
Fundamentally modems are programmable tone generators, usually with analog-to-digital (A/D) and digital-to-analog (D/A) circuitry and other stuff in them.
It's this other stuff that grew increasingly sophisticated throughout the late 70's, 80's and into the early 90's. Modern "smartmodems" and "Hayes Compatible" modems are essentially special purpose computers running an embedded system. The interface to that embedded system is any of the many variations to the AT set that every modem manufacturer has created.
In particular these modems needed to do signal transformations that were much more sophisticated that simple AM and FM (amplitude and frequency modulations respectively). So they needed special DSP (digital signal processing) chips as well as a processor and memory to handle the interpretation of AT commands. Naturally they also had fairly significant ROMs to store the AT command set interpreters.
The advantage of all this is that modems work in a relatively standard way, through a minimal interface (the serial port) and without introducing much processing overhead on the host systems.
Ironically the most recent real modems have CPUs that are probably more powerful than early PCs.
However, some manufacturers came up with the brilliant idea of ripping out all the DSPs, processors and firmware out of their modems. They produce a device which is essentially just the programmable tone generators, and force the host system to do all of the signal processing and provide the interface (AT command set emulation). This entails running a rather bulky and computationally expensive driver on the host system.
Those are winmodems.
Winmodems wouldn't be such a bad idea under certain circumstances. If the devices were priced much lower than "real" modems, and if the programming specifications were widely available, then the choice would be simply be a matter of comparing cost/benefit factors.
However, neither of these conditions is true of winmodems in the current PC market. They aren't significantly less expensive to the consumer (so the manufacturers and distributors keep all of the margin). Also, and here's the part that's of interest to Linux users, the specifications for devices are not available. Therefore the only drivers that exist for most of them are for MS Windows. In some cases it appears that some manufacturers have released proprietary UNIX drivers.
The economics that result in the widespread deployment of winmodems are instructive. As far as I can tell they first their way into the market through bundling. At a certain point it became a significant marketing handicap to sell a computer system without including a modem. However, the only characteristic of a modem that was important in marketing whole systems is the optimal throughput speeds. So computer retailers included the cheapest modems (in the right "speed" range) that they could find.
Since almost every system shipped with a (win)modem there was a corresponding drop in the sales of (real) modems as separately purchased peripherals. (Probably this wasn't really a "drop" so much as a slower growth in sales as compared to the broader expansion of the whole computing market). These (win)modems are mostly made by the same manufacturers as real modems. Naturally it then made sense for them to package these devices in the same way as their real modems for separate sales.
So, when you go to the store to buy a modem you'll find that winmodems are packaged identically to internal (real) modems. They are usually not clearly labelled (sometimes the warning doesn't even appear in the fine print on the outside packaging).
So, the easiest way to guarantee that you are getting a real modem is to buy an external one. So far as I know it's not possible to make an external "winmodem" that connects to a plainn old serial port. (One could certainly design a "RAM modem" that required a software driver to be "uploaded" to it, and such devices might exist --- but I'd put those in a different class even if they did require MS Windows or other proprietary drivers to operate).
The real danger of winmodems (and winprinters, which are similar in some respects) is that they build an artificial economic and hardware barrier to the adoption of new or alternative software. In other words, they give too much power to Microsoft (in this particular case). Any similar technology is best avoided by the wise consumer (regardless whether the co-incident beneficiary is Microsoft or any other software company).
There are some efforts to write drivers for some winmodems. Naturally the programming interfaces are different for each model and brand of these devices. In most cases the manufacturers are not providing any support for the efforts (and in some cases I'd bet that the modem manufacturers can't do so, since they may have licensed their drivers through a third party, etc.).
If any of those projects is a success than the modems that are supported by Linux will probably be called "linmodems."
At that point there will probably be four or five classes of modems in the PC world. "Real" modems (internal ISA, PCI, and external), winmodems (those that are still not supported by Linux), "linmodems" (those winmodems that are supported with a Linux driver), and possibly the USB modems will be in a class of their own.
Note that there is a potential problem with internal modems even if they are "real" (non-Winmodems). Some of these are "Plug and Pray" devices that must be initialized by some proprietary driver. In some cases you may be able to cope using the Linux pciutils package.
PCMCIA modems, such as you might be tempted to use in your laptop, come in both "real" and winmodem flavors. As with other internal modems there is usually nothing to clarify the matter on the packaging or in the marketing literature for these modems.
Calling the manufacturer's technical support line might help --- if they have one, if you can get through, and if the person you talk to has a clue what your asking about and the inclination and liberty to honestly answer your question.
However, the simple advice is:
Throw away the internal modem that came with your machine.
Buy an external modem!
If I recall correctly the Dell Inspiron 7000 that you have includes an internal "winmodem" --- ignore it. It's not supported by Linux. (Although Dell may be providing a supported modem in future versions since I've heard rumors that they'll eventually be offering desktop and laptop system with Linux pre-installed).
That finally leads us to the answer to the question at hand. How do we use a real modem under Linux?
Linux has a very simple interface to any normal modem. The application simply opens the device's node (entry in the filesystem which provides a means of access UNIX/Linux device drivers through normal file operations).
This would usually be /dev/ttyS0 or /dev/ttyS1, though it could be any of the /dev/ttyS* devices that represent access to the conventional PC serial ports (COM1 through COM4). It could also be any of the many devices associated with various multi-port serial cards (ttyR* for RocketPort, ttyC* for Cyclades, ttyD* for some Digiboard, and others for Stallion, etc.).
It's common for Linux users to create symlinks named /dev/modem and /dev/mouse which point to the real device interfaces for these common peripherals. Then all of our applications and configuration files can use the symbolic name. If we ever change to a different mouse or connect a modem to a different port we can simply update the symlink and leave all our software alone.
Once a process has an open read/write connection to the modem (and a lock on the device node to prevent other processings from jumping into the "conversation") then the use of the modem is rather simple. The communications application handles all of the details for you.
What's going on under the hood is a structured conversation (protocol) between the application and the modem. The application sends a special break signal after a pause to "break" the modem into command mode (similar to using the [Esc] key in 'vi' to break out of text entry mode into its command mode). Then the application can send a series of AT commands (that is any command starting with the ASCII sequence "AT"). These sequences set various options on the modem, and instruct it to dial and establish connections).
The modem reponds with various result codes like "OK" and "CONNECT" and "BUSY" etc. (Most of them can be configured to return numeric codes instead of text).
The basic AT command set is the same for all Hayes compatible modems. However, there are many extensions and settings that differ among brands and models of modem. The most significant differences are in the "init strings" --- these are AT commands which configure the modem in preparation for a particular mode of operation.
Tweaking init strings is more art than science. It can depend on the modem in use, the other modem to which it is connecting, and the software that will be communicating over the channel ... among other things. Every Linux serial communications utility is responsible for its own init strings and other dialogs with the modem.
This is quite unfortunate in some respects. It would be nice if 'uucico', 'kermit', 'pppd/chat', 'mgetty', 'efax', 'minicom', 'seyon', and other modem-using Linux utilities were all "reading off the same page" for at least the major modem settings (if they were all written to read and parse an /etc/modemcap file, or something like that). This would allow the admin to consolidate most of the information into one place, while allowing the applications to override those settings as necessary.
However, that's not the way it works, and it's not likely to become a new standard. So we'll stop daydreaming and get back to how it DOES work.
Here's what's necessary to get an application to talk to your modem:
Distribution maintainers usually set their programs to be mutually consistent (to use compatible lock files for example). They often don't configure their permissions and ownership to match my preferred policies, so I usually have to tweak some things to get them the way I want them to be.
In your case you're specifically interested in PPP. It sounds like you won't be using 'mgetty' (to recieve incoming data connections or faxes), and it seems unlikely that you'd be using any other modem utilities, or that you might just want to use 'sendfax' or 'efax' in addition to your PPP.
In addition it sounds like you are going to be running this system as a personal workstation, with no other accounts on it. This means that you won't have any problem where you try to access the modem, and some other user on you system is already using it. In other words, you don't have to concern yourself much with device locking and contention. The Red Hat default settings are probably fine for your case.
There have been many articles on setting up 'pppd' for Linux. It's surprisingly difficult simply because there are so many options. The Linux 'pppd' is designed to act as a networking client or server.
Technically PPP is a peering system, so the terms "client" and "server" are misnomers here. However, I use these terms to distinguish between the system that is initiating the connection (dialing in as a "client") and the one that is responding to it (answering the phone as a "server").
The Linux PPP daemon can act in both of these roles.
In your case you just want your pppd to act as a client.
The overall process is:
I personally recommend that the /etc/ppp/options file contains just one directive:
lock
That will force the PPP daemon to check for, respect and maintain a device lock file so that it can co-ordinate its use of the modem with any other programs that might be using it. I've talked about the gritty details of lock files before. You needn't worry about the details much since you probably will never really need the lockfiles. However, it's a good "placeholder" for your /etc/ppp/options file in most cases.
This allows us to put all of our other directives in a more specific file. We can then have different options files for different ISPs, and even for different modem banks at each ISP (when the fast local lines are busy you try the slower and more distant lines). It also allows us to have special options files for each modem (/etc/ppp/options.ttyXX) and for individual users (~/.ppprc). Those options are for allowing dial-in PPP If you wanted to connect to your home computer from work, or allow your friends to connect to you.
After creating that file (or checking that your distribution has created a suitable one for you) you can then create an ISP specific options file. That might look something like:

/dev/modem 115200

modem

crtscts

defaultroute

connect "chat -f /etc/ppp/chat.MYISP"

# connect "chat -v -f /etc/ppp/chat.MYISP"

# debug

# kdebug 7

# mtu 576 # 296

# mru 576 # 296
... notice that the first line refers to our device and speed. These must be the first options specified in this file, or they should be listed as parameters on the pppd command line in whatever script we write to make our calls.
The next two lines instruct the PPP daemon to treat the device as a modem (as opposed to a "local" or direct null modem connection) and to use the RTS/CTS (ready to send / clear to send) control wires on the cable between the modem and the computer (a common form of hardware handshaking).
The next directive instructs the PPP daemon to set a default route pointing to whichever interface it establishes while parsing this file. This is sensible when you are using 'pppd' as a client/caller to connect to an Internet ISP. You would not use it if you were making a connection to some private network, especially if you had a DSL or other Internet connection (through an ethernet card or some other PPP connection). Obviously an ISP that was using Linux/pppd on its dial-in modem servers would also NOT use this directive.
The next directive is the hardest for new Linux/'pppd' users to get working. It supplies a command that pppd use to establish new connections. As in this example this is usually an invocation of the 'chat' command. The chat file contains supply a dialog between the system and the modem followed by a dialog between the local and remote computers.
Chat scripts are lists of "send/expect" pairs. 'chat' implements a very small programming language for describing these dialogs, setting timeout intervals and abort conditions, and handling simple errors. Writing 'chat' scripts by hand is a hassle. There are several dialog/menu driven (text and GUI) front end programs (interfaces) which try to make this process (and the overall process of configuring PPP and connecting to the Internet) easier. You can find a whole directory of such tools at:
http://metalab.unc.edu/pub/Linux/system/network/serial/ppp
One that is conspicuously missing from this directory is WvDial at:
http://www.worldvisions.ca/wvdial
... This is probably the most popular of these interfaces. I've never used it personally (I edit my chat scripts by hand --- they aren't very long and I had to learn the syntax long before these tools existed).
However, I've heard many positive reports about it, so I can recommend it with some confidence. I notice from my Freshmeat search (to find its home page) that WvDial has been upgraded quite recently (earlier this month). So we have some indication that it's not suffering from "code rot" and neglect.
If you do have to create a chat script by hand here's what a typical one might look like:
TIMEOUT 30
ABORT BUSY
ABORT 'NO CARRIER'
"" ATZ
OK-AT&F-OK ATDT1234567890
CONNECT \d\r
ogin:-BREAK-ogin: MYUSERNAME
ssword:-\r-ssword: \qMYPASSWORD\q
"starting PPP..."
The first line sets the a timeout setting. The next two lines describe a couple of conditions under which chat should exit with an error exit value (if it receives either of these strings, it will ABORT the rest of the attempted dialog and call).
The following three lines are a simple modem dialog. The "expect" nothing (an empty string) and send a Hayes modem "reset" command (ATZ). If that doesn't result in an OK response then a "reset to factory defaults" is issued (AT&F). (If that doesn't result in the desired OK string then the script will time out and fail). Then we see an attempt to dial the phone and we wait for any sort of CONNECT string. We send a "delay" followed by a blank line. Those are indicated with the "escape sequences" as marked by the backslash prefix in \d and \r.
If your modem need some "init string" tweaks you'd insert them after the ATZ command.
The last three lines are a dialog between the remote system and ours. When a Hayes compatible modem connects it automatically shifts into "connect/communications mode" and ceases to interpret strings as commands. We'd send a "delay" followed by a "+++" to break back into the modem's command mode.
This dialog implements a simple login procedure. It expects a string like "login:" or "Login:" and sends a user/account name. The it expects a string like "Password:" or "password:" and "quietly" sends a password. (The "quietly" in this case refers to how 'chat' treats is "verbose" and "logging" output, and has NOTHING to do with its communications to the remote system). Finally our script expects an acknowlegement from the remote system indicating that it will now attempt to negotiate a PPP connection with us (using its implementation of PPP). Many people will not need this last line.
After this last expect string the script simply ends.
If 'chat' gets this far in the dialog it exits without returning any error (its system exit value is 0). Then the pppd program which spawned it resumes control of the file descriptor (/dev/modem) and attempts to negotiate a network connection over this new communications channel.
As we can see, spaces and line feeds separate the expect strings from the send strings. We have to quote any strings that contain spaces (using single or double quotes). The ABORT and TIMEOUT directives each take a single argument. That's why we have to use multiple ABORT directives to add a second abort string to the list. The dashes we've embedded in some of the expect strings implement a very simple (and somewhat crude) error response option. If the expected string (before the dash) is not detected within the timeout period, then the "error string" will be send to try to get the dialog back on track.
This is a very simplistic "language." It has not structures to support conditionals (IF/THEN/ELSE) or loops, etc. There are alternative utilities to implement more sophisticated chat scripting languages if you should need them. In particular you could use the 'expect' programming language (which is a TCL variant).
However ---- 'chat' is adequate for most cases (all that I've encountered so far).
One trick for getting the expect/send dialog that we need is to manually log into our ISP using 'minicom' or Kermit. We can then capture the dialog (on paper or using a "log to disk" feature or the 'script' (typescript) command.
One nice thing about using 'minicom' for this early stage of preparation and debugging is that we can manually login and "quit" out of minicom without resetting the modem. We can then invoke our PPP daemon with the chat script commented out. This should result in a working PPP connection (thus assuring us that our PPP options are correct and allowing us to focus purely on the chat script).
Getting back to our example PPP options file we see a series of comments. These can be used for doing debugging when we are having trouble with this connection. The first comment is a copy of the connect command line with the -v option added to 'chat' --- this provides us with verbose logging output (which is posted to our system logs so we can see our system engage in this dialog by reading our /var/log/messages file).
I usually login into one of my other virtual consoles when I'm debugging PPP connnections. You might just open an extra 'xterm'. From there just issue a command like:
tail -f /var/log/messages
... and leave it running. You'll see your log messages displayed as syslog receives them. (Actually on my own systems I add a line to my /etc/syslog.conf to post copies of all syslog output to one of my extra virtual consoles --- usually #24. But we won't get into that here).
The next couple of comments could be "uncommented" to direct 'pppd' to be more verbose as it runs (resulting in more output in our /var/log/messages).
The last couple of lines in this sample PPP options file are examples of how we might over-ride the maximum transmission and receive unit sizes, with a couple of common values to which we might force them. These mtu/mru settings might help us maintain faster, more robust connections under some line conditions and using some combinations of modems and other settings.
There are many other directives that we can put in your options files. Some might say there are TOO many.
These include options for enabling software flow control (if the crtscts directive won't work for your modem and cable, for example) and ways to note which control characters can't be cleanly transmitted over your connection (which will force pppd to "quote these" as multi-character sequences). There are several options to control the authentication and protocol negotiation between your PPP daemon and your ISP's system.
If you really want or need to know the gory details, read the 'pppd' man page.
Once our PPP daemon is communicating with our ISP's PPP implementation the two of them will usually negotiate a number of communications settings and most ISPs will then send us our IP address, netmask, and associated route.
The Linux 'pppd' will look for an executable /etc/ppp/ip-up and invoke that with a documented list of parameters (look in the man page). This can be used to set up additional services or doing any other custom event handling. Perhaps you want to resynchronize your system clock with an NTP server or three whenever you start up a new IP connection and run 'xntpd' for the duration, or perhaps you only want to run the 'ntpdate' command on the first connection of any given day. Perhaps you want to register your new, dynamically assigned IP address with some dynamic DNS system or announce that you're "online" to one or more of these "ICQ" services, etc.
There is also a /etc/ppp/ip-down hook and some analogous scripts for IPX handling.
Getting back to our bulleted list. When we've created a suitable options file and a working chat script we'd then generally create a script to call pppd with the appropriate options to use them.
This might be as simple as:

#!/bin/sh
/usr/sbin/pppd file /etc/ppp/options.MYISP
... which would simply instruct the PPP daemon to read our options file in addition to the global one (/etc/ppp/options).
In other cases we might have to prepare our serial port with commands like 'setserial' and 'stty'. 'stty' has an unusual syntax since it performs ioctl() calls on its stdin (standard input) file descriptor. Thus we have to use a command like:
stty crtscts cs8 -clocal 38400 < /dev/modem
... to actually affect the modem. Note that the redirection is FROM the device rather than to it. 'stty' is the only command that I know of that requires this odd syntax. The fact that I understand why it works this way doesn't make it any better for most users.
Hopefully your Red Hat installation is properly handling the serial ports on your system already. Otherwise you might have to play with the 'setserial' command which I simply don't have time to explain here.
As I've said, pppd will automatically invoke the ip-up and ip-down scripts as appropriate. So usually the invocation of pppd will be the last line in your "call.MYISP" script. You could do some scripting to retry several times, or try alternate numbers or alternative ISPs if your connection fails too often. In those cases you might want to use the -detach directive in your PPP options file.
Its possible to include most or all of your PPP options on 'pppd's command line (and it's possible to include your chat script on 'chat's command line; so with clever quoting you could have a long messy line that didn't rely on any of the custom configuration files that I've described here).
However, pppd is complicated enough without being downright obfuscatory.
The last bullet point I mentioned referred to "/etc/ppp/pap-secrets and/or /etc/ppp/chap-secrets" files. Some ISPs may be using the PAP or CHAP authentication protocols (which are built into Linux pppd). If so they should provide the name and password (secret) along with your other account information (like their phone numbers, and the IP addresses of their preferred nameservers). Generally the use of these authentication protocols should shorten and simplify your chat script. In our example the second part of the chat dialog (the host-to-host part) performed our authentication.
I realize that this was a long-winded (some might say excruciating) description of a very simple PPP configuration. I go into this much detail (and even into a few digresssions) in the hopes that it will help you and others who have tried to read the HOWTOs and the man pages and walked away in utter confusion.
Notice that this whole handling of the 'pppd' options files and the 'chat' scripts is the hardest part of getting Linux connected to your ISP. The fact that there so many options and several different files, and the fact that these all have to be consistent with one another in fairly complex ways it what confuses new users (and occasionally trips up even the most experienced of us).
When I'm teaching classes for Linuxcare (one of my roles with them) I refer to these as "moving parts." Any time we have a list of options that must correlate to one another to get a particular feature or subsystem (like PPP) working it requires a bit of explanation was to how all of these options fit together.
I usually draw a mechanical analogy. If I try to put a Toyota start motor into a typical Ford truck, it won't work. The pieces will almost certainly not fit together. The teeth in the starter's shaft will probably not mesh with those on the flywheel. The solenoid's throw might not push the start shaft out far enough to even engage them. The mounting holes probably won't line up, and the bolts probably wouldn't fit even if they did. (Of course this analogy provides a bit more detail than most people with no automotive inclinations appreciate; but the idea has been pretty clear to my students so far).
This concept of "moving parts" is a recurring theme in all technical education. There are many "moving parts" in MS Windows --- places where the value you put in one dialog box must "match" a different value in some other dialog, control panel or registry tree.
Often the settings on one machine must match settings on a different machine. In fact, that is the essence of networking.
So, having gone into great detail on this central question we'll finish by providing somewhat shorter answers to your other questions.
As I pointed out, most ISPs will provide your IP address through the PPP protocol. They should also provide forward and reverse DNS mappings between your IP address and some name (often dyn-123.myisp.com or dialin-123.somepop.myisp.com; where pop in this context refers to a "point of presence" --- a location where your ISP has modems and phone lines that connect to their network).
Netmasks and broadcast addresses are handled automatically by PPP. The basic interface route is also handled by the PPP daemon, as is the default route in most cases.
Your ISP will probably provide you with a list of preferred name servers. You simply put those in your /etc/resolv.conf which should look something like:
domain starshine.org
search starshine.org
nameserver 123.45.67.89
nameserver 12.3.5.67
nameserver 12.3.5.78
If you were setting up your own network domain you'd have to register it with some naming authority (currently the InterNIC/NSI for the .com, .org, and .net domains, and various regional registries for the various national and .us state domains). When you registered your domain you'd also register a list of authoritative name servers (by IP address). These would have to be persistently online (through some form of "dedicated 24x7" connection to the Internet.
Usually small domains run by inexperienced used simply let their ISP handle all those details. They "outsource" their DNS management.
I've written other articles in the past that go into way too much detail about configuring your own DNS. That, and the fact that you almost certainly do NOT want to do this for yourself are reasons while I'll leave off further discussion of DNS here.
Basically everything is handled by your PPP configuration except for the contents of your /etc/resolv.conf.
If you have multiple ISPs you can use the ip-up script to force a symlink change whenever you connect. You create multiple /etc/resolv.conf.* files and use your script to create the appropriate symlink whenever you bring up the interface. This also works reasonably well when you are using DHCP, connecting your laptop to someone's ethernet network.
You can then point your /etc/resolv.conf to /etc/dhcpdc/resolv.conf (or wherever your DHCP client puts it).
It's also possible to just leave one set of nameservers listed in your /etc/resolv.conf and ignore your ISPs preferred list. This may result in slower response time and some wasted bandwidth (your name resolution requests will travel farther across the Internet before being answered). However, it usually works well enough for the case where you have a secondary ISP that you only call occasionally.
I've described a little bit of the complexity of e-mail handling already.
Basically you'll need at least a mail user agent (and MUA). Some MUAs (like Netscape Communicator and PINE) have integrated POP/IMAP clients and transport agents.
Others (like elm, mh, and mutt) will only provide the interface for reading, composing and managing your mail. They will require the use of separate utilities to receive your mail (i.e. 'fetchmail' for POP or IMAP mail stores) and to deliver it (typically 'sendmail' configured to "masquerade" as your ISP or vanity domain).
In your particular case it might be easiest to start with one of the "all-in-one" mail clients. I personally don't like their approach. However they can be simpler for a common case, even if they will cause problems for some networks where more centralization is required (behind firewalls and on private networks, for example).
If you need or want to configure a proper MTA then 'sendmail' is still the most widespread (a statement which will surely generate some flames from some 'qmail' fans our there). Here's is a simple sendmail "mc" (macro configuration) file:
divert(0)dnl
OSTYPE(linux)
include(`/usr/share/sendmail.cf/m4/cf.m4')
FEATURE(`allmasquerade')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`masquerade_entire_domain')dnl
FEATURE(`always_add_domain')dnl
FEATURE(`nocanonify')dnl
FEATURE(`local_procmail')dnl
MAILER_DEFINITIONS
MAILER(`smtp')dnl
MAILER(`local')dnl
MAILER(`procmail')dnl
undefine(`BITNET_RELAY')dnl

MASQUERADE_AS(`***MYISP.COM***')dnl
define(`SMART_HOST', `smtp:***MAIL.MYISP.COM***')dnl
There are only two major "moving parts" to this file. You must change the last two lines to to match the domain/host name at which your ISP will accept mail for you (the part of your e-mail address after the @ sign) and you must provide a valid mail exchanger for your SMART_HOST.
This file would normally be created under /etc/mail/ or under /usr/share/sendmail-cf/ and would be used to generate a sendmail.cf file with a command like:
m4 < sendmail.mc > /etc/sendmail.cf
... issued from the same directory as the .mc file, of course.
Of course those other lines are also "moving parts" --- you might need to change the path to the include line, and you might need to include or even disable some features, etc. Like so many other coniguration files in Linux, all I can provide is a reasonable example that should work in many cases.
I've included other sample .mc files in other Answer Guy columns in the past. Usually I include one that's derived from whatever I'm running at home at any given time. This has changed over the years as I've changed my network, changed ISPs, etc.
For this to work smoothly you should create an account on your system that matches your account name on your ISP, and use that to work with your e-mail from that address. It's possible for you to control the name/address in your outgoing e-mail headers as well as the domain/host name portion. In other words you could configure 'sendmail' to modify the portion of your e-mail address that precedes the @ sign in the headers of your outgoing mail, as well as the part that follow it. However, that would require you to use the "genericstable" feature which is somewhat more advanced than I want to go in this message. (This is another case where the "all-in-one" mailers are easier to use. They'll generally let you set your e-mail address to anything you like without regard to any local system or network policies).
I think I've answered this one. 'chat' is your "Dialer" for the PPP daemon. Most other Linux/UNIX communications packages perform their own dialing by issuing ATDT (dial/tone) commands to the modem. If (by some strange chance) you had a phone that required the old pulse dialing (a rotary phone!) you'd use the ATDP command.
Al,
I realize that this has been a long article. I know that I've repeated myself in a few places (it's been written over several days, with a trip to L.A. and a conference in the middle).
Hopefully this will give you enough of a map of the forest that you can figure out which trees to climb, which ones to chop down and which branches to ignore.

(?) Cash In On ... Spam!

From mindkiss on Wed, 28 Jul 1999


Cash In
On a Hot Opportunity!

Earn Full Time Income
On a Part Time Basis!
No special skills needed!!


Please Read This First

1. This email advertisement is transmitted in compliance with the new "Email" Bill: SECTION 301. Per Section 301, Paragraph (a)(2)(C) of S1618; Refer; http://www.senate.gov/~murkowski/commercialemail/5771index.html

[ Hundreds of bills on many juicy political issues are promoted by senators and representatives every year. Until they are actually passed (thus no longer a bill, but a law) they're fairly worthless. This one is made more obvious, because its URL doesn't work...

The computer industry ought to recognize when people claim compliance with a "new standard" that hasn't been ratified yet; it happens in our marketing literature all the time. -- Heather ]

(!) I don't care what delusion you are under. This is unsolicited spam. I've heard that it is illegal in the state of California --- which is my state of residence and where I'm sitting as I recieve this.
I'll be forwarding this along to by district attorney's office (once I dig up their e-mail address).

(?) 2. If you wish to be removed from our email list with respect to any further transmissions, you may do so without cost by simply clicking on your email program's "Reply" option and entering the word "Remove" into the "Subject" area.

(!) I wish to never have recieved your mail. I don't wish to ever hear from you or any of your ilk again.

(?) 3. The business solicitation described below is offered by a real Florida based corporation (name removed, Inc.), with a real address, real people and real products. Company details and testimony may be obtained by calling toll free 1-888-nnn-nnnn.

(!) Whoop-de-doo! You're a "real corporation." That certainly doesn't preclude the likelihood that you are lying, thieving scumbags with no regards for courtesy or custom.
You're clearly unethical. You KNOW that this message is unwelcome to most of your recipients and you sent it anyway. Do not respond to this mail.

[ To their credit... they didn't. For more help in the fight for valid mailbox contents, the Mail Abuse Prevention System (http://maps.vix.com/) is handy, and also points to other good resources. -- Heather ]

"Linux Gazette...making Linux just a little more fun!"


More 2¢ Tips!


Send Linux Tips and Tricks to gazette@ssc.com


New Tips:

Answers to Mail Bag Questions:


Using gmenu with fvwm2

Sun, 01 Aug 1999 16:35:00 -0500
From: Tim Moran <tmoran@gbonline.com>

I usually use fvwm, but sometimes I like to switch to enlightenment. The problem was maintaining two sets of menus. So, with a little tweaking, I now use the gnome menu editor to maintain both.

Enlightenment is simple. The menu.cfg can read gnome's menus with:

BEGIN_NEW_GNOME_MENU("GNOME_USER_SUBMENU", "ROOT", HOME_DIR"/.gnome/apps")
ADD_MENU_TITLE("User Apps")
END_MENU

Fvwm was a bit tricky. I probably am not using the best possible solution, but it works for me.

I recompiled wmconfig that comes with RedHat 6.0. In wmconfig.c there is a section that begins #if HAVE_GNOME. I changed this to read my ~/.gnome/apps directory:

ret = parse_gnome_files("/home/tmoran/.gnome/apps", NULL);

Then I made a little shell script to run wmconfig and clean up some unneeded files:

#!/bin/sh
wmconfig --output=fvwm2 --no-sysdir --rootmenu="ROOTMENU" > .fmenu
find /home/tmoran -name .order -exec rm -f {} \;
find /home/tmoran -name .directory -exec rm -f {} \;

Finally, my .fvwm2rc contains:

AddToMenu RootMenu	
+			"&Rxvt"		Exec exec rxvt
+			""		Nop
Read /home/tmoran/.fmenu
AddToMenu RootMenu	
+			""		Nop
+			"&Fvwm Modules"	          Popup Module-Popup
+			""		Nop
+                       "Refresh Screen"   Refresh
+			""		Nop
+			"&Exit Fvwm"	Popup Quit-Verify


Iomega ATAPI Zip Drive That Cables Up to IDE & Red Hat 6.0

Tue, 17 Aug 1999 11:15:40 -0700
From: rbsimon <rbsimon@earthlink.net>

A simple way to mount your ATAPI Zip drive is to:

  1. Create a mount point, e.g. /mnt/zip
  2. Install loadable kernel module: 'insmod ide-scsi'
  3. Mount the device: 'mount -t msdos /dev/sda4 /mnt/zip'
  4. To unmount: 'umount /dev/sda4'


A 2c Tip - Funny signature

Wed, 18 Aug 1999 20:58:49 +0200
From: Csaba Feher <csfeher@freemail.c3.hu>

Hello guys,

I just make up my mind to write a short shell-script to do some fun. It is for making funny signatures with 'fortune'. You can use it with your mailing software that can handle signatures. I tested it with Netscape and Pine, with a Mandrake Linux distro.

You need:

  1. the 'fortune' application. I think many of you have it under /usr/games/ (Or somewhere else, so you may edit the script if you need to.) If not, your installation media or a close FTP mirror should have it.
  2. an 'sh' compatible shell...
  3. the script below. I call it 'sigchange'.
  4. a .signature file in your home directory (optional)
#!/bin/sh
#
# sigchange
#
# A simple shell script to get your .signature file looking more funny....  
#
# Written by Csaba Feher (csfeher@freemail.c3.hu)
#

# First, if .signature exists, we just remove it, in order to start with an empty one if [ -f $HOME/.signature ]; then rm -f $HOME/.signature fi

#Then, make some good-sounding signature with the help of 'fortune'. #The -s option is because of Netscape, it says that the estimated length of the signature was 4 lines. #You may alter the categories to suit your needs. I prefer these two... /usr/games/fortune -s linuxcookie computers > $HOME/.signature S=$(cat $HOME/.signature)

#Take a short look at your basic signature file, #which you may want to appear at the end of all newly-made signature. #Create & edit as you like. But, I suggest to keep it short. O=$(cat $HOME/.signature.basic)

#Now put the whole stuff to the usual place echo -e "$S\n $O" > $HOME/.signature

Usage:

  1. Use the script and make it executable for everybody you want to be able to use.
  2. Copy it under /bin or /usr/bin, or wherever you want to. Do not forget to check your PATH variable, it should include the path to 'sigchange'.
  3. Add the following line to your system initialization script:
    sigchange
    
    This is /etc/rc.d/rc.sysinit for Mandrake or Red Hat; it may be different in other distributions. You should check and find the script that initializes and boots up your system. The .signature will change each time you reboot your Linux box.
  4. If you prefer more changes, you can add a line containing this:
    sigchange
    
    to /etc/rc.d/rc (Mandrake/Red Hat). It starts 'sigchange' each time the runlevel changes.
  5. make a .signature.basic file in your home directory, or rename your existing .signature file to it. Edit it to contain a suitable signature you want to use at the bottom of your mails. I think you should keep it short.

Changes are made at the next reboot /runlevel change.

Feel free to use and enjoy it! Any comments are welcome!

p.s.: my recent signature is made with this method...

--
But what can you do with it? -- ubiquitous cry from Linux-user partner.
(Submitted by Andy Pearce, ajp@hpopd.pwd.hp.com)

### Keep on running LINUX! # Csaba Feher # csfeher@freemail.c3.hu ###


HOWTO searching script

Wed, 25 Aug 1999 11:56:57 -0400 (EDT)
From: Matt Willis <matt@optimus.cee.cornell.edu>

I find that searching howtos is easier if you use a script. I was inspired by another program to write a semi-smart howto script. You use it like:

howto lilo

and it searches for lilo, Lilo, LILO etc in the HOWTO tree, and then finds LILO. If something is not found, it lists suggestions.

- Matt Willis

#!/bin/csh

# HOWTO Database searcher with limited smarts

setenv HOWTOBASE /usr/doc/HOWTO
setenv HOWTOPATH `find $HOWTOBASE -type d -print`
setenv FOUND 0

setenv NAME1 $1
setenv NAMELC `echo $1 | tr 'A-Z' 'a-z'`
setenv NAMEUC `echo $1 | tr 'a-z' 'A-Z'`
setenv NAMEPC `echo $1 | awk '{print toupper(substr($1,1,1)) substr($1,2)}'`

foreach NAME ($NAME1 $NAMELC $NAMEUC $NAMEPC)
    foreach k ($HOWTOPATH)
        if (-f $k/$NAME-HOWTO) then
            echo $k/$NAME-HOWTO
            less -r $k/$NAME-HOWTO
            setenv FOUND 1; break; break
        else if (-f $k/$NAME) then
            echo $k/$NAME
            less -r $k/$NAME
            setenv FOUND 1; break; break
        else if (-f $k/$NAME-HOWTO.gz) then
            echo $k/$NAME-HOWTO.gz
            gunzip -c $k/$NAME-HOWTO.gz | less -r
            setenv FOUND 1; break; break
        else if (-f $k/$NAME.gz) then
            echo $k/$NAME.gz
            gunzip -c $k/$NAME.gz | less -r
            setenv FOUND 1; break; break
        endif
    end
end

if ($FOUND == 0) then
    echo "Was unable to find '$1' .. possible matches:"
    # use case-insensitive name search (iname)
    setenv MATCH `find $HOWTOBASE -iname ''\*$1\*'' -print`  
    if ("$MATCH" == "") then
        echo "Nothing (sorry)!"
    else
        foreach k ($MATCH)
            echo $k | sed 's/^.*\// /'
        end
    endif
endif


Tips in the following section are answers to questions printed in the Mail Bag column of previous issues.


ANSWER: Splitting big files

Wed, 04 Aug 1999 13:41:02 +0200
From: Finn Jespersen <fje@ficsgrp.com> Laurent Mulot (Laurent.Mulot@anp.lip6.fr) wrote:
I'd like to truncate a 3MB file so that I can put it on floppy disks. The file is already compressed. Is there a Linux instruction or a software that can do such a thing ?

Every Linux comes with the GNU utilities. One of these is "split" which will do the job. Read man split or info split.

To split a file into floppy sized files

 	split -b1440k a_whopping_big_file chunk

which produces chunkaaa, chunkaab, chunkaac etc.

Use mcopy to copy to/from floppy. To re-create a_whopping_big_file do

 	cat chunk* &gr; a_whopping_big_file

Hope this helps.
Finn

Martin Benthues <na1374@fen.baynet.de> suggests:

The required task is rather easy to be achieved if both source and target system are linux and have GNU tar installed.

Assume floppy drive is a 3.5" drive at /dev/fd0

Copy to disk:

tar -c -f /dev/fd0 -L1440K -M 

Copy from disk:

tar -x -f /dev/fd0 -L1440K -M 

tar will prompt the user to enter a new disk when ever it made one full.

Note:
The floppy disks will be overwritten without warning. Any old content is lost. No useable file system is installed. The disks are treated as a "tape" containing a set of blocks. For any later use with an operating system (DOS, Linux) the disks need to be reformatted.

Best regards,
Martin Benthues

Brian <vocalist@home.com> says:

Short explanation: If you use the 'split' command, you can split a file up into chunks. Once onto a floppy, you can transport the file. When you want to reclaim the files, you can simply copy them back to hard drive and use 'cat' to put them back together.

Long (full) explanation: I have a 292529 byte file named lasg-0-0-9.pdf on my hard drive, and I want to save it in chunks (or less) so I can put it on floppy for saving... You can see that no chunk is larger than 1K, as specified by the -C1k option to 'split'. The second option un this example is the name of the original file, and the third option in this example is the name of the output file prefix. The prefix is followed up by a unique string which ensures that when concatenated in a sorted order that you get the same file back. I tested this with the command

cat lasg-0-0-9.pdg[a-z][a-z]* > tmp.lasg-0-0-9.pdf 
and the resulting file tmp.lasg-0-0-9.pdf was identical to the original file.
% split -C1k lasg-0-0-9.pdf lasg-0-0-9.pdf
%ls -al 
Total 655
drwxrwxr-x   2 vocalist users        9216 Aug 21 08:53 .
drwxr-xr-x  20 vocalist users        2048 Aug 21 08:50 ..
-rw-rw-r--   1 vocalist users           0 Aug 21 08:53 data
-rw-rw-r--   1 vocalist users      292529 Aug 21 08:50 lasg-0-0-9.pdf
-rw-rw-r--   1 vocalist users         898 Aug 21 08:52 lasg-0-0-9.pdfaa
-rw-rw-r--   1 vocalist users         738 Aug 21 08:52 lasg-0-0-9.pdfab
-rw-rw-r--   1 vocalist users        1024 Aug 21 08:52 lasg-0-0-9.pdfac
-rw-rw-r--   1 vocalist users        1024 Aug 21 08:52 lasg-0-0-9.pdfad
[Lots and lots of lines not shown. -Ed.]
-rw-rw-r--   1 vocalist users        1020 Aug 21 08:52 lasg-0-0-9.pdfno
-rw-rw-r--   1 vocalist users        1000 Aug 21 08:52 lasg-0-0-9.pdfnp
-rw-rw-r--   1 vocalist users         118 Aug 21 08:52 lasg-0-0-9.pdfnq

Jimmy O'Regan <joeregan@tinet.ie> chimes in:

You can find out more by typing "man split" or "info split".

But in your case you'd probably want to try

$ split -b 1380k your.file your.file.
So it'll split the file "your.file" into files of 1.38m in size (ideal for floppies), named your.file.aa, your.file.ab and your.file.ac (etc if you use a different size).

You can rejoin them with

$ cat your.file.aa your.file.ab your.file.ac & your.file

J.

Remco Schellekens <merty@xs4all.nl> suggests:

dd will do the trick.

Use it in the form:

dd if=your-input-file of=first-out-file skip=0 count=2840
dd if=your-input-file of=second-out-file skip=2840 count=2840
dd if=your-input-file of=third-out-file skip=5680 count=2840
...and so on.

Assuming blocksizes are 512 bytes, so the count of 2840 is approx. 1.4 Mb To get the file back just use cat command:

cat first-out-file > your-file
cat second-out-file >> your-file
... and so on

of course it will be a bit easier if you make a shell script of it.

Thats it.

Roland Smith <rsmith@xs4all.nl> also suggests:

3) Zip the file and use zipsplit to split it into files that will fit on a floppy.

Hope this helps.


ANSWER: Formating drives

Tue, 03 Aug 1999 22:43:10 +0100
From: Murray Gibbins <wibble@morpheus.ednet.co.uk>

Hi,

if e.g. your LS120 is on /dev/hdb try

mksf -t ext2 /dev/hdb

or some variant thereof.

Yours
wibble


ANSWER: Kodak Problems

Tue, 03 Aug 1999 22:48:24 +0100
From: Murray Gibbins <wibble@morpheus.ednet.co.uk>

Investigate using Perl and ImageMagick, it will automate the proccess and do everything you want.

Yours
Wibble

Zak <zak@acadia.net> responds:

I would like to thank each and every person who responded to my question about using gimp with the subject disk. The problem was that when I put the images on the HD (using Mcopy, since the Kodak(c) Picture Disk is a DOS/'doze thingee), they were upside-down (and I later found *were* left to right), and that I couldn't figure out how gimp worked. I use RH 5.1.

One of the replies suggested I try 'xv', so I looked in my RH5.1 manual, and found on page 6 that it had been replaced. I checked out my 5.1 CD (I bought the 'official box') and guess what...it's there! I tried it and it not only flipped the images 'rightsideup', but can also flip 'em right-to-left, and much more. Now here's the kicker: about two weeks ago I put another roll of film in and requested the disk when it was processed. When I got the pix and disk back, I stuffed the disk into FRED and called up 'xv' so that I could flip the pix again.

They were all set up correctly on the disk! I didn't have to do anything with them. Do you think maybe someone from Kodak reads Linux Gazette, too?

Zak


ANSWER: Installation problems

Tue, 10 Aug 1999 17:13:27 +0200
From: Michael Planes <Michael.Planes@bull.net>

Hi, I hope you already had an answer from the net. Otherwise, I just got last week the very same problem with a quadri Xeon and 1GB of RAM:

scsi : 0 hosts
scsi : detected total
Partition check
VFS: Cannot open device 08:21
Kernel panic: VFS: Unable to mount root fs on 08:21
Many reboots later (and many configuration changes) I finally succeeded when I added an option when booting linux kernel:
   linux mem=128M expert

I checked on the web that other people already had this problem and fixed it (removing memory, adding boot option, etc...) It would have been nice if such an information had been clearly available at RedHat. I hope it will be. bye,


ANSWER: DNS on the fly

Tue, 10 Aug 1999 17:13:27 +0200

From: Jim Bradley -- Maryville, MO USA <jbradley@msc.net>

I have my laptop configured to plug into the network of my employer. At home, I plug my laptop into my home network, and dial out from another machine setup for dial on demand. Unfortunately, if it takes forever waiting for the two timeouts when trying to connect to the employer's DNS servers from home, and if I change the DNS order, it takes just as long for the timeout error when attempting to connect to my ISP's DNS from my employer's network. Is there an easy way to change the DNS servers when needed? It's easy enough to change IP addresses with the ifconfig command, is there a similar means for changing the DNS? Or, should I just bite the bullet and setup BIND on the laptop?

My apologies if it doesn't - I've made enough changes to my setup that I could have automated it myself. I don't keep multiple copies of /etc/resolv.conf yet get the correct DNS server. I know for certain that DHCP makes the update.

The only change I _remember_ making that's related to this is I generate the hosts file at bootup, since the only thing I keep in my hosts file is localhost and the hostname. Primarily because the long hostname can change based on which network I'm connected to (or even not connected at all).

Ted

C Ted Wise <twise@jamesmartin.com> replies:

Your DNS server(s) are defined in the /etc/resolv.conf file. If you're using DHCP or PPP, this should be updated automagically with the correct server. If you're defining everything by hand, you'll need to modify this file to reflect the correct DNS server. Changes to the file may not be reflected in already running programs (daemons).

If you're not running a DHCP server on your home network, consider one, it will greatly ease the pain of moving the laptop between locations.

The Linux Gazette Editor writes to Ted:

Since when did Linux PPP start automagically updating the DNS server? Windows does this, but in my experience Linux does not. You have to have several /etc/resolv.conf files, and use a symbolic link to point to the "current" one. You can have a shell script that does this and calls pppd.

Ted responds:

I've been using the KPPP dialer under KDE and that one definitely makes changes to the /etc/resolv.conf file. When it makes a connection, it modifies the file - commenting out the existing lines and adding ones applicable to the PPP connection. When you exit the application, it restores the original file.

From the comments in the file, it looks to be behavior specific to KPPP. This is where my confusion came in. My home server is running DNS and masqs through to the PPP interface so the /etc/resolv.conf file doesn't change based on the PPP connection. It's only my laptop that needs this and I was making the assumption (I know, I know) that KPPP was just a pretty face on PPPD.

[Conclusion: pppd knows nothing about /etc/resolv.conf. KPPP rewrites it on the fly. DHCP does the Right Thing somehow automatically. Any more comments? -Ed.]

Ernst-Udo Wallenborn <wall@phys.chem.ethz.ch> suggests:

i use the SCHEMES facility of the PCMCIA package to solve a related problem: how to use a laptop in two LANs with different IP addresses, different domains, and (naturally) different DNS servers.

Basically you set up a file /etc/pcmcia/network.opts which contains all network options, esp. something like

case "$ADDRESS" in
home,*,*,*)
[snip]
    SEARCH="domain.com"
    DNS_1="1.2.3.4"
    DNS_2=""
    DNS_3=""
[snip]
    ;;
work,*,*,*)
[snip]
    SEARCH="work.com"
    DNS_1="5.6.7.8"
    DNS_2=""
    DNS_3=""
[snip]

Then, when booting with lilo you can append SCHEME=home or SCHEME=work, or better write this into /etc/lilo.conf directly. and type 'home' or 'work' at the lilo prompt.

The whole procedure is described in detail here: www.suse.de/sdb/en/html/ke_pcmcia-scheme.html

and the PCMCIA package is available here: hyper.stanford.edu/~dhinds/pcmcia/pcmcia.html

hope this helps

--
Ernst-Udo Wallenborn
Laboratorium fuer Physikalische Chemie
ETH Zuerich


ANSWER: ipchains

Tue, 10 Aug 1999 15:19:38 -0600
From: Warren Young <tangent@cyberport.com>

"Martin L. Ferguson" wrote:

I saw your "$0.02 Tip" response in Linux Gazette (copied below), but the URL for the "scipts" section was not included. Could you send it to me - I would like to look at a comprehensive ipchains configuration. Thanks.

[snip]

From the Gazette:

I think perhaps you are missing a few important rules, such as rules to allow DNS replies. My own script for enabling masquerading and firewalling is available at the URL below, in the "scripts" section.

The URL my message mentions was in the signature. It is apparently the policy of the Linux Gazette to chop signatures from messages, so it didn't appear in the Gazette. (I'm Cc'ing this message to the Gazette's editor, in case they want to fix that page.)

The URL is www.cyberport.com/~tangent/ix/scripts/

The scripts I refer to in my original message are "firewall-enable" and "firewall-disable".

[Added the URL to the previous article. The directory also contains some other scripts to tar a directory, replace tabs with spaces, do a hex dump, etc. And yes, I do chop off signatures. :) -Ed.]


ANSWER: gcc will not work

Fri, 13 Aug 1999 00:25:55 +0200 (CEST)
From: Roland Smith <rsmith@xs4all.nl>

Hi,

I saw your e-mail in the Mailbag section in the Linux Gazette.

I think you have not installed the binutils package. This contains some programs that gcc needs to make executables out of a bunch of object files.

Hope this helps.


ANSWER: DHCP

Fri, 13 Aug 1999 00:33:38 +0200 (CEST)
From: Roland Smith <rsmith@xs4all.nl>

Concerning your question of adding a Linux workstation to a network that uses DHCP:

You probably have a mini-HOWTO available (if you have installed them, which is wise): /usr/doc/HOWTO/mini/DHCPcd.gz

You'll need the DHCP client. Check if it is available in your distribution, or get it at ftp.kobe-u.ac.jp from the directory /pub/PC-UNIX/Linux/network/dhcp

If you're using Red Hat you can use the control-panel to set up eth0 for DHCP.

Hope this helps!


ANSWER: ppp connection

Fri, 13 Aug 1999 00:43:42 +0200 (CEST)
From: Roland Smith <rsmith@xs4all.nl>

You wrote:

I have an interesting problem. I have configured ezppp, kppp, and gnome-ppp to connect to my mindspring account, and all three seem to be doing so just fine. However, when I startup netscape or any other internet application, I can't access the internet. It just sits there trying to lookup the host. No error message. No nothing. I am completely stumped. Any help would be appreciated.

Some things you could look at:

  1. Do you actually make a connection with ppp before starting netscape? You'll need additional software if you want to be able to dial in automagically every time you try to reach the internet.
  2. Have you added your ISP's name-server to /etc/resolv.conf?
  3. he /etc/host.conf file configured correctly? It should consist of these two lines:
    order hosts,bind
    multi on
    

Hope this helps!


ANSWER: ASCII to speach

Fri, 13 Aug 1999 01:34:06 +0200 (CEST)
From: Roland Smith <rsmith@xs4all.nl>

From your mail in the Linux gazette it is not clear what you're looking

for.

Your subject line says you're looking for ascii to speech conversion. For that you could try "rsynth" or "festival". (look at freshmeat.net for URL's)

Voice recognition software for Linux is something else altogether. I think IBM has released some software for this.

[Thanks, Roland, for all your answers. -Ed]

Jimmy O'Regan <joeregan@tinet.ie> adds:

ASCII to speech and speech recognition are complete opposites, but you can find most software available for Linux for either purpose at the BLINUX site - http://leb.net/blinux/ or at http://leb.net/pub/blinux

J.


ANSWER: 2GB Limit in LINUX

Thu, 19 Aug 1999 16:08:23 -0700
From: Greg Morse <greg_morse@bctel.com>

This limit does not apply even if the BIOS does not support the large drive. I recently added an 8GB drive to an old Compaq prolinea 133. the DOS fdisk could see the drive but not use it. Linux (RH6.0) however happily created an 8GB filesystem on the drive.

JGM

Niels Elgaard Larsen <elgaard@diku.dk> writes: 1. It is _not_ down to the BIOS. You can just give the geometry as arguments to 'fdisk' 2. Do not trust the information from the maker of the disk. I installed a 10 GB IBM disk. The geometry printed on the disk and shown on IBM's web-side was identical to the geometry of their 8GB disk. I think they rely on special software to make it work on Windows. I assumed sectors and # of heads were correct and computed # of cylinders from the capacity and fed it to cfdisk. It works.


ANSWER: Windows 98 inside Linux

Sat, 21 Aug 1999 08:39:45 -0400
From: Brian <vocalist@home.com>

Dear Markus,

If you'll visit www.vmware.com, you'll see their product VMWare - written up in the July 1999 issue of Linux Journal, or for subscribers interactive.linuxjournal.com).

VMWare will allow you to run a number of different Virtual Machines on top of your Linux box. See the web page for the details. Oh - the price is $299, I'm considering it so that I can test Java on a Windows platform without actually having Windoze in control of my hardware. :)


ANSWER: Distributions

Wed, 25 Aug 1999 01:18:59 -0400
From: Steve Wolfe <swolfe@InfoAve.Net>

Someone more knowledgeable than I could probably tell you the exact differences between Suse and Red Hat. There is more activity on Red Hat.

A more important question is, "What Distribution are people around you using?"

Unix/Linux is not too hard to learn - but it is different than windows. Try to find a User's group and/or computer store that has Linux around and then you can see it and talk to people. I liked the book "Life with Unix" to give a good grounding on what to expect. The O'Reilly books are invaluable. I also like the printed collections of the Linux Documentation project containing the System's Administrator's Guide and the Network Administrators Guide and the How-tos.

I used to the idea of a dual boot system - so you can use either Linux or Win xx, but not at the same time. This works for a while. The drawback is that you cannot use both at the same time. The best order of events (briefly) is 1) partition, 2) install Winxx 3) install Linux and Lilo.

Two machines are better yet. With a small LAN you can then telnet or use an X-windowing program to use both machines - This is what I do now. Several X-server programs exist for Windows. Hummingbird's Exceed, Reflection's X-windows suite, and StarNet's (x-win32) are three good ones and I have used all three.

I have heard some use of virtual machines (vmware makes one) in which you can use two operating systems at the same time on the same machine - but I have not tried it.

After reading the documentation you can mount a FAT partition from Linux and use it as a way to transfer data back and forth between machines. If you have two machines the network takes care of the file transfers. Remember that a Unix/Linux text file has only linefeeds and a PC-DOS text file has Carriage return and Linefeed.

-Cheers,
Steve Wolfe


ANSWER: WORD to Postscript

Thu, 01 Jul 1999 14:14:54 -0400
From: Reno Derosier <renod@capecod.net>

In regards to the .prn file you might try downloading Adobe's Postscript drivers for windows at www.adobe.com/prodindex/printerdrivers/main.html.

Reno Derosier


ANSWER: g++ and including files that use templates

Wed, 4 Aug 1999 00:13:59 -0700 (MST)
From: Rachael A. Ludwick <raludwic@U.Arizona.EDU> jac <jac@speedcom.es> writes:
Hello, my question is about the g++ compiler.I want to know if is able to link files that use templates and then aren't included in the main program (they are in different files, and only the header files are in the main program). I have try as:
         gcc main.cxx libro.cxx
        * main: #incude "libro.h"...
        * libro.cxx: #include "libro.h"...
	
But the compiler of Red Hat 6.0 gives me an error. Could you help me? Thanks.

Juan J.Alejandro (jac@speedcom.es) Girona (Spain)

------------------------------------------------------------------------

I'm not sure if this will help, but here goes...

An annoying thing about C++ is that templated classes require that both the declaration and the implementation be in the same file. Instead of actually putting both in one file, often the header file will have the line:

#include "class.cc"  // or whatever the implementaion file is called
near the end of the file (after the declaration of the class). In this case though, the implementation usually goes in a file called "class.template" and #include "class.template" will be put in "class.h" somewhere near the end of the file (after the complete declaration of the file).

Also, don't forget to guard your class from multiple include-ing by putting something like this as the first two lines:

#ifndef MYCLASS_H
#define MYCLASS_H
and something like this as the last line:
#endif // MYCLASS_H

Anyway, if you have the implementation and declaration in separate files, and you don't have this yet, than this may be your problem. Assuming this will fix your problem and you have a "main.cc" and templated "class.h" and "class.cc", you should be able to compile with:

g++ -I. main.cc

(of course assuming main.cc has #include "class.h").

Tell me if this helps...

Rachael Ludwick

--
raludwic@u.arizona.edu
http://www.u.arizona.edu/~raludwic

"Go Ye Lemmings into the World and Propagate!"


This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1999, Specialized Systems Consultants, Inc.
Published in Issue 45 of Linux Gazette, September 1999


Copyright © 1999, AuthorName
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Living La Vida Linux

By Bill Bennet


Have you ever thought about how things would be different if linux was never written? It makes me shudder with fright and revulsion to think of all the new computer customers lining up happily to get soaked for a new monopoly machine. Yikes. Those poor souls get locked into the monopoly upgrade loop. Customers for WebTV are doing that right now, but what can we do about it? Well, for one thing we can recycle some old machines first. Folks who use linux can at least find out how the thing works and it will help to arrest the "dumbing down of the consumer".

Back to School

So the kid needs a new computer. Are you really sure about that, chief? I can think of worse things to own than an old 386 or 486 running linux. Here are some reasons to save that old clunker:

  1. The machine runs cool and you can put it in a hot room. Minor issue, yes, I concede.
  2. It can be made Y2K compliant. Huh? Yea verily, it is so easy, O Befuddled One.
  3. It can use a 32 gigabyte hard disk. Six of them in one machine. Yes, Acquisitive One, it is so.
  4. It can use a DVD drive. Please, O Great One, no need to march about.
  5. It can make CDR and CDRW discs for you with a CDR/CDRW writer/drive. Settle down, O Frugal One.
  6. It can run a complete office productivity suite faster than you can type. The office suite is free for personal use. Yes, O Mighty Hunter-and-Pecker, your basic 386 can format and print essays for your offspring at school.

         The major piece to the puzzle is linux. First you get any linux CD and boot it up (if your modern CMOS setup will let you boot from the CDROM). You can make a boot diskette set and get it from the CD that way. You can boot up poor old DOS and run a boot.bat batch file to install from the CD. You can install via a laplink cable from another machine and PLIP through the parallel port. You can boot the diskette and install via ftp over the internet or through the Local Area Network. You can boot the diskette and install via NFS mounted CD or hard disk on your local network or the internet. The point is that linux is a network operating system; a replacement for NT and W2K. Yes, that is right, you can replace them even before you have to buy them, which would save you a ton of time and money.

Y2K Compliant 386

         Your old 386 can be made completely Year 2000 compliant; able to pass all the tests that the frantic doomsayers can muster. The hardware needed to make your 386 into a modern set is called a BIOS card. Even better, get a BIOS card with a secondary IDE controller on it so that you can add devices to your machine.

Meccano for Geeks

         The installation skills needed for this are developed by playing with Meccano. Get the Meccano set for your kid first, months before the computers. Unplug the machine. A Phillips head screwdriver will open the case for you. These old machines were made easy and boxy, just like an Austin Mini or a Volkswagen Beetle. The new modern BIOS chip is on an ISA card, so all you need is an open slot. Turf the old modem card if you are short on slots, no need for 300 baud/2400bps where you are going. If you have a secondary/tertiary IDE controller on your card like a DTC Y2K Ultima, then set the IRQ shunt (jumper) to cover IRQ 11 or 15. Stay away from IRQ 12, your PS/2 rodent may object to sharing. As an aside to new linuxians, the PS/2 rodent is /dev/psaux.

EIDE controller

         When the BIOS card takes over, all it does is use the CMOS BIOS settings and apply LBA to any huge hard disks that are connected to the IDE controller(s). Your simple old IDE controller is now an EIDE controller, able to use the huge disk you hooked up.

         The BIOS card that also has a controller on it is going to let you have four IDE devices. The DTC Y2K Ultima has four irq settings, so you can even have two add on controllers plus your original for a total of six IDE devices in the machine. There are not enough brackets for six, but if you want to secure a device with a locking tie-down, you can squeeze them in there. The potential is for a 100+ gigabyte 386 sporting three or more 32 gigabyte hard disk drives plus a DVD and a CD writer.

Enter Linux

         As a file server, your 386 can access that huge archive at the speed of the EIDE controller. The CPU is not so much involved when you limit the number of users to something like 50 at a time. A big plus is that you can run this machine on 8 megabytes of RAM. Yes, it will run on 4 megabytes, but the installation will be too tricky on low memory. Stick with 8 megs or more and the install will go smoothly, especially with Slackware or Debian. If you are trying RedHat, you will need 12 megabytes to install smoothly.

Cable Modem 386 Internet Gateway

         As a linux user, you can now configure a network server right from the installation script; it does not matter which distribution you are installing. Your 386 can use two network cards and a big hard disk drive to make a very fast little network server for your home Local Area Network. Remember, the files are grabbed from the network card at 10 megabits (or more) per second; it does not matter what speed your CPU is walking at. The CPU just opens the door for you, it does not run the files; your client machines do that.

         There is no need to install X. You see, you also do not need a gui interface for your network controls. Every server job can be made to happen from the command line. Add in some nice little alias for the command sequence (a macro, O Rigid DOS person). For example, edit the .bashrc file in your home directory:

~/.bashrc:
alias mcd='mount /dev/cdrom /cdrom'
alias umcd='umount /cdrom'

         Man oh man, I love linux! No clickety-clicks, no waiting, just service and super powers. I guess it helps when your software is written by the best and brightest minds in a free thought environment.

         Yes, Apache webserver can serve up html files even though you have no gui. They are just files. They get handed out. Simple. Do not let any NT sales guys see this article, they will defend their turf or die trying. I say do not let them waste any more of your time or money.

The lack of DVD video

         For now, you can use a DVD-RAM. As far as I know, there is no way that linux can show you a DVD movie at this time. However, once you have a BIOS card, you are totally ready for that happy day when you can play a DVD movie with linux. Simply install the new drive in your old 386 and let 'er rip.

The toasting of CDR/CDRW discs

         Yes, this 386 CD burner is totally and completely ready for prime time, folks

         The linux operating system of GNU tools is going to let you make your own custom kernel for your own particular needs. Remember, you have lots of space on that disk drive, so install the bin86 and the kernel-source package, staying with 2.0.35 or newer. Then cd to /usr/src and enter the linux directory to read the README file.

         When you compile your CD burner kernel with "make menuconfig", make sure that SCSI support is built-in and not a module. In the general setup, say "yes" (by typing the letter y) to SCSI emulation and say "no" to ATAPI CDROM support (it will now be an SCSI emulation job). In the SCSI section, say "yes" (or "m" for module) to SCSI CDROM support and "yes" (or "m" for module) to SCSI generic device support. The CDROM will now become /dev/scd0, so do a symbolic link to /dev/cdrom:

rm /dev/cdrom
ln -s /dev/scd0 /dev/cdrom

          When you make a CD, you will also be using the sg module, so make sure you have /dev/sg0 through /dev/sg16 at least:

cd /dev
./MAKEDEV sg

         Once your burner kernel is made you can choose to run it all the time. If it is just for special occasions then boot it by giving it a label and an entry in /etc/lilo.conf.

/opt/schily/bin

         Your cdrecord program is also a kick in the pants to the monopoly guys. Visit the homepage of cdrecord and download 1.6.1a7 (or an alpha version if you want trouble). Then compile it and be amazed when your CDR is happily burning on a 386 with 8 megabytes of RAM with a little 145 kb program. Did I hear a monopoly guy say you need a 133 Mhz pentium and windows95 and 16 megabytes of RAM? Why yes, I agree, especially if you are going to use the software that Adaptec has managed to get into most CD writer boxes. By the way, Adaptec has no plans to port to linux. Please give them "20 million users of linux" as a good reason to make the linux port. You can tell them I sent you.

         Please use the home made cdrecord that you compile yourself. The version of mkisofs you will compile is hacked in order to make a better CD. Oh, and one more thing, get your opinion made up about the 'enhanced sg interface' and then let the two antagonists in the 'sg interface squabble' know it. Alan Cox needs to be made aware of the need for a resolution to this standoff, so maybe you can help.

Sweet Office Suite

         There is no need to let your 386 just sit there now that you have made it Y2K compliant and it has a big enough hard disk for some serious archiving. Take a look at Star Division's Star Office 5.1. You can open and use Word files as well as make full use of your video card for groovy graphics in your finished work. The best part, O Tight-Wadded One, is it is free for personal use. Simply visit Star Division's site and register and download the package. This has got to be the best deal for linuxians, so we should all hope to heaven that Sun (the new owners) will keep it available.

Remotely Yours

         The need-for-speed folks are going to rain all over your parade, so here is a trick for you if you want to show the limits of that free machine. First, put linux on your pentium speed-burner-CPU-melter. Then tell the pentium to accept connections from the 386 with this:

on the pentium:
DISPLAY=386.at.your.domain.net:0
export DISPLAY

on the 386:
xhost +pentium.at.your.domain.net:0

         Yes, I know, it is more secure to use cookies. So just follow the instructions in the Remote-X-Apps mini-HOWTO. The point is we want the pentium to run the big applications; namely that Netscape memory hog.

         Now install X on the 386. The most compact way is to use Debian, one deb at a time. If you have more than 500 megabytes free, then go ahead and install RedHat or Mandrake, but switch away from GNOME or KDE, they are too slow on a 386/486. To make an easy switch, type this in your home directory:

echo exec icewm > .xinitrc

         It helps if icewm (the ice window manager) is installed on the system. It is fast; it is small; it is cool (just ask anyone who uses it).

         Now that you have X running on the 386, open an xterm and do an "rlogin" to the pentium and ask for Netscape. The pentium will run the mozilla memory monster for you, and display the pretty pictures back home on your 386 monitor. Speed was the concern, now it is a non-issue. I think that the remote X apps are great good fun that you can have with a networked linux box. Not only can you run the other guy's apps, you can also run whatever is on your own system.


BIOS Card

         A BIOS card will set you back $40.00 Canadian and you can install it easily. It will be a simple little ISA card, and I have even heard of PCI versions for your old pentium. It can also be found with an IDE controller on the card, which can let you attach two more IDE devices. The Year 2000 adjustments are made for you on every boot right after you see the video BIOS and the memory check is completed. It is now safe to use your computer.

386 Donations

         So there I was at Syrotech on Main Street. I asked Jeff if there were any 386 machines kicking around and he goes to have a look. He comes back with a DEC 386, no RAM, no HDD, no keyboard, no nothing. I ask how much; he looks at Tom. Tom gives the go ahead and he says "Take it away. Have fun with it." Ha! If they only knew. A very well intentioned effort is underway right now in your community to donate old computers to deserving non-profit groups and educational facilities. This article was inspired by that effort in hopes that the recipients of these machines can make the best use of them. When you combine the GNU tools with a rock solid kernel you get an OS that becomes the killer application. You know it as linux.


Reference reading and links:

DVD the sites to see: http://atv.ne.mediaone.net/linux-dvd/ http://livid.on.openprojects.net/

Large-Disk mini-HOWTO -- you might need to use the linear option in /etc/lilo.conf

LILO mini-HOWTO -- shows the linear option for /etc/lilo.conf

Share the Technology http://www.libertynet.org/share

Geeks Into The Streets http://linux.umbc.edu/gits/

The home of cdrecord: http://www.fokus.gmd.de/research/cc/glone/employees/joerg.schilling/private/cdrecord.html

Remote-X-Apps mini-HOWTO -- required reading for X on a terminal



made with mcedit on an i486 with GNU/Linux 2.0.35

The adamant position of the author is in no way meant as an affront to sincere readers.


Copyright © 1999, Bill Bennet
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Setting Up A Java Development Enviroment For Linux

By Chris Gibbs


Contents

Obtaining the JDK

Kernel Support For Java

JDK

Java Beans

Swing

Java Accessibility Utilities

JSDK

Documentation

Java Tutorial

Sun's HotJava Browser

Next Month

Introduction

This article is intended to help those new to either Linux or Java set their machines up to run Java applications, as well as providing an effective environment for developing new Java applications.

Specifically I shall explain how to set up Sun's 1.1.x JDK and other related packages. This is not the only way to run Java on Linux.

Blackdown.org now offers the new 1.2.x JDK for Linux (at the time of writting this is still a pre-release version). I only recommend using this if you are also using the new 2.2.x Linux kernel. If you choose to install the 1.2.x JDK then please note that you do not need to obtain the Swing and JSDK packages, since they are already included. Also you may find some compatibility problems if you use older Java applications with the 1.2.x JDK. In particular if you intend to implement the javapache extensions to Apache you will need to use JDK 1.1.x.

In addition there exist other third party Java environments and Java compilers such as IBM's jikes. Use these at your own peril! IMHO Sun have defined and developed the Java language so I expect their Java environments to be the most standard. Other environments may be of interest, but I cannot cover them here.

Unfortunately the development of the Java language for Linux lags the development for other operating systems. Having said that there are still many advantages to using Java on Linux, not least of which is the easy availability of sophisticated development tools. If you have not seen a recent version of DDD (The Dynamic Display De-bugger), you may not realise that it now supports Java. If you write any programs under Linux DDD is a must have utility.

Why use Java at all?

Java's greatest advantage is also its greatest disadvantage. For reasons given below, the fact that the same Java code can be run on any platform without re-compiling is responsible for the fact that Java applications can appear slow. It is this slowness that has lead some to question the need to use Java at all.

It is true that if speed in loading and running an application is the only criteria for choosing a programming language then I would never consider using Java at all. Although applications such as jedit and the Java cd player described in earlier editions of this e-zine are functionaly equivalent to applications written in C they are very slow to start up and I am loath to use them when I have much faster alternatives.

But Java is not meant for such applications. Java excells in what it was originally designed for, which is to provide a means of making applications available over the Internet. Over the Internet the speed of loading an application is not really important when compared to the time it takes to download the application.

Now consider your friendly ISP, and the servers that provide you with Internet access. Your ISP (even your local Intranet) needs the fastest machines possible given certain criteria (cost etc). The cost of the actual server may not be important when compared to the software investment of server-side applications. Using Java to implement server-side applications leaves your ISP free to choose the best machine architecture and operating system without having to worry about the cost and feasibility of re-implementing such applications. They can simply be copied from one machine to another. Perhaps one day Microsoft will develop a reliable operating system that is superior to a *NIX operating system. If that day ever comes I will want to change from Linux, using Java will allow me to do that and keep exactly the same server-side applications I am running now.

If you only want to use a stand-alone computer, with no network access, either locally or over the Internet, then you probably do not need or want to consider using Java. But if your machine is going to be part of a local network or the Internet then the use of Java should be taken very seriously. Java is not the only way to develop network applications. For instance Perl can be used in a very similar way. But Java is a very attractive option.

Obtaining the JDK

Please do not obtain your JDK directly from Sun. They provide support only for Microsoft Windows, Solaris etc. Instead go to Blackdown.org and find the version you require.

All other packages mentioned here should be obtained from Sun.

The Linux port of the JDK can either be found on a Linux distribution disk, or can be found at http://blackdown.org. You will find you have a bewildering choice of files to install. There is the JRE as well as the JDK. I recommend you get the full JDK package since it contains everything in the others.

Kernel Support For Java

Linux was possibly the first operating system to provide direct kernel support for Java. This allows Linux to run both Java applications and Java applets directly, without the need for a browser such as Netscape. But if you think direct kernel support means that the kernel has anything to do with actually running Java code you are sadly mistaken.

To understand what is happening you need to realize that Java is really only one step removed from running interpreted programs rather than compiled programs. In the early days of computing, it was common to use an interpreted language, such as GW-BASIC, to write simple applications. The code that was written was never compiled into a program, rather the code would be parsed by an interpreter which would perform the actual execution of instructions. This is a very inefficient way of doing things and the results will always be slow.

Java differs from an interpreted language, such as early versions of BASIC, in that the source code is compiled. But the source is not compiled into something a computer can directly execute as would be the case if you compiled a C program with gcc. Instead the source code is byte-compiled into a standard format. The reason that the same Java application can be run on any platform is precisely because this byte-code is in a standard format. The programs java and appletviewer, provided by Sun or Blackdown.org perform the function of parsing this byte-code and executing the instructions. This is the reason Java applications can appear slow, the byte-code must be parsed by an interpreter before it can be executed, though the situation is not nearly as bad as it was with early BASIC programs, since the byte-code has already been optimized by the java compiler.

When you compile Java support into the Linux kernel what you are really doing is telling the operating system to invoke either java or appletviewer when a request is made to execute a java application. Linux is simply giving you a shorthand way of saying 'appletviewer myapplication'.

For this reason you need to tell the kernel where your Java executables are kept. If you obtain the JDK from Blackdown.org then the chances are that java and appletviewer will be placed in /usr/local/java/bin. If you install the JDK from a S.u.S.E. distribution disk then they will be in /usr/lib/java/bin. Of course you might have installed the JDK to some non-standard location.

Before you re-compile your Linux kernel, edit the file /usr/src/linux/fs/binfmt_java.c to reflect the situation you actually have.

     #include <linux/malloc.h>
     #include <linux/binfmts.h>

     #define _PATH_JAVA      "/usr/local/java/bin/java"          // Replace with correct location for your system.
     #define _PATH_APPLET    "/usr/local/java/bin/appletviewer"  // Replace with correct location for your system.
     #define _PATH_SH        "/bin/bash" 

     char binfmt_java_interpreter[65] = _PATH_JAVA; 
     char binfmt_java_appletviewer[65] = _PATH_APPLET; 

Please note that the references to java and appletviewer should be to the actual location of the binaries and not to any symbolic link you might have created. In the example above the directory /usr/local/java might be a symbolic link to /usr/lib/java-1.1.7, but the actual file refereed to is not a symbolic link, it actually exists in /usr/lib/java-1.1.7/bin.

Now you can decide if you want to compile Java support directly into the kernel, or have it as a module. I choose to use a module. The only comment I feel necessary is that when I try to execute a html file kernld will not automatically load the binfmt_java module, so I must "insmod binfmt_java" first.

Execute a HTML file?

Yes, Linux will allow you to execute certain HTML files as though they are applications. To understand why you would want to do this you need to understand the difference between a Java applet and a full blown Java application. Whilst a Java application provides all the resources it needs itself, an applet does not. Normally an applet needs to be included in a web page which is viewed by a Java enabled browser such as Netscape or HotJava because it has no top level window of its own. An alternative is to use the appletviewer program to view the applet.

Linux gives you a further option. if you add the line

        <!--applet-->

to a HTML file (and '<' must be the first character in the file), and chmod the file to be executable, then you will be able to launch the applet(s) embedded in the file directly.

In a similar manner a Java application is made up of one or more class files. To make the application executable by linux simply chmod the top level class file so it is executable.

JDK

Reading the documentation that comes with the JDK, we find that there is no need to set the CLASSPATH or JDK_HOME environments. Whilst this is true for the JDK itself, I have found that there are some applications that expect these environments to be set. In any case setting them will not cause you any harm and I recommend you take the following steps to install the JDK correctly:

  1. export PATH=$PATH:{JDK_HOME}/bin
  2. export JDK_HOME={JDK_HOME}
  3. export JAVA_HOME={JDK_HOME}
  4. export CLASSPATH=./:{JDK_HOME}/lib/classes.zip

Where {JDK_HOME} is the top-level directory to which you installed the JDK.

Java Beans

The JavaBeans API allows you to create component software in the Java programming language. Components are complete, self-contained, reusable software items that can be visually linked into any Java program, applet or servlet. Such software items are refereed to as Beans. Many Java IDE's are available, such as NetBeans or Visarj, that use this technology to provide application builder tools. Included in the package is BeanBox, a simple JavaBean IDE to get you started.

When you startup BeanBox, by running bin.sh in the BDK/beanbox sub-directory, three windows will open for you:

The ToolBox initially contains a number of example beans, you can add your own to create your own visual programming environment. Select a bean by clicking your mouse on it. Then click somewhere in the BeanBox. The javaBean will appear and a list of its properties will appear in the Properties window. You may then use the Properties window to customize the JavaBean for your application. When you have finished adding Beans, and are happy with the appearance of your application in the BeanBox you can select File/Make applet from the BeanBox windows menu and an applet complete with example html file will be generated for you.

As should now be clear, JavaBeans provide a means to develop applications without writing a single line of code. Of course you need to write the Beans themselves but many third party vendors make Beans available and the Internet is a fine place to look for new components.

A feature of JavaBeans is that they are packed into the JAR file format. This format has many advantages over java class files including:

Additional features are included in JDK 1.2.x including package versioning, package sealing and packaging for extensions.

INSTALLATION

  1. Obtain the BDK from http://java.sun.com/beans
  2. Unpack the archive to a subdirectory, e.g. /usr/lib/BDK
  3. Optionally add the new classes to your CLASSPATH. e.g. export CLASSPATH=$CLASSPATH:/usr/lib/BDK/beanbox/classes
  4. Enter the demo sub-directory and run "make -f GNUMakefile"
  5. Enter the demo/html directory and make the files executable in the manner described above and try them out.
  6. Enter the beanbox sub-directory and run "run.sh".

Swing

Not all Java applications are equal! Some look better than others. Swing provides several enhancements to the Java language. Whilst you do not need Swing to develop and run Java applications and applets, you may well need it to compile or run certain Java applications (such as jedit) that are freely available on the Internet.

The Java Foundation Classes (JFC, this is included in the Swing package), together with Swing, provide a set of "lightweight" components that work the same on all platforms. Effectively they provide GUI extensions to the Java language that can provide many enhancements to the look and feel of your applications.

The screen-shot above shows the initial screen when you start the swingset application. This can be used to demonstrate the enhancements Swing provides. by selecting a category such as ListBox you will be able to display and alter the various options that are available and so become familiar with the effects that Swing can provide.

An application I can recommend that makes full use of Swing is jedit, a very nice editor. This is available in full source code, and is suitable for editing plain text files such as HTML, Java source, Perl scripts, LaTeX documents, etc. The editor supports the inclusion of plug-ins and a couple of trivial examples are included to get you started.

INSTALLATION

  1. Unpack the Swing package (I recommend version 1.1) to the directory of your choice. e.g. /usr/local/Swing
  2. export SWING_HOME={SWING_HOME}

    optionally,
  3. Add the .jar files and src.zip under {SWING_HOME} to your CLASSPATH.

Where {SWING_HOME} is the directory under which you unpacked Swing.

Java Accessibility Utilities

Actually, there are two packages here: The Java Accessibility API and the Java Accessibility Utilities themselves.

The Java Accessibility API defines a contract between individual user-interface components that make up a Java application and an assistive technology that is providing access to that Java application. If a Java application fully supports the Java Accessibility API, then it should be compatible with, and friendly toward, assistive technologies such as screen readers, screen magnifiers, etc. With a Java application that fully supports the Java Accessibility API, no off screen model would be necessary because the API provides all of the information normally contained in an off screen model.

In order to provide access to a Java application, an assistive technology requires more than the Java Accessibility API: it also requires support in locating the objects that implement the API as well as support for being loaded into the Java virtual machine, tracking events, etc. The Java Accessibility utility classes provide this assistance.

As you may have guessed from the screen-shot above, the Java Accessibility Utilities require that you have installed the Swing package.

Several example utilities are provided in the package. The screen-shot above shows the Java Monitor which allows you to obtain information about objects being displayed on the screen by a Java Virtual Machine. Also included are:

INSTALLATION

This is a little different to the other packages mentioned here, since the different utilities included have to be explicitly enabled by you.

When you start any Java application you will also be able to automatically stat one of the utilities mentioned above by following the steps below:

  1. Unpack the packace to the directory of your choice. e.g. /usr/local/jaccess
  2. Install the Swing package as described above.
  3. Add the new jar files to your CLASSPATH e.g. export CLASSPATH=$CLASSPATH:{jaccess_home}/jaccess.jar:{jaccess_home}/jaccess-examples.jar
  4. Edit the JDK_HOME/lib/awt.properties file to enable jaccess by adding the following line:
           AWT.EventQueueClass=com.sun.java.accessibility.util.EventQueueMonitor
    
  5. Decide which utitility(s) you want to enable and add a line for each one to the awt.properties file. For example to enable the JavaMonitor add the line:
           AWT.assistive_technologies=JavaMonitor
    

JSDK

The Java Servlet API is a standard extension to the Java Development Kit. Servlet's are bodies of code that run inside servers to extend their functionality. For example, servlet's offer an efficient platform-independent replacement for CGI scripts. Servers that can host servlet's are java-enabled servers that respond to client requests.

The diagram above shows a typical use of a Java servlet. A HTTP server is running a servlet that is responsible for taking data from a HTML order-entry form and applies a companies rules for updating their order database. Simply put, a java servlet is a servers version of a java applet. As one might expect, since the server will be running remotely and unattended (from a users viewpoint at least) servlet's have no graphical user interface.

Servlet's provide a way to generate dynamic documents that is both easier to write and faster to run. Servlet's also address the problem of doing server-side programming with platform-specific APIs: they are developed with the Java Servlet API, a standard Java extension.

So use servlet's to handle HTTP client requests. For example, have servlet's process data POSTed over HTTP using an HTML form, including purchase order or credit card data. A servlet like this could be part of an order-entry and processing system, working with product and inventory databases, and perhaps an on-line payment system.

Amongst the many other possible uses for servlet's are the following:

If you use Apache then you will be interested in the javapache project, available from http://java.apache.org. To use this you will need to use the 1.1x JDK, and must use version 2.0 of the JSDK. Next month I hope to make an introduction to this project available.

The JSDK is available for download from http://java.sun.com/products/java-server/servlets

If you are using the newer 1.2.x JDK please remember you do not need to download this package, since the JSDK is already included.

INSTALLATION

  1. Unpack the JSDK to your preferred location (e.g. /usr/lib/JSDK)
  2. Add the JSDK /bin directory to your path. The best way to do this is to place a line
            export PATH=$PATH:/usr/lib/JSDK/bin
    to your /etc/profile file.
  3. Add the JSDK Classes to your CLASSPATH, e.g.

            export CLASSPATH=$CLASSPATH:/usr/lib/JSDK/lib/jsdk.jar

    Again you can add this line to your /etc/profile file.

    Documentation

    Each package includes its own documentation in HTML format. However, since you need to get your JDK from Blackdown.org, rather than from Sun, the documentation for the JDK will be missing from the package.

    Sun provides full documentation for both 1.1.x and 1.2.x versions of the JDK. Documentation for the 1.1.x version exists for version 1.1.3. I do not think it has been updated since then.

    In the demo sub-directory you will find many examples. Find the HTML files that launch java applets and make them executable in the manner I have described above so you can run them as conventional programs.

    The docs subdirectory contains a complete programmers guide to the Java language. This is further enhanced by the Java Tutorial.

    Java Tutorial

    Sun have a comprehensive Java tutorial which can get you up to speed programming in Java very quickly. Both the entire tutorial and specific parts of it are available for download:

    Bundle

    Format

    Compressed /
    Uncompressed

    Link to Download

    Online Tutorial
    (last updated December 21)

    Zip

    8.5 MB / 14.7 MB

    ftp://ftp.javasoft.com/docs/tutorial.zip

    tar/compress

    10.5 MB / 14.7 MB

    ftp://ftp.javasoft.com/docs/tutorial.tar.Z

    tar/GNUzip

    7.2 MB / 14.7 MB

    ftp://ftp.javasoft.com/docs/tutorial.tar.gz

    Tutorial Examples
    (last updated December 21)

    Zip

    2.9 MB / 4.4 MB

    ftp://ftp.javasoft.com/docs/tut-examples.zip

    tar/compress

    3.6 MB / 4.4 MB

    ftp://ftp.javasoft.com/docs/tut-examples.tar.Z

    tar/GNUzip

    2.5 MB / 4.4 MB

    ftp://ftp.javasoft.com/docs/tut-examples.tar.gz

    JFC/Swing Trail
    (last updated December 21)

    Zip

    2.8 MB / 4.6 MB

    ftp://ftp.javasoft.com/docs/tut-swing.zip

    Servlets Bookstore Example
    (last updated December 21)

    Zip

    18 KB / 51 KB

    ftp://ftp.javasoft.com/docs/tut-bookstore.zip

    BINGO Example
    (last updated December 21)

    Zip

    35 KB / 108 KB

    ftp://ftp.javasoft.com/docs/tut-bingo.zip

    Alternatively you can read the tutorial on-line at http://java.sun.com/docs/books/tutorial.

    Please note: Whilst you are free to mirror this tutorial on a local network or Intranet, Sun request that you do not make it available publicly on the Internet.

    Sun's HotJava Browser

    This is a web browser written entirely in Java. For that reason even on a 133Mhz pentium class processor it is very slow. Its advantage is that it is one of the very few browsers available for Linux that can run Java applets. It is also very interesting for other reasons.

    HotJava is highly modular, the user interface is easily customizable and has a small footprint (does not take up a large amount of system resources). Well that is what Sun claims. I find in practice that if I try loading java applets whilst running other applications the browser will die on me. I would have thought that if it does have a small footprint this would not happen - whatever.

    Sun further claim that the browser is ideal for a variety of devices - such as screen phones as well as desktop PC's. All I can say is that until the browser can perform faster (on my pentium class box with 32Meg ram it takes about three minuets to start up and load the default screen), and is more reliable, then it is unlikely to be of much use unless you have a very fast processor.

    The heart of HotJava is the HotJava HTML Component. This is a JavaBean that parses and renders HTML. This can be embedded into your own applications, anything from a newsreader to a microwave oven (yes there are microwaves and even fridges that give you Internet access now), can make use of it to display information.

    HotJava supports the following Internet standards:-

    • JDK 1.1

    • HTTP 1.1 Protocol

    • HTML 3.2

    • Tables and Frames

    • FTP and Gopher File Transfer Protocols

    • Persistent Cookies

    • GIF and JPEG Media Formats

    • AU audio format

    • SMTP and MIME E-mail Protocols

    • SOCKS Protocol

    • SSL 3.0

    • Java Archive (jar) Format

    The following packages are available depending on your needs:

    • HotJava Browser Source Code (including HotJava HTML Component)

    • HotJava Browser Binary

    • HotJava HTML Component Source Code

    • HotJava HTML Component Binary

    Next Month

    Last month I explained how to set up the Apache HTTP server. Next month I intend to tie these two articles together by showing you how to incorporate the javapache extensions to Apache so you can use Java to create dynamic HTML pages and server side applications to enhance your web site.

    In a future article I shall give an overview of the available Netscape Plug-ins and show how simple it is to develop your own plug-ins. In the meantime I welcome your comments and suggestions for future articles.


Editor's note: October's Linux Journal, in the Strictly On-Line section, contains two articles related to Java:


Copyright © 1999, Chris Gibbs
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Stripping and Mirroring RAID under RedHat 6.0

By Mark Nielsen


Index:

  1. Resources
  2. Introduction to RAID
  3. Setting up a RAID Strip
  4. Setting up a RAID Mirror
  5. RAID 5 with a spare device
  6. Comments
Future updates for this article will be located at http://www.tcu-inc.com/mark/articles/Raid.html.

Resources

  1. http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/
  2. /usr/doc/raidtools-0.90
These links are hardware specific which go beyond the scope of this article.
  1. Here is a DPT HOWTO, http://www.ram.org/computing/linux/dpt_raid.html

Introduction to RAID

It is assumed that you will read the The Software-RAID HOWTO by jakob@ostenfeld.dk. Apparently, he comes from Danmark (not Denmark), which is, of course, the best country in the world where a lot of smart people are located. Anyways, he does such a good job at his HOWTO, this article is probably not necessary. I only started this because the documentation used to suck really bad, which doesn't appear to be the case anymore. Also, this setup is specific for RedHat 6.0, but it should work with any distribution. When am I going to switch to Debian for good? Soon I hope.

What is RAID? Well, it basically gives you the power to do some funky stuff with multiple hard drives. It lets you combine hard drives, split data amongst several hard drives, and do other things. It can increase the speed to write and read your data to your hard drives and it can make backup copies of your hard drives so that if one hard drive crashes, you can most likely retrieve all your data. Read more about the RAID Levels from The Software-RAID HOWTO right now to get a better idea about the different types of Software RAID.

Also, you will need to setup several small partitions for this example. I suggest having 1 gig of diskspace free for an extended partition, and then to make 100 meg logical partitions out of the extended partition. Also, PLEASE PLEASE PLEASE only test raiding on a hard drive you don't care about. If you screw it up, it is your fault, even if my documentation is incorrect.


Strip RAID

I am ONLY going to show you how to setup a strip for DATA only. This means, I won't be stripping the main operating system. There can be problems trying to strip an entire system, and so, I won't do it here.

There are basically 4 steps to setup a Strip RAID on your Linux system. Stripping puts data on two or more hard drives (actually partitions) where half the data is on one hard drive and the other half on the other. This increases your speed since you use BOTH the hard drives at the same time to get each half of the data. Again, please read more about this in the HOWTO.

First, we need to configure /dev/md0, then we need to initialize the partitions, and then we need to configure /etc/rc.d/rc.local to activate the raid, and then we need to configure /etc/rc.d/rc.local to mount the stripped device to a directory.

The Steps Well, I am going to do a trick. Instead of actually using two hard drives, I am going to assume that most of the low-end users don't have two hard drives. Hence, I will use two partitions on the same hard drive. Make an extended partition with two logical partitions, /dev/hda5 and /dev/hda6, which should be the same size. Stripping two partitions on the same hard drive is almost pointless, and even on the same IDE controller it is almost pointless. Still, this is just an EXERCISE.

  1. Configure /etc/raidtab with this text
    raiddev /dev/md0
              raid-level      0
              nr-raid-disks   2
              nr-spare-disks  0
              chunk-size     4
              persistent-superblock 1  
              device          /dev/hda5
              raid-disk       0
              device          /dev/hda6
              raid-disk       1
    
  2. Format the partitions with the command
    mkraid /dev/md0
    
    If you have problems with using the "mkraid" command, it will tell you how to get around any problems. Then issue this command
    mkfs -t ext2 /dev/md0
    
    Also, check out the status of your raid by looking at the "/proc/mdstat" file/.
    cat /proc/mdstat
    
  3. Execute this command which will add a line to /etc/rc.d/rc.local
    echo "raidstart /dev/md0" >> /etc/rc.d/rc.local
    
  4. Execute this command once. It will make you the directory for the RAID device and add a command to /etc/rc.d/rc.local.
    mkdir /RAID
    echo "mount /dev/md0 /RAID" >> /etc/rc.d/rc.local 
    
  5. If you don't want to reboot your computer, and you want to activate the raid now,
    raidstart /dev/md0
    mount /dev/md0 /RAID
    
    Also, check out the status of the mounted directory by issuing the single command
    df
    

Mirror RAID

Like the example for stripping, I will use two partitions on the same hard drive and I will only mirror partitions that are used for data.

First, we need to configure /dev/md0, then we need to initialize the partitions, and then we need to configure /etc/rc.d/rc.local to activate the raid, and then we need to configure /etc/rc.d/rc.local to mount the mirrored device to a directory.

  1. Configure /etc/raidtab with this text
    raiddev /dev/md0
              raid-level      1
              nr-raid-disks   2
              nr-spare-disks  0
              chunk-size     4
              persistent-superblock 1
              device          /dev/hda5
              raid-disk       0
              device          /dev/hda6
              raid-disk       1
    
  2. Format the partitions with the command
    mkraid /dev/md0
    
    If you have problems with using the "mkraid" command, it will tell you how to get around any problems. Then issue this command
    mkfs -t ext2 /dev/md0
    
    Also, check out the status of your raid by looking at the "/proc/mdstat" file/.
     
    cat /proc/mdstat
    
  3. Execute this command which will add a line to /etc/rc.d/rc.local
    echo "raidstart /dev/md0" >> /etc/rc.d/rc.local
    
  4. Execute this command once. It will make you the directory for the RAID device and add a command to /etc/rc.d/rc.local.
    mkdir /RAID
    echo "mount /dev/md0 /RAID" >> /etc/rc.d/rc.local
    
  5. If you don't want to reboot your computer, and you want to activate the raid now,
    raidstart /dev/md0
    mount /dev/md0 /RAID
    
    Also, check out the status of the mounted directory by issuing the single command
    df
    

RAID 5 with a spare partition

Okay, RAID 5 with a spare device is a VERY cool thing to do. Again, we will just be using one hard drive. Generally, for experimenting, I would just use 100 meg logical partitions. If you have a 1 gig extended partition, you can have 10 logical partitions for goofing around with.

Use the same steps for the Mirror or Strip, just change the config file to this.

raiddev /dev/md0
        raid-level      5
        nr-raid-disks   7
        nr-spare-disks  1
        persistent-superblock 1
        parity-algorithm        left-symmetric
        chunk-size      32
        device          /dev/hda5
        raid-disk       0
        device          /dev/hda6
        raid-disk       1
        device          /dev/hda7
        raid-disk       2
        device          /dev/hda8
        raid-disk       3
        device          /dev/hda9
        raid-disk       4
        device          /dev/hda10
        raid-disk       5
        device          /dev/hda11
        raid-disk       6
   ### Also, let us have a spare device  
        device         /dev/hda12
        spare-disk     0

Comments

Mount the raid device in /etc/rc.d/rc.local and don't bother putting it into /etc/fstab. If you want to put it into /etc/fstab, go ahead and try. It probably won't work, but sometimes people just like to see it for themselves (like I do). I like the power to shoot myself in the foot. It makes the surgery interesting.

Well, it is pretty freaking cool. The documentation used to really suck rocks, but that howto has been updated, the tools seem easier to use, and with these few examples, and amateur who knows how to use Linux can probably setup a raid device. Hopefully this will reduce the overall cost of RAID servers.

If you really want to do Software raiding correctly, get an U2W SCSI controller, like an Adaptec controller or other good brands, DPT, Mylex, etc. For cheap raids where you are just mirroring and don't care about speed, IDE hard drives are okay. If you want to go one step beyond software raid and to get into hardware raid, then several companies support hardware raid for Linux.


Mark works as a receptionist (shorts and tee-shirt) at The Computer Underground and as a professional (suit and tie) consultant at 800linux.com. In his spare time, he does volunteer stuff, like writing these documents to help stop entities which thrive on the ignorant. I wonder which company is like that? Edited using emacs and ispell.


Copyright © 1999, Mark Nielsen
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Linux Humor

By Mike Orr


This is the first in a series of Linux-related humor which will be published whenever I have material. If you know a Linux joke you'd like to contribute for this column, e-mail it to gazette@ssc.com.

Contents:
[ If Operating Systems Ran The Airlines ] [ Linus Torvalds entry in Encyclopedia Galactica ]


If Operating Systems Ran The Airlines

Different versions of this joke have been floating around the net for the past couple years, but I found this one especially hilarious. It was found by Bruce Kingsland. The original author is unknown.

UNIX Airways

Everyone brings one piece of the plane along when they come to the airport. They all go out on the runway and put the plane together piece by piece, arguing non-stop about what kind of plane they are supposed to be building.

Air DOS

Everybody pushes the airplane until it glides, then they jump on and let the plane coast until it hits the ground again. Then they push again, jump on again, and so on ...

Mac Airlines

All the stewards, captains, baggage handlers, and ticket agents look and act exactly the same. Every time you ask questions about details, you are gently but firmly told that you don't need to know, don't want to know, and everything will be done for you without your ever having to know, so just shut up.

Windows Air

The terminal is pretty and colorful, with friendly stewards, easy baggage check and boarding, and a smooth take-off. After about 10 minutes in the air, the plane explodes with no warning whatsoever.

Windows NT Air

Just like Windows Air, but costs more, uses much bigger planes, and takes out all the other aircraft within a 40-mile radius when it explodes.

Linux Air

Disgruntled employees of all the other OS airlines decide to start their own airline. They build the planes, ticket counters, and pave the runways themselves. They charge a small fee to cover the cost of printing the ticket, but you can also download and print the ticket yourself. When you board the plane, you are given a seat, four bolts, a wrench and a copy of the Seat-HOWTO.html. Once settled, the fully adjustable seat is very comfortable, the plan leaves and arrives on time without a single problem, the in-flight meal is wonderful. You try to tell customers of the other airlines about the great trip, but all they can say is, "You had to do what with the seat?"


Linus Torvalds entry in Encyclopedia Galactica

The following was sent to the Linux Journal Editor by an anonymous contributor.

Torvalds, Linus- ... historians generally agree was an actual person and completed a large portion of the programming used to develop the positronic brain sometime before the earliest recorded history. A number of programs have been copied from active positronic memory and have been proven to be based on the galactic standard programming language VM (vit-min) C. The memory patterns include references to the genetic programmer Linus (la-news) Pauling and have revealed where Torvalds named the earliest cores of the positronic brain for the VM C language. Torvalds is universally regarded by historians as the greatest linguist of the core development project. Torvalds was known to have mastered all of the known languages of the time while working in an advanced development laboratory called the Swiss (s-weex) Patent Office of Pari (par-ee) and selected the VM C core in preference to the previous Finn language from predecessors Norway (Turbo-C) and Sweden (ANSI-C). Torvald's mastery of the language in the VM C core is regarded galaxy wide as the reason for the estimated 100,000 year uptime for the original positronic brains. The X Law of Robotics burned into all positronic brains has been found still undecoded in currently functioning examples of the oldest portion of the memory used by the LinuX kerning (coy-nah). Historians are unanimous in identifying Torvalds as the most ingenious programmer in galactic history.

--Encyclopedia Galactica1

1 Allusion to Isaac Asimov's Foundation Series.


Copyright © 1999, Mike Orr
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

By JC Pollman and Bill Mote


Mail for the Home Network

Mail for the home network sounds like a fairly simple project, but it is quite ambitious: say good-bye to the wife and kids for the better part of a week if this is new ground for you. Rest assured, the end results are worth it.

Disclaimer: This article provides information we have gleamed from reading the books, the HOWTOs, man pages, usenet news groups, and countless hours banging on the keyboard. It is not meant to be an all inclusive exhaustive study on the topic, but rather, a stepping stone from the novice to the intermediate user.  All the examples are taken directly from our home networks so we know they work.

How to use this guide:

Prerequisites: This guide assumes that you have the following things installed:
    1. You must have a legal domain name
    2. You must be using IP Masquerade to "hide" your machine from the internet
    3. And that you can consistently connect to the internet
What should home mail do? Before we go sprinting off into the guts of this project, lets consider what we want this mail system to do: Home mail sounds like a simple concept, especially as many user email programs, like netscape, seem to handle all the necessary functions all by themselves. Unfortunately, there is a big difference between a user's mail "system" and a network mail system. Your mail system will need at least five programs to function properly: Install the programs. Before we get started, check to see that you have all the necessary programs installed.  Easiest way to check is to issue the whereis command:
whereis sendmail [Enter]
For those of you using RedHat, you can type:
rpm -qa|grep sendmail [Enter]
to see if any sendmail package is installed. Other distributions have a similar way of checking if a package is installed. Make sure you installed the sendmail-cf package as well.

procmail: Whatever version came with your distribution is fine.
ipop3d: Whatever version came with your distribution is fine. Note: most distributions put ipop3d in the imap package.
fetchmail: Fetchmail is a moving target and new versions come out frequently. We would suggest using version 5.0 or higher, though whatever came with your distribution is probably fine.
sendmail: Most distributions come with three sendmail packages: sendmail, sendmail-cf, and sendmail-doc. Install all three. We will be using sendmail version 8.9.3 in this article. If you are running anything less than version 8.9.2 we very strongly recommend you upgrade, both because of security reasons, and because most of the information presented here will not be useable with older versions.
m4: Whatever version came with your distribution should be fine.

Let's get started! Do 10 sets of finger exercises, replace Zeppelin with a Mozart CD, and click on the links below. Note: follow them IN ORDER, as some programs rely on others!

Setting up dns for mail
Setting up procmail
Setting up sendmail
Setting up pop3
Setting up fetchmail
Some Final Thoughs


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

DNS for Mail

By JC Pollman and Bill Mote


In last month's article we set up dns as a name server for network. Sendmail, and most other mail transport programs, use dns to decide where to send the mail, but we need to modify it a bit.  The name-to-ip file has to have a MX line for each computer, which essentially says: for this computer, use this other computer for storing mail.

The file from last month looks like this. Note, the *** are not part of the file:
**************************************************************
@  IN SOA master.kulai.org. jpollman.kulai.org. (
   1;
   10800;
   3600;
   604800;
   86400 );

        IN NS   master.kulai.org.
master  IN A    192.168.124.10
 

mail    IN A 192.168.124.10
www     IN A 192.168.124.10
news    IN A 192.168.124.10

localhost    IN A    127.0.0.1

fserver IN A  192.168.124.11
jc      IN A  192.168.124.1
phillip IN A  192.168.124.20

**************************************************************

We change this to add in the MX lines. Note: the Bold items are explained below and are not part of the format of the file. It now looks like this:

**************************************************************
@  IN SOA master.kulai.org. jpollman.kulai.org. (
   2
   10800
   3600
   604800
   86400 )

            IN NS   master
            IN MX 10 master
master      IN A    192.168.124.10
master      IN MX 10 master

mail        IN A 192.168.124.10
www         IN A 192.168.124.10
news        IN A 192.168.124.10

localhost   IN A    127.0.0.1

fserver     IN A  192.168.124.11
fserver     IN MX 10  master

jc          IN A  192.168.124.1
jc          IN MX 10 master

phillip     IN A 192.168.124.20
phillip     IN MX 10 master
**************************************************************
Now each computer's (master, fserver, jc, phillip) email server is master.kulai.org (actually it is called a "mail exchanger", but since we have only one computer server mail, it functions as a email server.) We also have a line with no name that points to master.kulai.org as the email server - this is for the domain: kulai.org. You noticed there is a "10" in each line.  The number, 10 in this case, is a relative value, and is used when you have multiple mail exchangers - something we are not covering here. Note, failure to put the number in will cause an error in named. Now, restart named, and check /var/log/messages for any errors.

You have to put a line in for each computer: kulai.org by itself will not work.
 
 


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

Procmail

By JC Pollman and Bill Mote


procmail

Procmail

For purposes of this article, all we want procmail to do is to put the mail in the users' account in /var/spool/mail.  As such, remove all ~/.procmailrc and ~/.forward files from each user's home directory. Procmail deserves its own article, so we will not cover it here.  For our purposes, as long as procmail is installed on your server, things will work.

Procmail is a very powerful program. After your home mail system is setup completely, here is what procmail can do for you:


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

Sendmail

By JC Pollman and Bill Mote


Sendmail has a bad reputation because of security issues in the past and because its configuration file, sendmail.cf, is a horrible, ugly, wart infested, sadistic file to understand and edit. As an example, would you like to make changes to this bit:

# localize and dispose of route-based addresses
R@ $+ : $+              $@ $>96 < @$1 > : $2            handle <route-addr>

Sendmail is a rules based program: the rules determine how sendmail should react. O'Reilly has published "The Bat Book" on sendmail: it is 1021 pages! We are not going to discuss the rules here - we just want to get it up and running.  After you are happy with the basic setup, sendmail is a very deep mine you can excavate for all the gold you want. There are a number of files you have to edit to make sendmail work. Here we take them one at a time.

Prerequisite: For the initial setup of sendmail, make a user with the same login name as your email account on your ISP, e.g. my ISP email account is jpollman@deniz.com so I have an account on my mail server: jpollman@kulai.org. After sendmail is working with this setup, you can go to the Sendmail-Address_Rewrite Howto for using a different local name.

/etc/mail/aliases: Depending on your distribution, this file might be /etc/aliases. It has two main purposes: to allow all the admin-users/daemons to send reports to somebody, and to create group lists. If you are interested in the group lists, read the sendmail man page. By default, the daemons send their reports to root, but since you do NOT log in as root on a regular basis, (really, I know you don't!) it is better to send all of root's mail to you. Edit the file, and usually at the bottom are these two lines:

# Person who should get root's mail
root:   jpollman@kulai.org

Usually there is a # in front of the second line (with root: at the beginning). Remove the # and put your home email address to the right of the ":".  After you save the file, type:

    newaliases [Enter]

Newaliases will convert the aliases file to a format that sendmail can read efficiently, and save it as: aliases.db. Almost everyone who has ever played with sendmail, sooner or later, has edited the aliases file, restarted sendmail, and got mad because the new aliases where not functioning. Remember to run newaliases!

/etc/mail/relay-domains: Again, this file maybe /etc/relay-domains. This file tells sendmail that if it gets mail from the computers listed in this file it should handle them. If this file is empty, you can not use sendmail as your SMTP host for your network because it will not accept any mail from other computers. It should list each computer that will be using your server. There are probably more posts about problems with relaying on the comp.mail.sendmail than any other topic. From the sendmail FAQ:

You need to add the fully-qualified host name and/or IP address of each client to class R, the set of relay-allowed domains. For  8.9.X, it is typically etc/mail/relay-domains . Note: if your DNS is problematic, you may need to list the IP address in square brackets (e.g., [1.2.3.4]) to get the ${client_name} macro to work properly; in general, however, this should not be necessary.
My relay_domains file looks like this:
jc.kulai.org
phillip.kulai.org
fserver.kulai.org
/etc/sendmail.cw: this file helps sendmail know where it is and any aliases for the server it runs on. Mine has a single line: kulai.org.

/etc/sendmail.cf: And now for the monster itself! Fortunately for us, life has gotten much much much easier than it used to be. Here is the gist of what we are going to do: modify a generic sendmail.mc file, run it through m4, copy it to /etc/sendmail.cf, and restart sendmail. Actually, it is pretty easy.

Go to /usr/lib/sendmail-cf/cf. There should be a generic file with a mc extension. If not, there maybe one named redhat.mc. And if that is missing, you can copy this file to that directory. Personally, we recommend you start with our file as we know it works :^) Now copy that file to another name, like maybe the name of your server: master.mc. You want to keep the original file unchanged so if you really screw things up you can at least start over from scratch.  Edit your mc file.  There are many rules already defined, and they work well as the default. To make it work on your server, add these lines to the bottom of the file. Note: my smtp server is: ix.deniz.com and my ISP is deniz.com, yours is different, so do not simply copy these lines without editing them!

define(`SMART_HOST',`smtp:[ix.deniz.com]')
MASQUERADE_AS(`deniz.com')
FEATURE(`masquerade_envelope')
define(RELAY_MAILER, TCP)
FEATURE(`accept_unqualified_senders')
SMART_HOST: this is your ISP's SMTP host. This is where sendmail will send email that is not for the kulai.org domain, i.e. ix.deniz.com for me.
MASQUERADE_AS(`deniz.com'): this will rewrite part of the "From:" line on your emails so they will look like they come from deniz.com, which is where my email address on the internet is, Note: change deniz.com to your ISP - otherwise deniz.com might get excited about other people (spammers?) trying to use their service. In other words, deniz.com will not allow mail from jpollman@kulai.org but will allow mail from jpollman@deniz.com. This is because of their relay-domains file.
masquerade_envelope: this will rewrite some of the email header so it will look like the mail came from deniz.com
RELAY_MAILER, TCP: This is not strictly necessary, but it does not hurt.
accept_unqualified_senders: this is so, if you have jpollman@deniz.com in your From: line in your email program, sendmail will accept the mail. Normally it is expecting a kulai.org as the domain.

Also note that sendmail uses both tick marks: ` and '.

Now, to take this relatively easy-to-read file and turn it into sendmail-speak, type:

m4 master.mc > _master.cf [Enter]
where master.mc is the file you were editing and _master.cf is the name we are telling m4 to give the file it creates. This happens very quickly: on my pentium II 266 it takes about 2 seconds. The _master.cf is the complete sendmail.cf - we probably could have typed: m4 master.mc > /etc/sendmail.cf, but it is good to keep an extra copy around. Now, copy _master.cf to: /etc/sendmail.cf - which will over write your previous copy of sendmail.cf: probably ought to make a copy of the original just in case. Restart sendmail by doing a: killall -HUP sendmail (in Redhat: /etc/rc.d/init.d/sendmail restart). Sendmail has a number of options when you start it. Click here to see those options. In review:
cp /etc/sendmail.cf /etc/sendmail.original
m4 master.mc > _master.cf
cp _master.cf /etc/sendmail.cf
killall -HUP sendmail


If everything went ok, you are now done except for testing. Send email to someone on your network. Send email to your ISP account email address. If all this works, you can point the other computers on your network, including those running any Microsoft operating systems, to your email server for SMTP services.

There are 3 fixes you may have to perform manually if things are not working as you would like them:

1. If sendmail can not "find" your email server:
Edit your /etc/sendmail.cf and look for this line:
#Dj$w.Foo.COM
and change it to:
Djmaster.kulai.org
Where master.kulai.org is the name of your email server.  Note: remove the # at the front of the line as # means: ignore - this is a comment line. This is one of sendmail's rules and it tells sendmail what the name of the email server is - in case dns, or other ways, do not tell sendmail what it wants.

2. Masquerading based on destination:
I had the hardest time trying to get sendmail to masquerade only the mail sent to the internet and not local mail, e.g. I wanted local mail to show the sender as: bmote@kulai.org and not bmote@deniz.com, but obviously I wanted mail that went out into the internet to show: bmote@deniz.com.  To solve this you have to manually edit the /etc/sendmail.cf. Find the definitions of local rulesets 10 and 30 within sendmail.cf, (hint: search for S10 and S30) and delete these 2 lines - or put a # in front of them:

#  Envelope sender rewriting
#
S10
R<@>        $n              errors to mailer-daemon
R@ <@ $*>   $n              temporarily bypass Sun bogosity
R$+         $: $>50 $1      add local domain if needed
R$*         $: $>94 $1      do masquerading  <-- delete this line
#
#  Header sender rewriting
#
S30
R<@>        $n              errors to mailer-daemon
R@ <@ $*>   $n              temporarily bypass Sun bogosity
R$+         $: $>50 $1      add local domain if needed
R$*         $: $>93 $1      do masquerading  <-- delete this line

There is no m4-based solution for this, so you have to modify sendmail.cf directly. You need to restart sendmail afterwards, of course.

Note: I have jpollman@kulai.org in my From: line in my email program, so sendmail will masquerade only out-going mail. Many thanks to: Achim Löbbert for the solution.

3. Using unqualified names fails:
If you type just the user's name in the To: part of the email and it disappears into the internet, you may have to tell sendmail where to put email with unqualified names. Add this to the bottom of your master.mc:

define(`LOCAL_RELAY',`mail.kulai.org')

LOCAL_RELAY: again: instead of mail.kulai.org, put your mail server's name here. This line will make sendmail send unqualified names, like just "bmote", to your mail server, i.e. sendmal will add the kulai.org onto bmote for you. This way you can type just bmote in the To: field in your email program instead of bmote.kulai.org. Of course you will have to do the m4, copy, restart routine again to make it take effect.


I have no idea how many times I have m4'ed my sendmail.mc files and then did the copy - restart routine. I wrote a shell script to do this for me. Now, all I have to do is edit the master.mc file and type: ./newsendmail (the name of the script). Here it is:

#!/bin/sh
m4 master.mc > _master.cf
cp _master.cf /etc/sendmail.cf
/etc/rc.d/init.d/sendmail restart
Put this in your /usr/lib/sendmail-cf/cf directory and make it executable
chmod 700 newsendmail [Enter]


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

Sendmail

Starting Sendmail

By JC Pollman and Bill Mote


Sendmail has a number of starting options. We will only give a brief over view of the common commands. You should read the man page for further information.

-bd         Run as a daemon.  Sendmail will fork and run in background listening on socket 25 for incoming SMTP connections.

-q[time]     Processe  saved messages in the queue at given intervals.  If time is omitted, process the queue  once.   Time is given as a tagged number, with `s' being seconds, `m' being minutes, `h' being hours,  `d'  being  days,  and  `w'  being
weeks.  For example,  `-q1h30m'  or  `-q90m'  would both set the timeout to one hour thirty  minutes.   If  time  is  specified, sendmail will run in  background.   This option can be used safely with -bd

So, if you set the time with the -q switch, do not be surprised if your email is not delivered for a while. With Redhat, check the file: /etc/sysconfig/sendmail. It will set the background/queue time so you only need to type:

/etc/rc.d/init.d/sendmail start  [Enter]  (or restart if it is already running)

Make certain you do not try to start sendmail if it is already running as you will not accomplish what you want.
 


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999
divert(-1)
include(`../m4/cf.m4')
define(`confDEF_USER_ID',``8:12'')
OSTYPE(`linux')
undefine(`UUCP_RELAY')
undefine(`BITNET_RELAY')
define(`confAUTO_REBUILD')
define(`confTO_CONNECT', `1m')
define(`confTRY_NULL_MX_LIST',true)
define(`confDONT_PROBE_INTERFACES',true)
define(`PROCMAIL_MAILER_PATH',`/usr/bin/procmail')
FEATURE(`smrsh',`/usr/sbin/smrsh')
FEATURE(`virtusertable',`hash -o /etc/mail/virtusertable')
FEATURE(redirect)
FEATURE(always_add_domain)
FEATURE(use_cw_file)
FEATURE(local_procmail)
MAILER(procmail)
MAILER(smtp)
dnl HACK(check_mail3,`hash -a@JUNK /etc/mail/deny')
dnl HACK(use_ip,`/etc/mail/ip_allow')
dnl HACK(use_names,`/etc/mail/name_allow')
dnl HACK(use_relayto,`/etc/mail/relay_allow')
dnl HACK(check_rcpt4)
dnl HACK(check_relay3)
FEATURE(`access_db')
FEATURE(`blacklist_recipients')
dnl FEATURE(`relay_based_on_MX')

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

Pop3

By JC Pollman and Bill Mote


Setting up a pop3 server is a very easy operation.  First setup the pop3 server and then setup the accounts.

Edit /etc/services and make sure these two lines are in there and remove any # in front of them:

pop-3  110/tcp    # PostOffice V.3
pop    110/tcp    # PostOffice V.3

Edit /etc/inetd.conf and remove the # in front of this line:

pop-3   stream  tcp     nowait  root    /usr/sbin/tcpd ipop3d

and then restart inetd by typing:

killall -HUP inetd [Enter]
Your pop3 server is now fully up and operational. Nice and simple.

It will serve mail to any user that has an account on your server using the user's login name and password.  If you have users who will be using the mail server only for mail, for security reasons, you should limit their access to the other services.  To make the account unusable for log in, put a * in the password field of /etc/passwd and specifying a bogus shell - like /bin/false - in the last field of the password file entry.  They will still be able to get and send mail, as well as use the modem if masquerading is setup, but they will not be able to telnet, ftp, or run remote programs on the mail server itself.

Many of you might want to use imap instead of pop3. For the purposes of this article, set up pop3 first, and once everything is working, you can try imap. Although imap gives serious advantages to the user, particularly if you move between operating systems and mail clients, we have strong reservations about. Almost every time someone has attempted to crack into my server, imap was tested. There were some security concerns about earlier versions of imap which are now fixed, so we would very strongly urge you to run only the latest version if you intend to implement it on your server.


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

Fetcahmail

By JC Pollman and Bill Mote


Fetchmail Setup

Fetchmail

Fetchmail will get mail from your email on the net (your ISP account and wherever else you have an email account) and pass the mail off to procmail running on your mail server to put it in your mail account on your server. It can handle a wide variety of mail servers including POP3 and IMAP, but it can not handle an Exchange Server.

Although fetchmail can be configured to handle quite a variety of chores, we will keep it simple here. For each user that has an email account on the internet create a file: ~/.fetchmailrc   For user jpollman on our server, the file /home/jpollman/.fetchmailrc looks like this:

poll www.deniz.com with proto POP3
       user "jpollman" there with password "mypassword" is jpollman here

Explaining each part:
    poll www.deniz.com: contact www.deniz.com which is my ISP's pop3 server.
    with proto POP3: use the pop3 protocol to get the mail.
    user "jpollman" there: my login name for email on my ISP.
    with password "mypassword": this is my password to my ISP.
    is jpollman here: jpollman is the user on our home mail server.

Put a .fetchmailrc file in the home directory of each user that needs to get mail from the internet.  Note: each .fetchmail will be a little different because everyone has a different email address on the internet. Also, fetchmail is very particular about permissions and ownership - which is a good thing as email passwords need to be kept private.  To make sure .fetchmailrc is correct, using the example above for jpollman:

chown jpollman /home/jpollman/.fetchmailrc [Enter]
chmod 700 /home/jpollman/.fetchmailrc [Enter]
If a user has more than one account on the internet, just add additional lines starting with: poll.

We could have set fetchmail to run as a daemon and poll the ISP every so often, but fetchmail will cause diald to call out if we are not connected. Instead we have a simple script, I call it: getmail, that is called both by cron and by ip-up.local - see below for examples.  Here it is:

#!/bin/sh

if [ -f /var/lock/LCK..ttyS3 ]; then
        su jpollman -c fetchmail
        su bmote -c fetchmail
fi

When it runs, it first checks to see if we are connected (diald puts a file called LCK..ttyS3 in my /var/lock directory when it is connected, and removes it when it disconnects.)  Note: you may have set diald up differently than we did, or may be using pppd daemon, or using a different com port, so the lock file may have a different name. This script exits if the lock file is not there.  If we are connected, the script will use su to become jpollman and executes the fetchmail program. The -c means; run the following command. After fetchmail is has gotten jpollman's mail, the script becomes bmote via su and runs fetchmail to get his mail. Note: jpollman and bmote are user names on our server - not the names for their ISP email accounts.

Cron: here is a really quick, down-n-dirty, tutorial on cron. Crond is the daemon that is started when your machine boots, and so, is always running in the background. It reads the crontab files every minute to see if anything needs to run. You need to create a crontab for user "root". To do this, as root, type:

crontab crontab [Enter]
Root now has his own crontab file - which is identical to the system's crontab file. To edit root's crontab, type
crontab -e [Enter]
Leave all the header line alone and delete the program lines. When you are done, it should look something like this:
SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
HOME=/
MAILTO="root"
To make cron run a program, add a line with 6 fields: the first five are the time fields and the six field is the program. As an example:
0 1 * * * getmail
The time fields are broken down this way:

       The time and date fields are:

              field          allowed values
              -----          --------------
              minute         0-59
              hour           0-23
              day of month   0-31
              month          0-12 (or names, see below)
              day of week    0-7 (0 or 7 is Sun, or use names)

       A  field  may  be an asterisk (*), which always stands for
       ``first-last''.

       Ranges of numbers are allowed.   Ranges  are  two  numbers
       separated  with  a  hyphen.  The specified range is inclu-
       sive.  For example, 8-11 for an ``hours'' entry  specifies
       execution at hours 8, 9, 10 and 11.

So, in the above example (0 1 * * * getmail) getmail will run at 1 o'clock in the morning everyday. I would prefer to have it run every 5 minutes, so my crontab entry looks like this:

0-59/12 * * * * /usr/local/bin/getmail
To find out more about the crontab file, type:
man 5 crontab [Enter]
ip-up.local: to have the script run every time you connect, just add it to your /etc/ppp/ip-up.local (or ip-up file if that is all you have). To add it, just type it in as a single line with full path. Mine looks like this:
/usr/local/bin/getmail


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Mail for the Home Network

DNS for Mail

By JC Pollman and Bill Mote


Some Final Thoughts

Where does sendmail put the mail when it queues it? The mail queue directory is /var/spool/mqueue. All mail messages become two files, one named dfXXXnnnnn , the other qfXXXnnnnn , where XXX is a three-letter sequence, nnnnn a five-digit sequence. They are used to give every message a unique identifier. The "qf'", or queue control file, contains the e-mail message header and various processing information, and the "df'", or data file, contains the body of the e-mail message. There are other files, but they are of interest only to sendmail.

To see what sendmail is doing, check the file: /var/log/maillog. It is pretty hard to read, but is your only real chance to see what the error might be.

Some of you may log into your local computer with a different name than what you use for your ISP. Fetchmail will obviously get your mail and put it where it belongs, but sendmail needs some special help. Check out the Sendmail-Address_Rewrite Howto. If you have been able to followed this article, this Howto is pretty simple.

Do not be put off if things do not work the first time! I have been using sendmail for 4 years with varying degrees of success. It is a big beast that has evolved greatly over time. Since the vast majority of email on the internet travels via sendmail somewhere along the way, it is worth the time to get it working on your computer.

Final thoughts: We have given you a cookie-cutter recipe for setting up a simple home mail system.  Since success usually creates greater interest, here are some places to learn more:

Sendmail Homepage
Fetchmail Homepage
Procmail Info

Two well know alternatives to sendmail:

Exim
Qmail


Copyright © 1999, JC Pollman and Bill Mote
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Experiments with SMTP

(or: Mail for a Home Network, continued..)

By Jan Stumpel


1. Introduction

I got a lot of reactions to 'Setting Up Mail for a Home Network Using Exim' in LG 43. Most of them said two things: So I went 'back to the drawing board' and had a good look at what happens when e-mail is sent. As a result, this article explains what you must do to make the setup in the LG 43 article really work (I think) .. and also why.

2. SMTP

SMTP, as you probably know, stands for 'Simple Mail Transfer Protocol'. It is the method by means of which mail is exchanged between computers on the Internet. Basic communication between computers (exchange of single packets and of streams of information) is provided for by TCP/IP.  SMTP is a protocol 'on top of' TCP/IP for exchanging messages between computers. Let's do a few experiments to see how SMTP works.

A basic tool for making TCP/IP connections is telnet. If you type

telnet host port

your computer makes a connection to a computer named host on port port. It is like making a telephone call to the office of a company called 'host' and asking to speak to Mr. Port. Only if Mr. Port is in and willing to talk to you, will the call succeed. Similarly, a program ('daemon') must be active on the other computer, 'listening' for connections on the specified port, otherwise you will get the message 'connection refused'.

port is a (16-bit) number. Certain port numbers have been pre-assigned to certain services. Electronic mail (SMTP) uses port 25, and the daemon listening to port 25 is the MTA (the Mail Transport Agent: sendmail, exim, qmail, etc.). If your Linux box is called heaven, you call its SMTP service by typing

telnet heaven 25

You can do this from another computer through a network (LAN or Internet), but you don't need a network: you can test it also by running telnet from the same computer that the MTA runs on. You can even type

telnet heaven smtp

because telnet finds out what the port number of SMTP is by looking it up in /etc/services. The result will be something like:

Trying 192.168.1.1...
Connected to heaven.home.
Escape character is '^]'.
220 heaven.home ESMTP Exim 3.03 #1 Sun, 8 Aug 1999 12:47:24 +0200

This shows that I am running exim 3.03 (I recently upgraded from 2.05 for a good reason, see section 5 below). If I telnet in the same way to the mail server of my ISP, I see that they run Sendmail 8.8.8/1.19.

After the line beginning with 220 you see no prompt or anything; the MTA awaits your instructions. What to do next? Try typing help. The reaction is:

help
214-Commands supported:
214-    HELO EHLO MAIL RCPT DATA
214     NOOP QUIT RSET HELP

These are the commands of the SMTP command language, or 'protocol', that are supported by your site. Not a lot of commands! SMTP is really a 'simple' protocol. The commands are described in the Internet standard RFC821. Some 'extended' commands were added later, in other RFC's, for instance RFC1869. Systems which recognize the extended commands are said to support 'Extended SMTP', or ESMTP. Such systems announce this in their 'welcoming line', as Exim 3.03 did above. The differences between SMTP and ESMTP are not great.

To break the SMTP connection, send the QUIT command.

3. Exchanging greetings: the HELO/EHLO command

After the welcoming line (beginning with 220) from the remote system, you are supposed to send commands. The first command should be HELO, or, if you are dealing with an ESMTP system, EHLO, the more modern version. The command should have your domain name as argument:

EHLO yourdomainname

If  you have a home system without an official domain name, what name do you use? In fact anything is OK,  including your own, self-chosen domain name, such as heaven.home. Let's try it with our ISP's SMTP server by typing telnet smtp.isp.com 25 or whatever. After the welcome message type

EHLO heaven.home

We  get a more or less elaborate 'greeting' message, like:

250-smtp.isp.com Hello customer123.dialin.isp.com [xxx.yyy.zzz.123], pleased to meet you
250-EXPN
250-VERB
250-8BITMIME
250-SIZE

The greeting begins with '250'; this is the SMTP 'OK' code. In this case we are also greeted with our temporary domain name (customer123.dialin.isp.com) and temporary IP address (xxx.yyy.zzz.123) that were dynamically assigned to us when we opened the ppp connection. This information is available to the other system from the underlying Internet transport layer (TCP/IP). In the case of an EHLO command, the other system also sends a few '250' lines announcing which extra SMTP or ESMTP commands it understands, apart from the minimum set required by RFC821.

Mail servers generally don't look at the argument of the EHLO or HELO command at all ('heaven.home'). That means that in practice the EHLO/HELO transaction always succeeds. If the other system doesn't want to do business with you, it has already refused the telnet host smtp connection.

4. Sending the mail

By just a telnet host smtp connection to a mail server you can send electronic mail 'by hand', without even using an MTA or a mail user program like pine. Let's try this (for safety's sake) within our own network at first; in this case of course, we must have a mail server (MTA) running.  User joe sends a message to user emi. This involves three steps. First the MAIL FROM: command (SMTP commands are not case sensitive, so you could also type mail from:).

MAIL FROM: joe@home
250 <joe@home> is syntactically correct

We get a '250' line as answer, so this is OK. Now the second step: the RCPT TO: command, specifying who will get the message.

RCPT TO: emi@home
250 <emi@home> is syntactically correct

So this is also 250, OK. The third step: we enter the message itself, using the DATA command:

DATA
354 Enter message, ending with "." on a line by itself

The '354' reply invites us to type the message data. This is not only the text (or 'body') of  the message! The 'message data' also include the message headers, such as Subject:, To:, Cc:, and From:. The structure of a message is specified in another Internet standard, RFC822. Strictly speaking that is no longer SMTP's business. SMTP is only concerned with the envelope of the message, that is, the information in the MAIL FROM: and RCPT TO: commands. So, the To: header inside the message and the RCPT TO: address on the envelope of the message are in principle two different things. You can actually make them different (experiment only with local messages please!). So, for instance, after the '354' reply we can type a message with 'fake headers':

To: My Daughter
From: Your Dad
           <--(a blank line separates the headers from the body of the message)
Happy birthday!
.          <--(a period at the beginning of a line ends the message)

This will be promptly delivered to user emi. If she opens the message using pine, she will see the To: My Daughter and From: Your Dad addresses.

Problems arise when she tries to reply to the message. Replies by users do not go to the 'envelope from' address (SMTP's MAIL FROM:), but to the From: address which is part of the message data. For starters, pine will think that 'Your' and 'Dad' are two different addresses, and complain that they should be separated by a comma, not a space! And of course there are no mail accounts 'Your' or 'Dad' registered on this machine, or anywhere else. Manipulating or omitting the various addresses is a fertile field for pranksters and spammers.

5. Mail setup for your home network

Now we get to what was wrong with my article in LG 43. Apart from the 'pine bug' that I wrote a note about in LG 44, the two major problems encountered by readers were:

The MTA may not be active at all
I said that the mail client (e.g. pine) on the Linux side can be used 'out of the box'. This is true, but the problem is that with many users the mail client does not come out of the box, but is already installed and being used. Often this means that in its configuration there will be a setting for 'SMTP server', set to the address of the ISP's mail server. In such a case the mail client itself will do the SMTP transaction  (most of them, apart from mail, can do this), and your MTA will not be used at all. Therefore the transport filter will not be used, and the From: address inside the message will not be changed. Remedy: set 'SMTP server' in the mail client to the name of your Linux box, so the mail client will hand over messages to the MTA. If asked for 'your e-mail address', use your local address; exim's transport filter will change it for outgoing mail.

The 'envelope from' is not changed
This was the really big problem. As I said, the exchange of e-mail with an SMTP host involves three steps:

  1. MAIL FROM:
  2. RCPT TO:
  3. DATA
If everything goes well, the remote system will answer 'OK' (i.e., '250') to the first two steps. But sometimes it won't! Many (probably most) mail servers, including the one at my own ISP, do not check the MAIL FROM: address. They always say 'OK' . But some verify that the domain part of the MAIL FROM: address really exists. If not, the mail is refused. If your own ISP checks the MAIL FROM:, the mail setup of my previous article will simply not work for outgoing mail. If your ISP doesn't check, but you send mail to a destination which does, your messages will not arrive and you will get no warning of this.

This means that we definitely should fix not only the From: address inside the message (using the program outfilt described in my previous article) but also the MAIL FROM: (or 'envelope from'). There are two ways in which you can do this.

If you have exim 2.05 or earlier the only way is to add a line in the last section, REWRITE CONFIGURATION, of exim.conf:

*@home joe.bloggs@isp.com F

This changes all local MAIL FROM: addresses to the address at the ISP. Unfortunately, with this method not only the outgoing mail is changed, but the local mail also. You can live with this, because users never see the 'envelope from' when they open a mail message. Replies will go to the correct (message From:) address. However, if someone makes a mistake typing a local address, so that mail is addressed to a non-existent local user, an error message will be sent to the address at the ISP instead of locally.

If you have exim 2.10 or later you can instead add an option to the remote_smtp subsection of the TRANSPORTS CONFIGURATION section of exim.conf. These newer exims allow the 'envelope from' to be changed for outgoing mail only. After the line driver = smtp you insert a line

  return_path = "joe.bloggs@isp.com"

As this is a better method, I advise you to upgrade if you have exim 2.05. In the case of Debian, the latest version of exim (at the time of writing, version 3.03) can be found at www.debian.org among the 'unstable' packages (it is quite stable, don't worry). Upgrading is pretty painless.

Both methods described above produce a fixed 'envelope from' address, just as the program outfilt in my previous article produced a fixed 'message From:' address. I am describing a situation with only one e-mail account. If your home users are known to the outside world by different e-mail addresses, the setup becomes a little bit more complicated, but still possible. It would take a little bit too long to describe the various possibilities here; you might look at 'string expansion' and possibly 'file lookup' in the exim doc's.

-o-o-o-o-o-


Copyright © 1999, Jan Stumpel
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Linux is Better Here

By Trenton G. Twining


In the past months Linux has gained momentum in corporate acceptance. Recent announcements by IBM, Netscape, Oracle, Sun and others have triggered a new degree of recognition for Linux. However, many major corporations may have been using Linux without fanfare, as we are in the offices of a Regional Bell Operating Company (RBOC).

Our project involves producing application program interfaces used by UNIX applications company wide. The developers were all initially supplied with PC_compatible workstations with MS Windows 95 or NT. On each machine was installed one of two commercial communications packages. Developers could request an X server (optional with one of the communication packages).

Before I became involved in the project, at least two developers had installed Linux in lieu of NT. As a Linux advocate, I was delighted at the acceptance of Linux in a corporate setting. I had met with only rare success in convincing other shops to use Linux on the desktop. At this RBOC, I found a willingness to allow innovation on the developers desktop. I wasted little time installing Linux on my desktop machine.

It was more convenient for me to retain NT in order to support users of some Windows-based applications. Hint: Be sure you know what you are doing before attempting to make NT part of a multiple operating system scheme. It is not particularly difficult to accomplish, but it is not at all intuitive.

One of the greatest benefits we enjoy as Linux users is X11. The various X servers in use on Linux were uniformly more stable, more complete and offered better performance than the NT-based X11 servers. While I found one of the Windows-based X servers acceptable on NT, it did not perform as well as either of those I tried on Linux (on the same machine).

The built-in support for NFS was another big plus. When we received distribution media for software, I could mount the CD on my drive and all the UNIX/Linux-based computers in the project could install without a need to keep track of who had the CD last. This was particularly helpful for installing software on our HP server. This machine is in another building and I do not have ready access to it. Thus, mounting a CD as an NFS volume was an important capability.

The Linux users installed Netscape Communicator, giving us a familiar and easily configured communications suite. (We had already been licensed and using it on MS Windows.)

The biggest benefit for me, as a UNIX system administrator and Perl programmer, is the ability to write and test programs locally. Some of my programs have the potential for bad side-effects. If tested on our HP server, my team members could be (and I'm afraid have been) adversely affected. With Linux on my desktop, I have a dual opportunity. First, I can write and test programs on my desktop machine. If I accidentally make the root directory permissions ``drwxr--r--'' (which I once did when invoking a poorly written Makefile), only I am unable to use my machine, rather than 20 users being locked out. Second, I am motivated to make my programs more adaptive by making sure they will run in the BSD-like Linux environment as well as the SVR4 worlds of HP-UX and Solaris.

Our team presently has Linux installed on four PCs with two others as likely prospects. We also have it installed on three Sun Ultra 5 desktop machines. Linux performance (particularly X11) is breathtaking on the Ultra 5. Several people on our project and neighboring projects have installed Linux on their home PCs after seeing it the workplace. For these people, learning UNIX has accelerated markedly.

The accelerated UNIX acclimatization is a plus for the company. Any company involved in migration from legacy systems to a UNIX platform will have a significant cost in retraining. We saw people learning UNIX at an accelerated pace after becoming Linux enthusiasts. This certainly appeared to be a productivity boost and training cost reduction.

If your company could benefit from having UNIX workstations on employee's desks, look at the low cost of entry into Linux. All it takes is a PC (you've probably already got that) and a Linux distribution (not very expensive). Make life better where you are--get Linux.


Copyright © 1999, Trenton G. Twining
Published in Issue 45 of Linux Gazette, September 1999

"Linux Gazette...making Linux just a little more fun!"


Sharing a Linux server under X in the classroom

By Alan Ward


The current situation:

I manage a high school computer lab of 14 Pentiums under Windows 98. These are used for basic instruction in Windows, Works, Office and the basics of programming.

This term, I would like to introduce the older students (17 - 18 year-olds) to Unix, specifically Linux. Besides normal user tasks, I would like them to do a bit of programming, especially with X: drawing sine curves and the like. I would also like them to use Unix math programs such as gnuplot and octave.

However, I need to keep the Pentiums as they are, under Windows. This is for the younger students (16 - 17 year-olds) and staff, who are not--and will not be in the foreseeable future--Linux literate.


Lasciate ogne speranze, voi qu'intrate ...

Everything is connected together via Ethernet.

The extra hardware I have been able to squirrel out of various people consisted of a 486 DX 2 (our server !!), several rather elderly 386 and 486s, and the future prospect of a Pentium of indeterminate speed. None of these has more than 16 Mbytes of RAM.

Personal comment: some people in the administration are not yet confortable with the idea of a free system - it goes against years of "tradition". That may be the worst Linux has to face!


My approach

I undertook this from two different directions:

Configuring the 386 and 486s as X terminals.

Although all these boxes are different, our "best" configuration is more or less as follows:

In all, a typical 1985 MS-DOS configuration. This meant we had to get things rather tight for it to work for us.


Building a working 386 out of spare parts

To save space, I installed an old 1.2.13 kernel. This has the double advantage of taking up less hard disk space and memory, and also booting rathing quickly (no modules).

It came from a Slackware distribution, of which I installed only the A and X series. I rather like slack for this kind of project, as you have much control over exactly what is installed. It is also the only distribution that can be installed by diskette if you can't get nfs to work!

The hard disk partitioning was: 34 M as Linux native, 6 M as Linux swap. I formatted hda1 with 1024 byte inodes, which may have been a mistake. df reports HD use as 28K inodes out of 31K, and 98% of our 34 Mbytes (ouch! gasp!).

As for memory, normal use amounts to about 7 Mbytes (3.5 M hard + 3.5 M swap).

A normal student session on one of these clients consists of the following, most of which is scripted:
startxin .login: NOTE tcsh shell, not bash
xtermin xinit
xhost "server IP"allow server to use local screen
rsh "server IP"login on server
xterm -display "client IP":0.0get a server terminal on our client window, screen 0.0
exitfrom server remote shell
...continue on client

X server on the Pentiums under Windows

The X server I used was MIXServer 5.6 from Microimages. This is a rather standard X server for Windows 9X, with a twm type window manager built-in. I got it on the S.U.S.E. 5.1 distribution CD.

It works quite nicely in 640x480x8 to 800x600x24 resolutions. (I haven't tested it any further.) Most line art and characters come out well, but there can be some problems with bitmaps. My final tests were kmahjongg and netscape.


The X screen as seen under Windows

A typical student session is as follows:
start MIX
telnet the serverwith standard c:\windows\telnet.exe
xterm -display "client IP":0.0don't forget the 0.0 screen!
logout from telnet
... continue on client
As you see, no xhost is necessary, since MIX accepts all X requests without blinking.


I hope to publish some results obtained with the kids during the 1999-2000 term on our web site (Sorry, it's still only in Catalan. But many pretty pictures, for what that's worth).

[Especially these pictures. --Ed.]

Meanwhile, I would welcome both comments and constructive criticism :-)

The author: Alan Ward
CS Department
Escola Andorrana (Batxillerat)
Principality of Andorra
Phone 327.185


Copyright © 1999, Alan Ward
Published in Issue 45 of Linux Gazette, September 1999

Linux Gazette... making Linux just a little more fun!

Published by Linux Journal


The Back Page


About This Month's Authors


Bill Bennet

Bill, the ComputerHelperGuy, lives in Selkirk, Manitoba, Canada; the "Catfish Capitol of North America" if not the world. He is on the Internet at www.chguy.net. He tells us "I have been a PC user since 1983 when I got my start as a Radio Shack manager. After five years in the trenches, I went into business for myself. Now happily divorced from reality, I live next to my Linux box and sell and support GPL distributions of all major Linux flavours. I was a beta tester for the PC version of Playmaker Football and I play `pentium-required' games on the i486. I want to help Linux become a great success in the gaming world, since that will be how Linux will take over the desktop from DOS." It is hard to believe that his five years of university was only good for fostering creative writing skills.

Jim Dennis

Jim is the proprietor of Starshine Technical Services and is now working for LinuxCare. His professional experience includes work in the technical support, quality assurance, and information services (MIS) departments of software companies like Quarterdeck, Symantec/Peter Norton Group and McAfee Associates -- as well as positions (field service rep) with smaller VAR's. He's been using Linux since version 0.99p10 and is an active participant on an ever-changing list of mailing lists and newsgroups. He's just started collaborating on the 2nd Edition for a book on Unix systems administration. Jim is an avid science fiction fan -- and was married at the World Science Fiction Convention in Anaheim.

Bill Mote

Bill is the Technical Support Services manager for a multi-billion dollar publishing company and is responsible for providing 1st and 2nd level support services to their 500+ roadwarrior sales force as well as their 3,500 workstation and laptop users. He was introduced to Linux by a good friend in 1996 and thought Slackware was the end-all-be-all of the OS world ... until he found Mandrake in early 1999. Since then he's used his documentation skills to help those new to Linux find their way.

Mark Nielsen

Mark founded The Computer Underground, Inc. in June of 1998. Since then, he has been working on Linux solutions for his customers ranging from custom computer hardware sales to programming and networking. Mark specializes in Perl, SQL, and HTML programming along with Beowulf clusters. Mark believes in the concept of contributing back to the Linux community which helped to start his company. Mark and his employees are always looking for exciting projects to do.

Mike Orr

Mike is the Editor of the Linux Gazette. You can read what he has to say in the Back Page column in this issue. He has been a Linux enthusiast since 1991 and a Debian user since 1995. He is SSC's Webmaster. He also enjoys the Python programming language. Non-computer interests include ska/oi! music and the international language Esperanto.

JC Pollman

I have been playing with linux since kernel 1.0.59. I spend way too much time at the keyboard and even let my day job - the military - interfere once in a while. My biggest concern about linux is the lack of documentation for the intermediate user. There is already too much beginner's stuff, and the professional material is often beyond the new enthusiast.

Jan W. Stumpel

Jan lives in Oegstgeest, The Netherlands.

Trenton G. Twining

Trenton is a process consultant for Terrapin Technologies, Inc. He specializes in configuration management, complexity management and training in several technical areas. After being a happy user of Coherent, he switched to using Linux in the Summer of '94. Since then he has been a Linux evangelist.

Alan Ward

"Alan teaches CS in Andorra at highschool and university levels. He's back to Unix this year after an 8-year forced interlude since he graduated -- it makes networking so much easier. His hobbies include science photography (both digital and traditional), trekking, rock and processor collecting.


Not Linux


[ Penguin reading the Linux Gazette ]

For what it's worth, during July 1999, www.linuxgazette.com had:

Of course, this doesn't include the mirror sites.

I've gotten over the New Editor ("O dear, when am I going to do something Really Stupid?") stage, and I'm beginning to really enjoy working with the Gazette. It was fun gathering ideas for the FAQ. I also had the opportunity this month to write some scripts in my favorite programming language--Python--to help format the Mailbag, 2-cent Tips and News Bytes. Those scripts alone will save my fingers three hours a month in formatting e-mail addresses and the like. :)

-Mike Orr
Editor, Linux Gazette, gazette@ssc.com


[ TABLE OF 
CONTENTS ] [ FRONT 
PAGE ]  Back


Linux Gazette Issue 45, September 1999, http://www.linuxgazette.com
This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Copyright © 1999 Specialized Systems Consultants, Inc.