More 2 Cent Tips & Tricks LG #57

#format of the file: #

Dos files have   at endlines,
Mac files have  at endlines,
Unix files simply have  at endlines.

I have limited Linux knowledge & just want to get it working to log messages from cisco devices. Do you know of the commands to get it working.

The debian package « mbr » is an MBR only, which defaults to booting your active partition, but press SHIFT and you can choose a partition, or to boot from floppy. Sweet — Heather

Someone proposed a kernel patch to allow Linux to deal with bad memory because of damaged SIMMs. Check the Kernel Traffic ( archives for that. A great place to look for patches is but I didn’t see it there. — Heather

There are lots of utilities to link to Palm Pilots, but if it’s Palm’s Desktop you definitely want to use, check out jpilot, and you should feel right at home. — Heather

hostname: Microsoft mail server: DNS server:

This is an antispam feature. If a machine’s number does not resolve in what is called « reverse DNS » and thus map to a name, it may not be a real host on the internet at all, so Exchange is ignoring the mail. Lots of companies have hosts that they don’t want the whole world to know about, though they might want their inside servers to know them this way – for this, use an inside DNS server that contains more information for your zone than the one outsiders are allowed to see. It’s often called « split DNS » because the early implementations of it involved hacking on the DNS software a bit.

Or, much easier, you could send your test mail from a host which really reverse resolves correctly. — Heather

First apply the mask. The idea is that the mask is a binary number that results from having 1’s all the way down to a certain point. If it’s a normal class A, B, or C, it’s easy – everywhere that the mask says 255, use the number from the IP address. Where it says 0, no bits are allowed to leak through, so use 0.

The result is your network value. Your gateway is often the next address (1 greater than the network number). However you should check – some places swap broadcast and gateway (the broadcast is usually the highest legal address in the range). — Heather

This concludes our recent Danish translation thread. Thanks everyone! — Heather

I use ncftp. It automatically tries to recover the partial download if you issue the « get » command again. Start ncftp and type « help get » to see the options. — Mike

The point here, is a solution for problems that look like it may be a winmodem, but it’s not. — Heather

One common problem with Modems when migrating to Linux is IRQ conflicts. Many ISA Network Cards default to IRQ3, commonly used by the modem. Under DOS/Windows, this shows up as a non-working Network card, or may be overcome by a plug-and-play configuration utility for the network card.

Under Linux, the Network card comes up first, and it’s the modem that won’t work. This can be very frustrating for a new user, since « everything works fine under Windows », and nothing indicates what the problem is with the modem (usually Linux utilities will just report that it’s « busy »).

Make sure that the Modem and NIC are hard-configured or at least have their ROM permanently set to different IRQ’s, and the light will begin to dawn.

lil2cent-4111919 True Modems

Sun, 06 Aug 2000 22:05:00 GMT
From: carl smith

Just read a reply about a true modem. I’ve been searching for one ever since a friend mentioned it to me. He has an ISA True modem. And wouldn’t you know it mine is not. It’s a PCI and so far no luck finding a PCI True modem. Any ideas on where I might score one?

Hoping for the right answer,

There’s a HOWTO on Winmodems!!! –Mike

All the thing says is, « buggy proprietary drivers exist for _two_ modems. Any others, you’re SOL. » — Ben

That’s less than exciting news; there’s better and _far_ more informative info at and – and they provide links to quite a bit of very creative software that lets you get a number of other uses out of winmodems (e.g., DTMF enc/decoder). –Ben

Okay, so maybe it should have been an Answer Gang thread, but it is rather short. The Gromitkz site has an excellent set of guides about buying real modems in chain stores. It appears there may be support for 3 of these incomplete modems now, but it remains to be seen if any of them will port their efforts to the 2.4 kernel.

The state of the art in forcing Lucent’s modems to work is

  • fetch a raw-patched version of their module which doesn’t steal « register_serial » and « unregister_serial » (you can use theirs straight, if you don’t use other serial gadgets at all)
  • use the 2.2.14 version of the ppp support module even if you’re in a later kernel. That will require also forcing the underlying slhc.o to load to make a complete ppp stack.

In short, yuck. — Heather

lil2cent-4111919 re: HELP: Crontab not running nested executable

Fri, 11 Aug 2000 09:44:59 -0500
From: John McKown

One question. In « file1 », do you specify the entire pathname to « file2 » in order to run it? The reason that I ask is the quite often « cron » does not have the PATH that you expect. This generally results in a « file not found » type error.

Hope this helps some,

John McKown

And on the same topic, but a different tip…

lil2cent-4111919 Crontab not running nested executable

Wed, 2 Aug 2000 12:30:52 -0400
From: Pierre Abbat

The most likely reason is that the path is different or something else in the environment. Stick an env command in File1. The output should be sent to you by email from the cron job. Compare it to the env when you run File1 yourself. I usually write full paths in cron scripts for this reason.


lil2cent-4111919 Port numbers

Wed, 2 Aug 2000 22:34:46 -0400 (EDT)
From: Kurt

READ  Back Page LG #32

The proper place to find port numbers is the Internet Assigned Number Authority, at

The page you are looking for is

Chris Gianakopoulos adds:

There exists a good list of well known port numbers for TCP and UDP. It is called (of course!) The Assigned Numbers RFC. Here’s the easiest way to find it. Go to a site such as, and search for: RFC1340

You will get lots of hits that reference RFC1340.html. This RFC (an acronym for Request For Comments — I know, I know, you probably already knew that!) has your information and a ton of other assigned numbers such as protocol numbers, magic numbers, ……..

lil2cent-4111919 Rawrite script

Thu, 3 Aug 2000 13:52:38 -0400

I’ve been coming across those boot (raw) images quite a bit lately, and as I move toward an all GNU/Linux solution, I find that saving images of certain DOS formatted diskettes is quite useful. So, in part as an exercise in using getopt (1) , I decided to write a script wrapper around dd.

Here it is, for what it’s worth:

lil2cent-4111919 255 or 256 IPs?

Thu, 3 Aug 2000 12:05:20 -0700 (PDT)
From: James Blackwell

While you are of course correct regarding the fact that an octet can not exceed 255 for obvious reasons, what I think he was referring to is that some texts (particularly newer ones) refer to 256 possible values.

While you are correct in stating 255 is the maximum, I think you forgot that the minimum isn’t 1, it’s 0. This leads to 256 possible numbers per byte.

lil2cent-4111919 Reading Word files

Fri, 4 Aug 2000 17:18:10 -0400 (EDT)
From: Matthew Willis

Tip: How to view microsoft word files

You can use several programs to translate microsoft word « doc » files to some other format. There is word2x (which works for word 6) or mswordview (which work for MS Word Version 8, i.e. Office97). Or, you can download the free version of WordPerfect which can read many Word files. Another option is to download abiword, which can read microsoft word files. I have automatically configured pine to call abiword on ms word files by editing /home/matt/.mailcap and having this line in it:

application/msword;abiword %s

lil2cent-4111919 Windows Install over Linux

Fri, 4 Aug 2000 16:53:39 -0700 (PDT)
From: adh math

Dear Mr. Train,

This advice may be quite late (your original message is nearly a month old), but I hope you haven’t had any problems…

Typically, Windows overwrites the master boot record when it is installed, and I’ve had worse things happen (like the Windows installer corrupting the partition table). The standard advice is to install Windows before installing other operating systems. It sounds like this isn’t an option for you, but please be aware that by installing Windows on top of Linux you’re likely to have frightening (or infuriating, if you prefer) problems which may or may not require re-installing Linux and restoring all your user data.

Best of luck, in any case!

lil2cent-4111919 Linux-friendly ISPs

Fri, 4 Aug 2000 17:02:27 -0700 (PDT)
From: adh math

You posted to Linux Gazette about looking for ISPs that allow Linux connections. This isn’t much (in fact, probably little more than moral support), but in the Pacific northwest, is Linux friendly, as is I strongly prefer the former, because 1. They run FreeBSD (instead of Windows NT) and 2. Their modems are better configured (e.g., they answer without ringing four times, and are not always busy).

READ  HelpDex LG #60

I’m sure there are counterparts in other parts of the country…

lil2cent-4111919 Passwords and SSH

Fri, 4 Aug 2000 17:36:57 -0700 (PDT)
From: adh math

Dear Mr. Benfell,

Can’t help you with POP over SSH, but can perhaps explain why you keep getting prompted for passwords (and why you should be *happy* about it:).

If you’re not prompted to enter a password to authenticate a connection, it’s because your password is stored on a machine somewhere, often as plain text. In other words, storing your password is like writing your PIN on your ATM card. If you care about privacy enough to encrypt network transmissions with SSH (and you should, with good reason), you probably also care enough not to leave your password written on a scrap of paper next to your computer, or sitting unencrypted on a hard drive (possibly on a publically-accessible server, or on your laptop, where a thief could get access to it by booting with a rescue disk, thereby granting themselves root).

Hope that makes the password annoyance more tolerable, and sorry I can’t help you with POP/SSH.
David Benfell replies: This problem was solved a long time ago. And I’m well aware of the security issues.

What you can do is run ssh-keygen on each machine that you want to be able to communicate in this way. This produces two files: identity and from each machine must be copied into the authorized_keys file of each of the others.

The authorized_keys file can hold multiple keys. Each key takes one line. So you copy the file from each machine with commands something like:

 scp .ssh/ user@remote-machine-1:.ssh/
 cat .ssh/ >> .ssh/authorized_keys

Remember that for this to work, each machine must have a copy of the other machines’ keys. So, you then log in to the remote machine and do something similar:

ssh user@remote-machine-1
(enter the password on the remote machine)
scp .ssh/ user@local-machine:.ssh/
cat .ssh/ >> .ssh/authorized_keys

Why bother?

So you won’t have to type the password every five minutes for every POP account you’re accessing this way. I have four e-mail accounts and collect several hundred e-mails per day. So I prefer to leave fetchmail more or less continuously running.

I used to do this with fetchmail’s daemon mode. But for pop via ssh, this won’t work.

So I need to change my .fetchmailrc so it looks something like this (for only one e-mail account):

 protocol POP3
 is localuser here
poll port 11110 via localhost user username pass ********
 preconnect "ssh -C -f -L sleep 5"

It needs the password in the .fetchmailrc file but if you have a reasonably secure system, this isn’t a tremendous worry. .fetchmailrc cannot be world-readable (fetchmail will reject it if it is). I’m not that worried about people gaining access to my system as long as they can’t sniff the password in plain text off the internet (which they can do with normal POP usage, and in my case, it was getting transmitted every five minutes, so the bad guy wouldn’t even have to have been terribly patient).

The password still has to be fed to the pop daemon, but this way, it isn’t crossing the Internet in clear text for feeding.

Next, create a script like:

while true; do fetchmail; sleep 5m; done

I call mine « getmail ».

Then I can do:

ssh-agent getmail

It asks me for the passphrase once, then uses the keys to authenticate my access to the remote systems.

lil2cent-4111919 Missing/duplicated keystrokes

Sat, 5 Aug 2000 13:46:55 +0200
From: Tom

after i work with my computer for about 20 minutes or so, i start missing keystrokes and sometimes keystrokes are duplicated

Seems that your Keyboard-Controller is overclocked. If you have an AWARD Bios, enter it pressing DEL when the computer is starting. Select:

-> Chipset Features Setup
 -> KBD Clock Src Speed
  -> 8 Mhz

lil2cent-4111919 Regarding Dual-Boot Windows/Linux

Sun, 6 Aug 2000 21:45:56 -0400
From: Robert Day

Well, your tips are helpful I have noticed, but I do know one thing about RedHat (In particulay, it’s my chosen Distro)

Use FDISK (Windows version is fine) to create a partition LESS than the full drive (Or two hard drives) – leave whatever you need for Linux EMPTY… (Partition Magic to shrink the partition is fine as well) and install Win9x/NT/2k

Then, boot up with yer RedHat CD/Floppy, and install into the empty area… The LILo config will see the Windows install, and add it to LILO for you.. (Install LILO into the MBR – overwriting the DOS MBR) and voila, Dual Boot – It’s simply simple..

lil2cent-4111919 CB Radio Connection

Tue, 8 Aug 2000 15:07:50 -0500
From: Jonathan Hutchins

READ  News Bytes LG #62

You might be able to get a good idea of how to do this by studying the « Amateur Radio » guides for Linux.

In any case, I don’t think it can be done with one CB radio, but it could be done with two (at each end).

Please note that doing this may be ILLEGAL. It also violates the FCC rule that requires you to include your license number in each transmission.

One problem with this is that while telephony and modems are « full duplex », which means that both ends can both speak and listen at the same time, CB’s are « half duplex », which means when one is « talking », the other must be « listening ».

First, you have to separate the « send » and « receive » or « mic » and « earpiece » channels. In a telephone, this is accomplished by having both mic and speaker « live », separated by a biasing transformer so that « your » mic is « louder » on the output to the phone line, and « their » mic is louder on « your » earphone. For CB purposes this would be easiest to accomplish with a modem that was set up for an acoustic adapter – one that you place the telephone receiver in so that it doesn’t actually plug in to the phone but produces the equivalent tones through a speaker held next to the headset mic and vice versa.

The send output (or mic output for the coupler) goes to the mic in on one CB, set to say Channel 10, with the Transmit switch strapped « On ». At the other end, a CB would be set to listen to Ch. 10, with the output of the speaker or headphone jack going to the earpice or receive circuit. Repeat the process in the other direction on channel 20.

You now have monopolized two CB channels for miles around with earsplitting noise which will bleed across adjacent channels (hence the large interval between send and receive), but you may have reached something close enough to a telephone connection that doing ATH1 on one end and ATA on the other may get you a connection.

If you had a couple of modems capable of doing a synchronous connection, it wouldn’t be too hard to wire something up for single-channel use, but it would involve doing some interesting coupling between the sync signal or DSR/DTR pair and the « Send » switch.

On the other hand, there are lots of possible problems here. How do you get that « send » output isolated if you don’t have an acoustic coupler? Can you be sure that the modems will sync? What do you say to the guy from the FCC who says he’s traced the signal that’s jamming everybody’s CB’s to your rooftop? And it’s very likely you can’t do more than 2,400 baud because of the limited quality of the connection.

You will find that unless you’re a real handy electronics hacker who knows the guts of a telephone pretty well, this will be difficult enough that you’ll want to buy the pieces ready made, which means buying the Amateur Radio gear if you can; which still means adapting it, and which means spending real money. Unless your time is pretty worthless, you and your boss would probably be better off purchasing a wireless networking solution from an existing vendor.

lil2cent-4111919 Tree script

Wed, 9 Aug 2000 12:49:30 +0200
From: Matthias Arndt

This is a new version of the bash based tree utility which was published in the Linux Gazette about 2 years ago. I’ve added the feature to display the files inside the directories. This tool displays the whole directory tree below the PWD. You may supply an alternate starting directory on the command line. This is a bash script so it is not very fast. But obviously, it does its job.


To use the script, just cut and paste the code to your favourite editor. Call it tree and make the script executable using chmod u+x. I suggest copying it to /usr/local/bin as root and do a chmod +x on it to make it available to all users on your system. The output goes straight to the stdout. This means you can use I/O redirection to capture the resulting tree to a file.

As on all of my releases of software for Linux, the GNU General Public Licence (GPL) applies to this utility.

[Matthias also wrote an article in this issue about window managers. -Mike]

This page written and maintained by the Editors of the Linux Gazette. Copyright © 2000,
Published in Issue 57 of Linux Gazette, September 2000