old-www/LDP/LG/issue37/lg_answer37.html

515 lines
17 KiB
HTML

<!--startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<META NAME="generator" CONTENT="lgazmail v1.1H.i">
<TITLE>The Linux Gazette 37: The Answer Guy</TITLE>
</HEAD><BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<P> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<center>
<H1><A NAME="answer">
<img src="./../gx/dennis/qbubble.gif" alt="(?)"
border="0" align="middle">
<font color="#B03060">The Answer Guy</font>
<img src="./../gx/dennis/bbubble.gif" alt="(!)"
border="0" align="middle">
</A></H1>
<BR>
<H4>By James T. Dennis,
<a href="mailto:linux-questions-only@ssc.com">linux-questions-only@ssc.com</a><BR>
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H4>
</center>
<p><hr><p>
<!-- endcut ======================================================= -->
<H3>Contents:</H3>
<p><a href="#tag_greeting"
><img src="./../gx/dennis/bbub.gif" alt="(!)" border="0"
align="middle"><strong>Greetings From Jim Dennis</strong></A></p>
<DL>
<!-- index_text begins -->
<dt><A HREF="tag/1.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>serial port settings --or--
<dd><A HREF="tag/1.html"
><strong>
Another Damn WinModem
</strong></a>
<dt><A HREF="tag/2.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Simplified Security? --or--
<dd><A HREF="tag/2.html"
><strong>
Simple Security Tips
</strong></a>
<dt><A HREF="tag/3.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>eterm quickie + general commment (linux SUPERGRAN)</strong></a><dt><A HREF="tag/4.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>nr_files and nr_inodes --or--
<dd><A HREF="tag/4.html"
><strong>
Max Open Files and Inodes: Use The Entries under <TT>/proc</TT>
</strong></a>
<dt><A HREF="tag/5.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>setting up an ISP to serve email</strong></a><dt><A HREF="tag/6.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Getting my new linux box to run the ftp server</strong></a><dt><A HREF="tag/7.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>setting up an ISP to serve email --or--
<dd><A HREF="tag/7.html"
><strong>
Setting up ISP Mail Services
</strong></a>
<dt><A HREF="tag/8.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>[Fwd: rsh on 2.0.34] --or--
<dd><A HREF="tag/8.html"
><strong>
More on: 'rsh' as 'root' Denied
</strong></a>
<dt><A HREF="tag/9.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>procmail --or--
<dd><A HREF="tag/9.html"
><strong>
'procmail' to Get Mail via POP-3? No. 'fetchmail'
</strong></a>
<dt><A HREF="tag/10.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Linux Diagnostic Tool --or--
<dd><A HREF="tag/10.html"
><strong>
Hardware Info Under Linux: MSD.EXE Clone?
</strong></a>
<dt><A HREF="tag/11.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>X terminals via serial links? --or--
<dd><A HREF="tag/11.html"
><strong>
X Windows Over a Serial Line (Null Modem)
</strong></a>
<dt><A HREF="tag/12.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>copy of Microsoft Office --or--
<dd><A HREF="tag/12.html"
><strong>
Free Copy of MS Office for Linux? It isn't April Yet!
</strong></a>
<dt><A HREF="tag/14.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>diald modem settings E71 --or--
<dd><A HREF="tag/14.html"
><strong>
Using "odd" modem settings
</strong></a>
<dt><A HREF="tag/15.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Further answers to questions? --or--
<dd><A HREF="tag/15.html"
><strong>
Sometimes Short of the Question
</strong></a>
<dt><A HREF="tag/16.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Steven Hancock: ps to gif --or--
<dd><A HREF="tag/16.html"
><strong>
More on: Automated PostScript (ps) to GIF Conversion
</strong></a>
<dt><A HREF="tag/17.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>"Routing and Subnetting 101" Linux Gazzette 1/1/99 --or--
<dd><A HREF="tag/17.html"
><strong>
Re: Routing and Subnetting for Classes
</strong></a>
<dt><A HREF="tag/18.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Partitioning my new Linux box... --or--
<dd><A HREF="tag/18.html"
><strong>
Disk Partitioning: Review
</strong></a>
<dt><A HREF="tag/19.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Curious modem hangup... --or--
<dd><A HREF="tag/19.html"
><strong>
PPP Disconnects
</strong></a>
<dt><A HREF="tag/21.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>ifconfig reports TX errors on v2.1.x kernels --or--
<dd><A HREF="tag/21.html"
><strong>
'ifconfig': TX errors
</strong></a>
<dt><A HREF="tag/22.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>System clock is too fast... --or--
<dd><A HREF="tag/22.html"
><strong>
Ahh ... The Toils of Time
</strong></a>
<dt><A HREF="tag/23.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>you are the man --or--
<dd><A HREF="tag/23.html"
><strong>
The Complaint Department: Typos and Grammatical Errors
</strong></a>
<dt><A HREF="tag/29.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>modem disconnect problem?</strong></a><dt><A HREF="tag/30.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>modem problems under linux --or--
<dd><A HREF="tag/30.html"
><strong>
X Prevents/Kills Modem Connection
</strong></a>
<dt><A HREF="tag/31.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>I want my 10 GIGS!!! --or--
<dd><A HREF="tag/31.html"
><strong>
Ultra-DMA and the 8.4Gb IDE Disk Limit
</strong></a>
<dt><A HREF="tag/32.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>LTT submission</strong></a><dt><A HREF="tag/33.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Is it possible to run Debian on 4 MB? --or--
<dd><A HREF="tag/33.html"
><strong>
Low Memory Installation
</strong></a>
<dt><A HREF="tag/34.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Better resolution (laptop LCD) --or--
<dd><A HREF="tag/34.html"
><strong>
Higher Resolution X on a Laptop
</strong></a>
<dt><A HREF="tag/37.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Dos</strong></a><dt><A HREF="tag/38.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Low Level Formatting</strong></a><dt><A HREF="tag/39.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Bad Sectors in my HDD --or--
<dd><A HREF="tag/39.html"
><strong>
Removing Bad Sectors
</strong></a>
<dt><A HREF="tag/41.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Help --or--
<dd><A HREF="tag/41.html"
><strong>
Netscape Communicator: "Improper DNS Type"?
</strong></a>
<dt><A HREF="tag/42.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Communicator and PGP on Linux --or--
<dd><A HREF="tag/42.html"
><strong>
NS Communicator (Mail) and PGP
</strong></a>
<dt><A HREF="tag/43.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Uh, where'd my "man" go? --or--
<dd><A HREF="tag/43.html"
><strong>
'fsck' Breaks 'man' Pages?
</strong></a>
<dt><A HREF="tag/44.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Custom Install --or--
<dd><A HREF="tag/44.html"
><strong>
Unable to Open Console: After "Custom" Install
</strong></a>
<dt><A HREF="tag/45.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Securing a modem dial-out line.</strong></a><dt><A HREF="tag/46.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>Why can I only login as root? --or--
<dd><A HREF="tag/46.html"
><strong>
Another "No Login" Problem
</strong></a>
<dt><A HREF="tag/47.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>RAM</strong></a><dt><A HREF="tag/48.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>I used gzip in bad way... help! --or--
<dd><A HREF="tag/48.html"
><strong>
Accidental Deletion
</strong></a>
<dt><A HREF="tag/49.html"
><img src="./../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
></a>TCP patch for SACK? (RFC 2018) --or--
<dd><A HREF="tag/49.html"
><strong>
TCP/IP SACK Support: When? Now!
</strong></a>
<!-- index_text ends -->
</DL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag_greeting"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="./../gx/dennis/bbubble.gif"
height="50" width="60" alt="(!) " border="0"
>Greetings from Jim Dennis</H3>
<!-- begin greeting -->
<p>
Well, the 2.2 kernel is finally out. Indeed the 2.2.1 patch
has also made its way onto the scene (you just knew they'd find
something worth fixing in the first week).
</p>
<p>
If you're considering upgrading you'll want to look through the
list of required/suggested package upgrades to go with that.
Although most code in userspace isn't affected much by kernel
changes there are always some utilities and applications that
will be.
</p>
<p>
Of course, you can install a new kernel right along side your
existing one --- and reboot between them with glee. Remember
LILO is a multi-boot utility as well as a boot loader --- so
you can easily add new entries to it.
</p>
<p>
Thus upgrade will be much easier than the migration from 1.2
to 2.0 (when the structure of many /proc interfaces changed ---
breaking the '<tt>ps</tt>' related utilities). That's good since there
are probably close to ten times more Linux users now.
</p>
<p>
Of course the faint-hearted can just wait for their friendly
distribution maintainer to put out an all new version with
the 2.2.x kernel and all the new utilities pre-built. However,
what would the fun be in that.
</p>
<p>
To learn more about upgrading your kernel look LinuxHQ
(<a href="http://www.linuxhq.com/"
>http://www.linuxhq.com/</a>). They have about a half dozen links
to pages on the subject (particularly with lists of requisite
package upgrades and links to the tar.gz files and even one
site that has links to the requisite RPMs).
</p>
<p>
After you upgrade you'll want to keep you eyes on those sites,
checking back over the next couple of months. There will probably
be other packages that are found "wanting" (unready for 2.2).
</p>
<p>
If you get that all installed, read all my rantings for this
month and are still bored --- take a look at the
"Linux Tips & Tricks" site
(<a href="http://www.patoche.org/LTT/">http://www.patoche.org/LTT/</a>)
and considering adding your own suggestions to the mix.
</p>
<p>
I added a couple myself. I also suggested to the site
maintainer that he link to LG's "2-cent Tips" and to the
Linux-Tips HOWTO
(<a href="http://metalab.unc.edu/LDP/HOWTO/Tips-HOWTO.html"
>http://metalab.unc.edu/LDP/HOWTO/Tips-HOWTO.html</a>).
</p>
<p>
While we're on the subject of "tips" here's one for you
budding shell scripters and programmers out there:
</p>
<blockquote>
If you have to use /tmp --- do it safely. Sure,
you script is running on a single-user workstation
now. But eventually you'll use it on a multi-user
machine or someone will copy it. There are all
sorts of nasty tricks people can play on you
involving symlinks in /tmp.
</blockquote>
<blockquote>
Here's one way:
</blockquote>
<blockquote><pre>
TMPD=/tmp/$0$$$(date +%s)
## get a (hopefully unique) name
## use any reasonable method for this.
OMASK=$(umask)
umask 077 || exit 1
mkdir $TMPD || exit 1
trap 'rm -fr $TMPD; exit' 0
umask $OMASK
</pre></blockquote>
<blockquote>
... this should either successfully make a safe, private
directory under /tmp (and you use $TMPD for the rest of
your temporary file operations --- using whatever names
you want) or it should fail. There should be no race
condition since the new directory should be made with the
appropriate permissions in a single system call (and
my strace output under Linux/bash confirms that).
</blockquote>
<blockquote>
The part to be careful of is the '<tt>trap</tt>' clause. That
should automatically remove the temp directory and files
on exit (normal or in response to any trappable signals).
(If you use a <tt>kill -KILL</tt> on that script while it's running
--- it won't get a chance to clean up after itself, but a
normal [Ctrl]-[C] and most other kill signals should be
fine. I still suggest using your own private <tt>~/tmp</tt>
directory whenever that's feasible (but not if your
<tt>$HOME</tt> is served over NFS).
</blockquote>
<blockquote>
I'll be teaching a class in shell scripting at Mission
College (Santa Clara, CA) starting tomorrow. That should
be interesting.
</blockquote>
<!-- end greeting -->
<!--======================================================= -->
<P> <hr> <P>
<center><H4>Previous "Answer Guy" Columns</H4></center>
<P>
<A HREF="../issue13/answer.html">Answer Guy #1, January 1997</A><BR>
<A HREF="../issue14/answer.html">Answer Guy #2, February 1997</A><br>
<A HREF="../issue15/answer.html">Answer Guy #3, March 1997</A><br>
<A HREF="../issue16/answer.html">Answer Guy #4, April 1997</A><br>
<A HREF="../issue17/answer.html">Answer Guy #5, May 1997</A><br>
<A HREF="../issue18/lg_answer18.html">Answer Guy #6, June 1997</A><br>
<A HREF="../issue19/lg_answer19.html">Answer Guy #7, July 1997</A><br>
<A HREF="../issue20/lg_answer20.html">Answer Guy #8, August 1997</A><br>
<A HREF="../issue21/lg_answer21.html">Answer Guy #9, September 1997</A><br>
<A HREF="../issue22/lg_answer22.html">Answer Guy #10, October 1997</A><br>
<A HREF="../issue23/lg_answer23.html">Answer Guy #11, December 1997</A><br>
<A HREF="../issue24/lg_answer24.html">Answer Guy #12, January 1998</A><br>
<A HREF="../issue25/lg_answer25.html">Answer Guy #13, February 1998</A><br>
<A HREF="../issue26/lg_answer26.html">Answer Guy #14, March 1998</A><br>
<A HREF="../issue27/lg_answer27.html">Answer Guy #15, April 1998</A><br>
<A HREF="../issue28/lg_answer28.html">Answer Guy #16, May 1998</A><br>
<A HREF="../issue29/lg_answer29.html">Answer Guy #17, June 1998</A><br>
<A HREF="../issue30/lg_answer30.html">Answer Guy #18, July 1998</A><br>
<A HREF="../issue31/lg_answer31.html">Answer Guy #19, August 1998</A><BR>
<A HREF="../issue32/lg_answer32.html">Answer Guy #20, September 1998</A><BR>
<A HREF="../issue33/lg_answer33.html">Answer Guy #21, October 1998</A><BR>
<A HREF="../issue34/lg_answer34.html">Answer Guy #22, November 1998</A><BR>
<A HREF="../issue35/lg_answer35.html">Answer Guy #23, December 1998</A><BR>
<A HREF="../issue36/lg_answer36.html">Answer Guy #24, January 1998</A><BR>
<!--startcut ======================================================= -->
<P> <hr> <P>
<H5 align="center"><a href="http://www.linuxgazette.com/copying.html"
>Copyright &copy;</a> 1999, James T. Dennis
<BR>Published in <I>The Linux Gazette</I> Issue 37 February 1999</H5>
<P> <hr> <P>
<!-- begin lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="./index.html"
><IMG SRC="./../gx/indexnew.gif" ALT="[ Table Of Contents ]"></A>
<A HREF="../index.html"
><IMG SRC="./../gx/homenew.gif" ALT="[ Front Page ]"></A>
<A HREF="./lg_bytes37.html"
><IMG SRC="./../gx/back2.gif" ALT="[ Previous Section ]"></A>
<A HREF="./york.html"
><IMG SRC="./../gx/fwd.gif" ALT="[ Next Section ]"></A>
<!-- end lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<!--endcut ========================================================= -->