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


(?) The Answer Guy (!)


By James T. Dennis, tag@lists.linuxgazette.net
Starshine Technical Services, http://www.starshine.org/


Contents:

(!)Greetings From Jim Dennis

(?)serial port settings --or--
Another Damn WinModem
(?)Simplified Security? --or--
Simple Security Tips
(?)eterm quickie + general commment (linux SUPERGRAN)
(?)nr_files and nr_inodes --or--
Max Open Files and Inodes: Use The Entries under /proc
(?)setting up an ISP to serve email
(?)Getting my new linux box to run the ftp server
(?)setting up an ISP to serve email --or--
Setting up ISP Mail Services
(?)[Fwd: rsh on 2.0.34] --or--
More on: 'rsh' as 'root' Denied
(?)procmail --or--
'procmail' to Get Mail via POP-3? No. 'fetchmail'
(?)Linux Diagnostic Tool --or--
Hardware Info Under Linux: MSD.EXE Clone?
(?)X terminals via serial links? --or--
X Windows Over a Serial Line (Null Modem)
(?)copy of Microsoft Office --or--
Free Copy of MS Office for Linux? It isn't April Yet!
(?)diald modem settings E71 --or--
Using "odd" modem settings
(?)Further answers to questions? --or--
Sometimes Short of the Question
(?)Steven Hancock: ps to gif --or--
More on: Automated PostScript (ps) to GIF Conversion
(?)"Routing and Subnetting 101" Linux Gazzette 1/1/99 --or--
Re: Routing and Subnetting for Classes
(?)Partitioning my new Linux box... --or--
Disk Partitioning: Review
(?)Curious modem hangup... --or--
PPP Disconnects
(?)ifconfig reports TX errors on v2.1.x kernels --or--
'ifconfig': TX errors
(?)System clock is too fast... --or--
Ahh ... The Toils of Time
(?)you are the man --or--
The Complaint Department: Typos and Grammatical Errors
(?)modem disconnect problem?
(?)modem problems under linux --or--
X Prevents/Kills Modem Connection
(?)I want my 10 GIGS!!! --or--
Ultra-DMA and the 8.4Gb IDE Disk Limit
(?)LTT submission
(?)Is it possible to run Debian on 4 MB? --or--
Low Memory Installation
(?)Better resolution (laptop LCD) --or--
Higher Resolution X on a Laptop
(?)Dos
(?)Low Level Formatting
(?)Bad Sectors in my HDD --or--
Removing Bad Sectors
(?)Help --or--
Netscape Communicator: "Improper DNS Type"?
(?)Communicator and PGP on Linux --or--
NS Communicator (Mail) and PGP
(?)Uh, where'd my "man" go? --or--
'fsck' Breaks 'man' Pages?
(?)Custom Install --or--
Unable to Open Console: After "Custom" Install
(?)Securing a modem dial-out line.
(?)Why can I only login as root? --or--
Another "No Login" Problem
(?)RAM
(?)I used gzip in bad way... help! --or--
Accidental Deletion
(?)TCP patch for SACK? (RFC 2018) --or--
TCP/IP SACK Support: When? Now!

(!) Greetings from Jim Dennis

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

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.

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.

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 'ps' related utilities). That's good since there are probably close to ten times more Linux users now.

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.

To learn more about upgrading your kernel look LinuxHQ (http://www.linuxhq.com/). 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).

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

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 (http://www.patoche.org/LTT/) and considering adding your own suggestions to the mix.

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 (http://metalab.unc.edu/LDP/HOWTO/Tips-HOWTO.html).

While we're on the subject of "tips" here's one for you budding shell scripters and programmers out there:

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.
Here's one way:
	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
... 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).
The part to be careful of is the 'trap' clause. That should automatically remove the temp directory and files on exit (normal or in response to any trappable signals). (If you use a kill -KILL 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 ~/tmp directory whenever that's feasible (but not if your $HOME is served over NFS).
I'll be teaching a class in shell scripting at Mission College (Santa Clara, CA) starting tomorrow. That should be interesting.


Previous "Answer Guy" Columns

Answer Guy #1, January 1997
Answer Guy #2, February 1997
Answer Guy #3, March 1997
Answer Guy #4, April 1997
Answer Guy #5, May 1997
Answer Guy #6, June 1997
Answer Guy #7, July 1997
Answer Guy #8, August 1997
Answer Guy #9, September 1997
Answer Guy #10, October 1997
Answer Guy #11, December 1997
Answer Guy #12, January 1998
Answer Guy #13, February 1998
Answer Guy #14, March 1998
Answer Guy #15, April 1998
Answer Guy #16, May 1998
Answer Guy #17, June 1998
Answer Guy #18, July 1998
Answer Guy #19, August 1998
Answer Guy #20, September 1998
Answer Guy #21, October 1998
Answer Guy #22, November 1998
Answer Guy #23, December 1998
Answer Guy #24, January 1998


Copyright © 1999, James T. Dennis
Published in The Linux Gazette Issue 37 February 1999


[ Table Of Contents ] [ Front Page ] [ Previous Section ] [ Next Section ]