LINUX GAZETTE

May 2001, Issue 66       Published by Linux Journal

Front Page  |  Back Issues  |  FAQ  |  Mirrors  |  Search

Visit Our Sponsors:

Linux NetworX
Tuxtops
eLinux.com

Table of Contents:

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

Linux Gazette Staff and The Answer Gang

Editor: Michael Orr
Technical Editor: Heather Stern
Senior Contributing Editor: Jim Dennis
Contributing Editors: Ben Okopnik, Dan Wilder, Don Marti

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.
Linux Gazette[tm], http://www.linuxgazette.com/
This page maintained by the Editor of Linux Gazette, gazette@ssc.com

Copyright © 1996-2001 Specialized Systems Consultants, Inc.

The Mailbag



HELP WANTED -- Article Ideas

Send tech-support questions, answers and article ideas to The Answer Gang <linux-questions-only@ssc.com>. Other mail (including questions or comments about the Gazette itself) should go to <gazette@ssc.com>. All material sent to either of these addresses will be considered for publication in the next issue. Please send answers to the original querent too, so that s/he can get the answer without waiting for the next issue.

Unanswered questions might appear here. Questions with answers--or answers only--appear in The Answer Gang, 2-Cent Tips, or here, depending on their content. There is no guarantee that questions will ever be answered, especially if not related to Linux.

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



Device Drivers for Linux Gazette

Wed, 18 Apr 2001 22:39:40 -0700
Ryan Thibodeau (rthibode from onlineathens.com)

Hi. Just dicovered Linuxgazette today. This is a really great site.

If you are looking for article ideas, I'd like to see an article, or even series, on writing device drivers for Linux. This is a topic I have found very little information about on the net.

Just my two cents.

Writing the Linux kernel's device driver interfaces are enough of a subject to fill a whole book. Maybe the O'Reilly Writing Linux Device Drivers (by Allessandro Rubini) and their Understanding the Linux Kernel by Daniel Pierre Bovet (among others) would be a good choice for you.

As for documention online: You could always read the sources, copy and paste parts of the Makefiles, copy an existing (similar) device driver and edit. I realize that this is a horrible oversimplification; but that's how must of the Linux kernel hackers started.
-- JimD


Mon, 16 Apr 2001 22:04:56 -0700
Vivek Kumar (ascon_system from netkracker.com)

how to write a parallel port device driver,ie, interrupt driven. Not, for printer, but,for general device connected to EPP port..?

If you need something to be interrupt driven than you need a kernel module. You might be able to have a very simple kernel module that simply relays the interrupt as a character through a device node. Then you could have a user space process listening...

[ Some guesses about the nature of poll() and select(), trimmed. ] Please post a message to a good linux programming newsgroup for better details. Actually I've posted an abstracted version of this question to the comp.os.linux.development.system newsgroup on your behalf. So, perhaps there's already an answer waiting...
-- JimD

Well, the Answer Guy is just barely getting into this subject, so for this topic, he's a newbie like the rest of us. It looks like some of our weekend mechanics really want to get down into the spark plugs, there. So, if anyone feels inclined to write a down and dirty device driver article that explains a bit of deep wizardry in plain english, especially if it covers something that's new in the 2.4 series kernels, we'd love to publish it. -- Heather

Or if anybody would like to dissect and explain a small driver they've written, that would also make a good article. -- Mike


GENERAL MAIL



Great

Sat, 31 Mar 2001 23:07:10 -0600
James E. Touma (toumaj from home.com)

Great April edition. Thanks a lot. Keep up the good work (and the interesting topics).

Thanks for reading us, Jim! -- Heather


Subscribing to LG

Sun, 1 Apr 2001 20:36:36 -0700
Mike Orr (iron from mso.oz.net)

Finally, a way to subscribe to Linux Gazette!

Debian has long had the lg-issue## packages. Now it has a couple new packages:

Of course, it adds/removes packages only when you do a general package update. Note that these programs are supported by Debian, not by LG.

-- Mike (your friendly Linux Gazette Editor)

Looks like you have to get it from testing (aka woody) or unstable (aka sid) but at least it shouldn't require a libc update, if you temporarily add one of these to your sources list to get them. If one of these does ask for a libc change, it's a packaging bug and you should report it immediately.

But be especially careful to change things back, or you may find yourself in for a big surprise when you run "apt-get upgrade" to catch the latest security patches. -- Heather


Your writing of: "Integrating" Linux/sendmail with MS Exchange

Tue, 10 Apr 2001 10:39:15 -0400
Dave Tabor (dtabor from mageeop.com)

Hi,

Just a note of constructive criticism.

I just read a copy of your writing of "Integrating" Linux/sendmail with MS Exchange, on this site.

http://lhd.datapower.com/LDP/LDP/LG/issue38/tag/5.html

It's something you wrote in 1999, so you may be writing differently now. If so, please disregard this letter.

What you are about to say is still valuable as a reminder to new members of the Answer Gang, potential article authors, and in fact just about anybody who hopes to be a very vocal Linux advocate. So I hope you don't mind that we've published it anyway. -- Heather

Although I found this information helpful, you appear to have trouble staying on track with the useful information, and like to get off subject with the Microsoft bashing.

I do use Microsoft products, as well as Linux and AIX products, and understand your point of view (even agree with most, if not all, of it).

My constructive criticism is that you should refrain from the Microsoft bashing or at least keep it to one line, and keep more to the point of trying to relay useful information. (I'm assuming that is what you are really trying to do.)

If someone is having trouble with something like integrating sendmail and exchange, they may not have a choice about what systems or software to use, and just need some well written, detailed information, not an anti-Microsoft commercial.

- Dave

Thanks, Dave. Issue 38 was a long time ago now.

The Answer Gang now includes a number of more cheerful sorts in addition to the curmudgeonly Answer Guy himself. One or two even still use Windows for some of their work. (Note: we avoid answering Windows questions at all, unless they're really about working with Linux environments.) Having more of us frees the ones who really don't want to touch anything about MS, from even having to answer. Also, a heavier editorial hand is being applied now.

As for myself, I look forward to the day when systems will be sufficiently easy to use that it will not be clear... nor terribly necessary to know... which OS is chugging along "under the hood". I don't think that day is at all close but I look forward to it anyway. :)

-- Heather


Thank you

Wed, 28 Mar 2001 22:10:12 EST
Spartaco Cicerchia (MI1SA from aol.com)

Dear Mike

I want to take the opportunity to thank you very much for the feed back and for taking the time to give me the information.


incensative, and down right rude,

Wed, 4 Apr 2001 00:04:53 -0400
Joe Agate (joetagate from home.com)

sorry pal, but after reading your reponse to a post for help, i couldnt help but send you this note about what an [ rude word deleted ] you must be...and would be very much surprised if anyone would want you on the payroll....

respectfully,
joe agate

http://rpmfind.net/linux/mdw/LDP/LG/issue50/tag/33.html

[ HTML version of same text, also deleted ]

Curiously, he chose to "rag" on the Answer Guy for one of his clearer answers to an unclear question. He calls him a bad name, then signs off "respectfully". Right.

Is it really "insensitive" to mention that LG has a search engine (http://www.linuxgazette.com/search.html)? Nope, I think not.

Is it "insensitive" to ask that querents mention what they've tried already? Maybe - but it's a fact of life in tech support, most people say "it's broken" not "I tried this, and that, and the other thing, and... yada yada ... anyways so you can see I tried everything, and it hates me". In plain verbal conversation it's rude to maunder on like that, so people tend not to do it. In tech support, the more info you can send us (that is related to the question) the better we can help. If this were a phone call, we could have this merry back and forth, and it still probably wouldn't take an hour. At typical Answer Gang speeds though... more info will help you as much as it helps us.

Is it "insensitive" to suggest that the poor bloke may have to buy a new card or new server? Probably. Oh well. Life's tough that way sometimes. Turns out that he's probably okay, according to another reader who assured us that the Jotan is indeed a Trident relative.

Is it insensitive to send us the same text as both plaintext and HTML? No, usually it just means someone didn't know how to turn off this "feature" (cough cough. cough. no, I'm okay. cough cough. water. Ahem) in MS Outlook. Try this great answer from Chris G. in last month's Answer Gang:

http://www.linuxgazette.com/issue65/tag/8.html

Lastly, I'm pretty sure it's insensitive to publish this, but Joe, you mailed us, and this is what we normally do with letters to the editors. Let us know when you have a linux question, and we'll try to answer it -- if you give us enough information!


Linux jobs

Wed, Apr 11, 2001 12:17:14PM -0500
Stuart (stuart-5757 from hushmail.com)

Would it be possible for someone at your publication to provide me with a resource as to where I could locate an experienced Linux programmer for the Tampa Florida area. Is there a website for Linux job postings or a publication that I might be able to contact. I would appreciate any help that you could give me.

The Answer Gang published a list of sites for job searchers in the last issue. I'm sure you can post openings at these sites as well.
http://www.linuxgazette.com/issue65/lg_answer65.html#tag/greeting
LG does not publish job listings because they are so temporary in nature: the job may be filled by the time the issue is published!
-- Mike

To repeat from last time:

You can check out Linux Journal's Career Center (http://www.linuxjournal.com/employ), Geekfinder (http://www.geekfinder.com), the Sysadmin's Guild (SAGE) Job Center (http://www.usenix.org/sage/jobs/sage-jobs.html), or pay attention to your local area papers for when major high tech Job Fairs are in your area, so you can go to them. There are also some really generic job sites like Dice.Com (http://www.dice.com) or MonsterBoard (http://www.monsterboard.com). If you hate the corporate mold, check out some of the project offers at Cosource (http://www.cosource.com) or Collab.Net (http://www.collab.net). Or put up your consulting shingle by listing yourself at Linuxports (http://www.linuxports.com) and getting listed into a few search engines.

... and expand a little:

When I went to Google! and typed in the keywords:
linux jobs
-- it claimed it has about 400 entries.

As Mike noted, many of these allow employers to post job offers, as well as having jobseekers post resumés.
-- Heather

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


News Bytes

Contents:

Selected and formatted by Michael Conry and Mike Orr

Submitters, send your News Bytes items in PLAIN TEXT format. Other formats may be rejected without reading. You have been warned! A one- or two-paragraph summary plus URL gets you a better announcement than an entire press release.


Distro News


 Debian

Debian Potato users out there itching to get their hands on the new 2.4 kernels may be interested in these links. Linux Weekly News have posted the Debian-News message of Apr 16, which has advice on getting kernel 2.4 working on you 2.2 potato install. The instructions should be read carefully before upgrading.
In other Debian news, The third revision of Debian GNU/Linux 2.2 (nickname `potato') has been released. This point release, version 2.2r3, mostly includes security updates, along with a few corrections to important bugs in the stable distribution. The details are online.


 Mandrake

Linux-Mandrake 8.0 has been released. New features can be studied in detail on their website. Highlights include KDE 2.1.1, GNOME 1.4, Kernel 2.4.3, Xfree86 4.0.3, and Anti-aliasing. If you would like to donate to the project, go to http://www.linux-mandrake.com/donations/


 Progeny

Progeny Debian is out now. The download edition is already available, and the box set will be on sale from April 23. Ian Murdock, Progeny CEO and President, has said that Progeny Debian is not trying to be another distribution of Linux. "In fact, we don't see Progeny Debian as a separate distribution. It is an enhanced version of Debian for the commercial market. All of our development efforts are being contributed back to the Debian community, and we hope that our work can help make Debian better for all users", he comments.


 Red Hat

Red Hat have announced Red Hat Linux 7.1 with 2.4 kernel. The Red Hat website has a complete list of the new features.


 Slackware

Linux Weekly News have a story on Slackware's difficulties. Apparently, Wind River have laid off the Slackware development staff. Patrick Volkerding, who is also laid off, says that he has sufficient funds to publish the next edition of Slackware, but not enough to pay developers for their input. This was a big topic of conversation on the Slackware forum (might break Netscape).

If you want to see Slackware continue, you can donate to the project via their PayPal account. Donate to paypal@slackware.com


 SuSE

SuSE Linux have announced the release of SuSE Linux 7.1 for the Sparc architecture of Sun Microsystems. SuSE Linux 7.1 for Sparc comes with the proven Linux Kernel 2.2.18 as well as the latest Kernel 2.4.2 as a special bonus for technophile users. SuSE Linux 7.1 is based on the program library glibc 2.2. The popular SBUS graphics cards are supported by XFree86 4.0.2. Application support for LFS (Large File Support) and IPv6 (Internet Protocol Version 6) has grown.

SuSE Linux 7.1 for Sparc (Item No. 99985-21SPC) is supplied on five CD-ROMs with online documentation. It can be obtained exclusively directly from SuSE at the price of EUR 159 plus VAT. SuSE Linux 7.1 for Sparc is also available for download from ftp://ftp.suse.com/pub/suse/sparc/suse-sparc/


News in General


 Upcoming conferences and events

Listings courtesy Linux Journal. See LJ's Events page for the latest goings-on.

Linux for Industrial Applications
3rd Braunschweiger Linux-Tage
May 4-6, 2001
Braunschweig, Germany
http://braunschweiger.linuxtage.de/industrie/

Linux@Work Europe 2001
May 8 - June 15, 2001
Various Locations
http://www.ltt.de/linux_at_work.2001

Linux Expo, São Paulo
May 9-10, 2001
São Paulo, Brazil
http://www.linux-expo.com

SANS 2001
May 13-20, 2001
Baltimore, MD
http://www.sans.org/SANS2001.htm

7th Annual Applied Computing Conference
May 14-17, 2001
Santa Clara, CA
http://www.annatechnology.com/annatech/HomeConf2.asp

Linux Expo, China
May 15-18, 2001
Shanghai, China
http://www.linux-expo.com

SITI International Information Technologies Week
OpenWorld Expo 2001
May 22-25, 2001
Montréal, Canada
http://www.mediapublik.com/en/

Strictly e-Business Solutions Expo
May 23-24, 2001
Minneapolis, MN
http://www.strictlyebusinessexpo.com

Linux Expo, Milan
June 6-7, 2001
Milan, Italy
http://www.linux-expo.com

Linux Expo Montréal
June 13-14, 2001
Montréal, Canada
http://www.linuxexpomontreal.com/EN/home/

Open Source Handhelds Summit
June 18-19, 2001
Austin, TX
http://osdn.com/conferences/handhelds/

USENIX Annual Technical Conference
June 25-30, 2001
Boston, MA
http://www.usenix.org/events/usenix01

PC Expo
June 26-29, 2001
New York, NY
www.pcexpo.com

Internet World Summer
July 10-12, 2001
Chicago, IL
http://www.internetworld.com

O'Reilly Open Source Convention
July 23-27, 2001
San Diego, CA
http://conferences.oreilly.com

10th USENIX Security Symposium
August 13-17, 2001
Washington, D.C.
http://www.usenix.org/events/sec01/

HunTEC Technology Expo & Conference
Hosted by Hunstville IEEE
August 17-18, 2001
Huntsville, AL
URL unkown at present

Computerfest
August 25-26, 2001
Dayton, OH
http://www.computerfest.com

LinuxWorld Conference & Expo
August 27-30, 2001
San Francisco, CA
http://www.linuxworldexpo.com

The O'Reilly Peer-to-Peer Conference
September 17-20, 2001
Washington, DC
http://conferences.oreilly.com/p2p/call_fall.html

Linux Lunacy
Co-Produced by Linux Journal and Geek Cruises

Send a Friend LJ and Enter to Win a Cruise!
October 21-28, 2001
Eastern Caribbean
http://www.geekcruises.com

LinuxWorld Conference & Expo
October 30 - November 1, 2001
Frankfurt, Germany
http://www.linuxworldexpo.de/linuxworldexpo/index.html

5th Annual Linux Showcase & Conference
November 6-10, 2001
Oakland, CA
http://www.linuxshowcase.org/

Strictly e-Business Solutions Expo
November 7-8, 2001
Houston, TX
http://www.strictlyebusinessexpo.com

LINUX Business Expo
Co-located with COMDEX
November 12-16, 2001
Las Vegas, NV
http://www.linuxbusinessexpo.com

15th Systems Administration Conference/LISA 2001
December 2-7, 2001
San Diego, CA
http://www.usenix.org/events/lisa2001


 Newlix ServerWare

Newlix Corporation has developed an intelligent and customisable administration solution for Linux based server appliances. Newlix ServerWare contains an intelligent administration engine so intuitive that it creators say "it can be seen as having an entire IT team sucked right into the server appliance!" This technology is intended to improve the functionality and ease of use of server appliances. Full details are available on the Newlix website.


 eCluster Internet Server Clustering

eCluster from XGforce is a scalable, Intelligent load-balance cluster system, which can be scaled up to 1024 Internet cluster groups and each contains 1024 cluster nodes(1024X1024). With round trip time load balance algorithm, one can cluster any OSes on any CPUs, such as NT, Novell, UNIXes (SUN SPARC, OS2000 BSD, Linux), etc. The support of load balance or fail safe mode, ensured non-stoppable and fast business transactions for SQL Database Servers, such as Oracle, MS SQL, Informix, MySQL, Postgress, etc.

A load balance algorithm is used which includes CPU load, weighted load, vm usage, round trip time, CPU usage, etc. Other features include Network Traffic Distribution, Network Failsafe, CFS(tm), and Large Network Management for both Internet and Intranet. Ports for LINUX, SUN, FreeBSD, and NT are available and free support is provided. For more information, consult the XGforce website.


 ActiveState Launches ASPN Initiative

ActiveState has launched a new initiative to enable programming with open source technologies. The ActiveState Programmer Network (ASPN) includes quality assured binary distributions of Perl, Python and Tcl; multi-language and platform IDEs; technical references, sample code, recipes and more. For additional details or go to the ASPN website.


 OTG Software

OTG Software has announced its acquisition of Smart Storage, a privately held provider of standards based DVD and CD storage management software. OTG expects Smart Storage's CD/DVD technology to speed its entry into the rich media market, to boost its international momentum, and to enable it to offer more solutions for storing and accessing data on the UNIX and Linux platforms.


OTG, has also announced its participation and strategic partnership in BMC Software's Application-Centric Storage Management Consortium ( ACSM), a partner program that provides a competitive edge and additional avenues to members for market development, customer services and market expansion.


 Linux Fortran

Many of us involved in scientific computing make considerable use of Fortran, either for writing our own code, or for the many libraries which have been written in the language. Dr. Bronson Messer of the University of Tennessee has recommended http://studbolt.physast.uga.edu/templon/fortran.html as a good source of information relating to Linux and Fortran. It has comparisons of various compilers, news, tips, etc.


 Linux Focus

Here are the May-June articles for the ezine Linux Focus.


 Linux Links

There is a vulnerability in kernel 2.4.x IPTables which you should patch if you use Linux 2.4 for firewalling. Quoting from the SANS Institute's alert: "A vulnerability in the ip_conntrack_ftp module, which is responsible for tracking incoming FTP connections, has been found. This vulnerability could be used to bypass IPTables firewall rules if IPTables is configured to allow RELATED connections to pass unhindered, which is a standard configuration used with FTP servers. An attacker can trick the ip_conntrack_ftp module into creating RELATED connections, thus allowing various outbound connections to the network of the firewall itself." A patch is available.

The Duke of URL has the following links to tempt you:

Since the point of FAQ's is to get newbies up to speed, let's take this opportunity to direct attention to The linux-kernel mailing list FAQ. Then when you have digested that, you can see what's happening on-list.

SlashDot has offered the following links in the past month:

Suresh Ramasubramanian mailed a link to an article he has prepared, providing a HOWTO on configuring a linux box dialup connection, complete with configuring email services (using sendmail, exim and postfix as the MTA and mutt as the MUA) on the box. You might find this useful.

Bryan Pfaffenberger writes about Why Open Content Matters in his Linux Journal web column " Currents".

And please, some paper-clip sized sympathy for The Microsoft Office help clip who became the latest (and most welcome ;-) redundancy in the tech-sector recently.

Finally, not strictly Linux, but UnixSpace.com have announced a free on-line internet access service to their ConteXt database server. Includes 30Mb space, Unix shell command line, and some GUI treats focused on DataBase building.


Software Announcements


 SSH

Open SSH have announced the release of version 2.5.2 of their software. The Open SSH suite includes the ssh program which replaces rlogin and telnet, scp which replaces rcp, and sftp which replaces ftp. Also included is sshd which is the server side of the package, and the other basic utilities like ssh-add, ssh-agent, ssh-keygen and sftp-server. OpenSSH supports SSH protocol versions 1.3, 1.5, and 2.0. You cannot afford to ignore security!


 PostgreSQL 7.1 version announced

The PostgreSQL open source database core development community have announced the official release of the PostgreSQL 7.1 version. Check their news page for more information. PostgreSQL 7.1 will feature several upgrades and improvement from the previous version, including: PostgreSQL version 7.1 includes contributions from more than 120 members of the PostgreSQL open source development community.


 Python

Python 2.1 has been released. Find out what's new, and read the full release notes.


 Cylant IDS for Linux: prevents unknown attacks too

Cylant Technology have released CylantSecure for Linux, an intrusion detection system that protects against both known and previously unknown forms of attack. It uses a modified kernel in conjunction with custom kernel modules to provide system protection -- and becomes part of the running kernel. Unlike other IDS products, CylantSecure does not use rules or patterns for identifying attacks, eliminating the need to rely on a database of known attack signatures. Instead, it focuses on actual software behaviour and builds a statistical model of nominal system behaviour. It enables a computer to distinguish between normal and abnormal behaviour, and then uses that information to stop malicious attacks before any damage can occur. Details on the software are in an online press release.


 ICS Integrates Themes Into Open Motif

Integrated Computer Solutions has announced the Developer's Release of its initiative to add themes to Open Motif. Themes is a capability supplied with Linux desktop environments that provides users with the ability to personalise the overall look of the user interface of their desktop. The Developer Release of Themes for Open Motif works with GTK themes created for Gnome. Currently, themes are converted by hand into a format that Open Motif can process. As the Open Motif Themes capability evolves, no conversion will be necessary and Open Motif based applications will automatically adopt the theme set by the end user. The objective of the initiative is to support both the Gnome and KDE desktop environments. ICS is actively looking to recruit other Open Source developers to help with this project. Further details can be found at the ICS forum website.


 Internet Exchange Messaging Server 5

Messaging software developer International Messaging Associates have launched the beta version of its latest product, Internet Exchange Messaging Server 5 (IEMS 5). IEMS 5 supports distributed computing environments and is said to run well on mixed Linux and Windows platforms. "Currently, we are working on providing support for several Linux distributions," said Tim Kehres, IMA Managing Director. These Linux distributions include RedHat, SuSE, VALinux, Turbo Linux, Caldera, Mandrake, among others. This product enables users to access their mailboxes via POP3 or IMAP4-capable clients such as Microsoft Outlook, Netscape Navigator, Eudora Mail, as well as the Internet Exchange Web Mail Client.

You can get a copy of IEMS 5 at http://www.ima.com/download/v5eval.html. The product overview can, also be downloaded. Beta participants of the Linux-Windows-based Internet Exchange Messaging Server (IEMS) 5 shall get a US$300 price reduction (about 30% off) if they purchase the messaging solution now than wait for its forthcoming official release.


 Other software

Better Access Networking in Leuven is Teamware's new reselling partner for Teamware Office 5.3 for Linux in Belgium. Teamware Office for Linux completes Better Access' product offering by bringing e-mail, calendar and document management functionalities to Linux. Teamware have also made a partner agreement with Coresys AB in Sweden. For latest news, check out the Teamware newsletter.

The new version of Mailman, 2.0.4, compatible with Python 2.1, is out. LWN have the story.


Insignia sponsored a technical interest forum at the recent Embedded Systems Conference. The subsequent detailed press release is wide-ranging and available online.


Copyright © 2001, Michael Conry and the Editors of Linux Gazette.
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 66 of Linux Gazette, May 2001


(?) The Answer Gang (!)


By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, and the Gang, the Editors of Linux Gazette... and You!
Send questions (or interesting answers) to linux-questions-only@ssc.com

There is no guarantee that your questions here will ever be answered. You can be published anonymously - just let us know!


Contents:

¶: Greetings From Heather Stern
(?)help installing telnetd
(?)touch files recursively linux mandrake 7.2
(?)Winprinters
(?)your mail --or--
Search and Replace Without Breaking Permissions
(?)your mail --or--
Kernel Panic after putting disk back
(?)Procmail and regular expressions....(Snowwhite...)
(?)Need to milk you again --or--
Timely Samba Release?
(?)3d linux
(?)linux vectoring synergy
(?)Why linux for routing
(?)disappearing act
(?)getting 2 dynamic ip addresses

(¶) Greetings from Heather Stern

Once again, welcome to the wonderful world of The Answer Gang. The peeve of the month this time is a tie:

We could probably use a few more articles that appeal to corporate users, though! Enough of that, though. Onward to something fun. The fun I took on this month is to upgrade my system.

Oh boy.

Surely I mentioned that I've been on a continuous upgrade path of SuSE since early 5.1? No? Well, okay, I admit, I did a "real" reinstall sometime around 6.1 or so, and then have chugged along on security updates and adding RPMs from the latest 6.x branch for a while. With an occasional graft from Debian packages and source tarballs.

Like any normal user I also have lots of different things I do, so my home directory's a bit messy, I have a few projects here and there, and I haven't been real prissy about which account I use to download general things like cartoons (Hi Shane!) or new kernel sources into. Usually I remember to move them to someplace under /usr/src eventually.

As Piglet was fond of saying, "Whatta... whatta mess."

Surely it would have been easier for me if I hadn't decided to buy an extra hard disk at the same time, discovered that my floppy bay stopped working (p.s. can't boot from my CD. Something to do with it being a SCSI device in an IDE system), and (eek!) was reminded that we'd like to get the column fragments in early this month.

Of course, I was able to abuse about a CD's worth of free disk space to cover for this. I made the extra hard disk a feature rather than more trouble by installing the new setup solely to it.

The install went fine, but it wasn't completely smooth. Here's a few hints if you're plotting an upgrade, and I promise, they don't depend on you using SuSE:

Beyond these normal things, I really needed to get some of these projects into directories of their own, so it's clear where I should put stuff for those things from now on. Rather like ordering the teenager to clean up their room...

Next thing I know the end of the month is approaching, and my dreams of handling TAG at a dreamy summertime pace are dashed again :)

I still think backups are your friend, but at least I didn't need 'em this time. All I need is more RAM and I'm set! The weather is improving and I'm having a great time. So here's those answers -- share and enjoy.


(?) help installing telnetd

From dtrott

Answered By Ben Okopnik

Hi
I have recently installed debian 2.2, i was just wonderin if someone had a link or could suggest where i might find some basic instructions on setting up telnetd.

(!) [Ben] <Warning! Opinion time!> I can give you a one-word instruction manual:
Don't.
Telnet is insecure, and its capabilities are seriously limited by comparison with SSH. Install ssh/sshd, and create an executable file in your /etc/init.d/ directory called "sshd" with the following content:

See attached sshd init script

Now, create a symlink in your /etc/rc2.d/:
ln -s /etc/init.d/sshd /etc/rc2.d/S20sshd
The "S20" part says to 'S'tart the service (rather than 'K'illing it); the '20' places it (on my system, at least - take a look at your own "rc2.d" and number it appropriately) just after the link to "inetd". The position of the link is not all that critical; next to "inetd" (which starts other network services) seems appropriate, though. If you want to run the server immediately after doing this, but don't want to reboot, simply type
sshd
at the command prompt.
That's it. Just type 'ssh' where you would usually type 'telnet'. Oh, and make sure to at least skim the 'ssh' and 'sshd' man pages; this will make you aware of the many options that are available with this protocol.
I have not researched SSH in great depth, by the way; "kill telnet" is sorta common wisdom at this point, and I've read just enough to agree with it. After using telnet for a number of years, I find that I'm very pleased by the configurability of SSH; that alone, security aspects aside, made it worth switching for me. It would be nice if the other TAG members chimed in with their take on the proper usage and better reasons, but I'm highly satisfied with my installation.

(?) touch files recursively linux mandrake 7.2

From Martin Colello

Answered By Ben Okopnik

This is probably so easy as to be considered a joke, but I can't figure out how to do it.

I need to touch a bunch of directories recursively. All the directories and their contents, but I can't find any option in the touch command that allows this.

Any help appreciated, thanks!

(!) [Ben] I've never seen a 'recurse' option in any "touch" I've used. Doesn't mean that one doesn't exist, though. Since yours doesn't, try this:
find DIR -exec touch {} \;
where DIR is either the path to the top directory that contains all the subdirectories you want to touch, OR is a list of the paths to those subdirectories themselves. One of those two options should do what you want. If you want to touch only the files (not the directories), add the '-type f' option before '-exec'.
It can also be a healthy idea to try it with "echo" instead of "touch" the first time; I test a lot of my "dangerous" scripts that way before letting them loose on live data.
(!) [Mike] Or:
find DIR | xargs touch

(?) Hi, just wanted to let you know the command worked great, I never thought of using any other argument with find except -name.

(!) [Ben] "find" is a very cool utility. The man page is pretty big, but it's well worth reading up on. Lots and lots of good options.

(?) Linux Gazette rocks, thanks a lot for your help.

(!) [Ben] Yeah, we know. :)
You're welcome!

(?) Just out of curiosity, the reason I needed to touch everything was because my anonymous ftp server wouldn't show certain files even though the permissions were the same as others that worked. But I found if I touched one then it showed up. Now they all show up thanks to you, by why should this have happened in the first place?

(!) [Ben] I haven't experienced any problems with setting up FTP servers, so I can't really comment.
(!) [Heather] Readers, if you think you know what it might have been, let us know. You can reach The Answer Gang as linux-questions-only@ssc.com.

(?) Winprinters

From jzaragoza alberich

Answered By Mike Orr, Heather Stern

I know what a winmodem is. I know too that they must be thrown off. All of them. But what is a winprinter? How can they be recognized? Must they be thrown off too? Or do they work under Linux?

(!) [Mike] Beware of any hardware that lists only Windows operating systems on the box. If it says "Windows and Macintosh", there's a good chance it will work with Linux too. But if it lists only Windows 95/98/2000, NT and Me, be suspicious. It could be like a Winmodem, where vital parts of the modem functionality are missing in the modem and must be emulated by the driver. or it could mean there's Windows-specific code in the printer. For instance, instead of using a standard page-description language like PCL or Postscript, the printer may be tied to the Windows printing system directly (e.g., it may communicate with the computer via Windows API calls).
(!) [Heather] A winprinter (like a winmodem) does not have complete printer brains. It uses WIndows GDI calls to preprocess a buffer with the printable image and then just accepts it straight. If I read the original description right. Anyways like a winmodem it rally hits CPU when trying to get work done.
Under Windows that means the driver is really tiny, since GDI is part of the default DLLs that make the rest of the GUI work.
Under Linux that means if it's a Lexmark you can convince it to work, and if it's something else, you could try the Lexmark winprinter drivers ... and if they don't work, oh well, give that to someone who only uses windows and needs a cheap printer.
Under a debian system you can use the package lexmark7000linux. For others you should try Henryk Paluch's website: http://bimbo.fjfi.cvut.cz/~paluch/l7kdriver
(!) [Mike] Combined printer/fax/copier/scanners should especially be avoided unless you know that model works with Linux.
(!) [Heather] It turns out there's a really great site that keeps track of all sorts of things about printing under linux. Wouldn't you guess, it's: http://www.linuxprinting.org

(?) Thank you very much. You are very kind. Of course it will be an honor to get into your magazine. Perhaps would you find it interesting to talk about other "winsoftware": scanners, digital photography devices, joysticks, etc.


(?) Search and Replace Without Breaking Permissions

From Peagler Kelley

Answered By Ben Okopnik

Hi,

I am doing a global search and replace on some files via a unix script. I use the sed command (saving a copy of the original in $file.old) like so:

sed "s/$INPUT_TXT/$OUTPUT_TXT/g" $file > $NEW_FILE

Then I perform a diff on the original file ($file) and the new file ($NEW_FILE) and redirect the output to /dev/null. If there is a difference between the two files, then I move the new file to the old file. Unfortunately I end up changing the permissions on all the files in the directory, depending on whatever default umask is set. Is there a way that I can either 1) find out what the permissions of the original file are and change them accordingly to the new file, or 2) move the new file to the original file while keeping the permissions of the old file?? Please let me know. Thanks!!

(!) [Ben] "sed" is not the best tool for "in-place editing" of the kind you want to do - all you really want is to change the data in the file, right? Perl offers a solution that reduces it from a three-step process (change/diff/move) to one:

perl -i -wpe 's/$INPUT_TXT/$OUTPUT_TXT/g' $file
That's it. The editing is done in the file itself; the permissions are unchanged. No muss, no fuss, no greasy aftertaste.

(?) I agree with you. I wanted to use perl, but the person who I'm creating this for does not know perl and will be responsible for supporting it. I like your quick, dirty solution and I may force them to use it just because it's easier ;-). Thanks!


(?) Kernel Panic after putting disk back

From hma

Answered By Heather Stern

Hi,

I like to thank u guys for great job. Am still going thru your past issues. I have sent 2 questions here and I have not heard anything from u guys.. is my pattern wrong?

(!) [Heather] 1. We can't reply to every message. There are hundreds and hundreds of them every month. That you received no reply before is not a personal slight. We will never get to all of them. Just continue to look for whether someone else's answers apply to your questions too.
2. You had no subject this time - that usually doesn't help. For good behavior patterns that help your message get seen, see the TAG entry "Creed of the Querent" a few issues ago: http://www.linuxgazette.com/issue62/tag/5.html

(?) I still have the following problem and I hope U can help now...The problem am having is that when I boot to my linux I recieve the following message: " Vfs: Kernel panic" and that it. It doesn't go.

(!) [Heather] This message means the kernel loaded, then could not find what it's looking for next. VFS means virtual file system - that's what really manages all of Linux' filesystem drivers - it probably can't find the root fs. Although usually if that's the problem it says so. Odd.

(?) When I try doing fsck, I get command not found.

(!) [Heather] You're doing fsck from where? fsck is a linux utility, so you need to come up from a linux rescue disk of some sort. Toms Root Boot perhaps - handy because you can download and create one using DOS if you have to: http://www.toms.net/rb
There are Windows utilities for accessing ext2 volumes, but they won't directly help you get back into Linux, and I don't know of a Windows based ext2 analogue to Scandisk.

(?) The problem started when I remove one of my harddisk and after puting it back, I got this problem. But I get into win when I select it.

(!) [Heather] When you select Win from what? Have you replaced LILO with something else? (LILO doesn't normally have a selector, it makes you type things. Of course you could have Storm Linux, which replaced the boot: prompt with a cool selector screen.) Did you move any partitions before you put the drive back? Is the drive now your second drive?
To fix LILO:
  1. Boot from that rescue disk
  2. mount up the / volume on some empty directory ... /mnt would do nicely ... don't forget to tell it to use ext2, example:
    mount -t ext2 /dev/hda5 /mnt
  3. cd into the mountpoint and run chroot
  4. edit your /etc/lilo.conf so it mentions your new volumes... and points at the right volume as your root partition now! For example, if it's now the second drive, than all your references to /dev/hda have to refer to /dev/hdb, except for "boot" (which says where to put the LILO first stage)
  5. (If it has become the second drive) you'll also want to edit /etc/fstab, since all its drive references are off, too. Otherwise you'll get a failure in the next stage when Linux really spins up.
  6. Run /sbin/lilo to put your bootloader back together. Or else fix your new bootloader so it passes good options to your linux kernel - I think NT needs a copy of a (correct) LILO bootsector for its mechanism, in a tiny little file.
    In short, LILO hates it when you move stuff around. Sorry.

(?) I hope u reply now.

(!) [Heather] My inbox load today was light and I'm in a crossplatform mood, so you got lucky. Usually I leave LILO matters for the rest of the Gang.

(?) Thanks.
Hassan

(!) [Heather] Have a happier day

... I merged answers about his chroot troubles into the steps above ...

(?) Once again, thanx and keep up the good work...some day when I become a guru, I hope to help too... :-)

Hassan

(!) [Heather] When you feel ready, I'm pretty sure the Gang will still be here to welcome you aboard!

(?) Procmail and regular expressions....(Snowwhite...)

From Andrew Higgs

Answered By Ben Okopnik, Mike Orr, Faber Fedor

(?) Hi all,

While on the subject....any suggestions on a good place to find out about regular expressions and procmail.

I collect mail from one ISP mailbox and send it on to the correct user based on email address. I also have a problem with people who use mailing list groups in Outlook etc. How do I split these properly?

Any pointers gratiously accepted.

(!) [Ben] "procmail" uses extended regexes, much the same as "egrep". So, for some good examples and broad-scope explanations of those, try
man procmailex
man procmailrc
man grep         # The "REGULAR EXPRESSIONS" section is a great reference
man regex        # Somewhat different "flavor", but useful
For single address to multiple local user resolution, read the "Email Addressing FAQ (How to use user+box@host addresses)" at www.faqs.org/faqs/mail/addressing/ - as it happens, I just ran into this thing yesterday, and was much impressed with the logical style and layout of it. Even if this is not exactly what you're doing, there are a number of relevant useful techniques described in this document - and it's mostly based on doing it with "procmail".
(!) [Mike] Ben! You even wrote the article about procmail antispam filtering and you didn't mention it. :) Just in case Andrew hasn't seen it:
http://www.linuxgazette.com/issue62/okopnik.html
(!) [Faber] Let me through out this little tidbit:
If you use the \< and \> word boundary markers in procmail, keep in mind that they consume (eat) the word boundary. Every other program I've used the word boundary markers on did not eat them.
Makes a BIG difference when your grepping your text (and took me an hour to figure out!).
Regards,
Faber Fedor

(?) Timely Samba Release?

From Andrew

Answered By Andrew Higgs, Jim Dennis

Hello,

I swear that the hardest thing to setup under Linux (at least for me ) has been samba. Running Linux RedHat 6.1 & have a windows 98 se machine. I see the Linux machine when i go into Network Neighbourhood & when i click on it i get the password box but it ALWAYS fails. The message i am getting at the moment is this

 [2001/04/08 04:02:05, 0] smbd/server.c:sig_hup(340)
   Got SIGHUP
 [2001/04/09 00:18:04, 0] smbd/password.c:domain_client_validate(1213)
   domain_client_validate: no challenge done - password failed
 [2001/04/09 00:18:05, 0] smbd/password.c:domain_client_validate(1213)
   domain_client_validate: no challenge done - password failed
 [2001/04/09 00:18:09, 0] smbd/password.c:domain_client_validate(1213)
   domain_client_validate: no challenge done - password failed
 [2001/04/09 00:18:10, 0] smbd/password.c:domain_client_validate(1213)
   domain_client_validate: no challenge done - password failed

What i would truley like is to setup Linux as a domain controller so when booting the windows machine validation is done via the Linux machine by verifying against the password file or smbpasswd file & so then u have access to shares at that point. Does it have to be WinNT to get this to work. I know their is the issue with encrypted passwords. Currently my Linux machine is set to yes Regards...

Andrew

(!) [Andrew Higgs] Hi Andrew,
It is very possible to have Win 95 and 98 logon to a Samba domain. I assume you have read the relevant docs which come with Samba.
Have you added a Samba user to correspond with the one (your windows username) you are trying to use. It seems to me that it is failing because the username (and consequently the password) is not there. Try 'smbpasswd -a username' also 'man smbpasswd' for further details. Also bear in mind that Win 95 (and I assume 98) don't let you specify a username when trying to login to the Samba server, they just use your windows username.
I hope this is sorts out your problem.
Kind regards
Andrew Higgs
(!) [JimD] I was just reading about the Samba 2.2.0 release at http://www.samba.org/samba/samba.html. The Samba team is continuing to strive towards full domain controller and "MS Active Directory" functionality. You should look at the new release and read every shred of documentation. Linux/Samba as a domain controller is still cutting edge (sometimes brushing against the cutting edge leaves us dripping a bit of blood).
You'll especially want to read the PDC HOWTO documentation at your nearest mirror of the Samba web site: http://www.samba.org Just follow the "Documentation" link and look for the FAQs and HOWTOs under the "New PDC Documentation" heading.
There are Samba mailing lists and discussion of Samba predominates the discussion on the news:comp.protocols.smb newsgroup. If you have a connection to a good NNTP server you can post your questions to a forum where hundreds of Samba users and specialists can see it.
Also, no tech support suggestions for Samba would be complete if we didn't point you to the Samba DIAGNOSIS guide. You can see that at: http://WWW.samba.org/samba/docs/DIAGNOSIS.html (where WWW can be www or the names of one of the many samba mirrors).

(?) 3d linux

From Philippe CABAL

Answered By Michael J. Hammel

hi

(!) [The Graphics Muse] Howdy.

(?) i am looking for a free multiplateform (win32 + unix) 3d modeling / rendering / animating software all i found is povray and blender

(!) [The Graphics Muse] That's about it.

(?) but id like a software as open as pov (data souces) as intuitive as a blender

(!) [The Graphics Muse] No such beast.

(?) actually i am a proggramer so i need to have a look at the scene-source isnt there a vrml stuff that do broadcast output ?

(!) [The Graphics Muse] Nope. You have a few choices, but nothing that fits all your desires here.
If you want VRML, you can try SCED or SCEDA. Both have pretty primitive interfaces, but are fairly sophisticated underneath. They include a constraint-based mechanism. The source is available. They are the only ones I know of that produce VRML output.
Outside of these two, all the other tools do not provide source: Blender, Houdini, Maya, etc. Blender is by far the least expensive but the most sophisticated for the money. Houdini and Maya are high end, high dollar products. POVRay is just a rendering engine, not an interactive modelling tool. A better option for rendering is probably BMRT, the Blue Moon Rendering Tools, which is a Renderman compliant renderer. It was actually used for several movies. However, like POVRay, it is just a rendering engine, not an interactive modeller.
Nothing is available on Linux for free and with source provided that can do broadcast output. You have to string together a few different tools in order to do that - for example Blender for modelling, something else to convert Blender files to RIB files (it doesn't do RIB yet), and then BMRT for rendering.
Blender is really the best thing going in this department, since you can add scripting to it fairly well using Python. It's interface is production quality. It just doesn't export to formats that can be used by other rendering engines, like RIB for PRMan (Pixar's rendering engine) or BMRT.
As for cross platform, give it up. Blender I think is cross platform. POVRay doesn't much care where it's ported to and I believe BMRT has been ported to Windows (much to the consternation of the original author, no doubt). But cross platform graphics tools are pretty difficult to do since such tools are often very happy close to the hardware, and getting close to the hardware on different OS's is not quite so easy a proposition.
Hope that helps.

(?) linux vectoring synergy

From darrell rolstone

Answered By Ben Okopnik

(?) Dear Staff of the Answer Gang!

I hope you folks appreciate the occasional question from a non-techie....whose really into seeing and helping the information revolution FLOURISH!

I'm a 52 year old "synergy design consultant" from Marin County California....living in Thailand for the last 6 plus years. I was a pioneer in the Wholistic Health movement of the 70's and a student of R.Buckminister Fuller. I'm a world class Nordic Physical Therapist.....and I have trouble with even the simplest technological things like copying something onto a disk! REALLY!

(!) [Ben] <laugh> The two are not necessarily related... but say on.

(?) But inspite of nearly total techno ignorance.....I'm quite skilled in the social aspects of the techno evolution/revolution! And I sincerely want to help that process along it's path.

So, my question('s) to you guru's of "geekness"....just what is being done in the area of co-ordinating all the linux "programing development" that is manifesting? Is there a "co-operative" formed? Can a (traditionally "left-brained" dominant) programer offer up his/her work to a linux "group of (traditionally right-brained dominant)marketers" that will then take over and bring his/her work to fruition?! (thereby "sharing the knowledge" at a higher level of efficiency).

If there is such a "group"......can you direct me to them? Praises upon you all for sharing your knowledge! Really!

(!) [Ben] Well, Darrell... that's a heck of a question to ask of a bunch of traditionally left-brained computer types. <smile> Actually, if you're a student of revolutionary processes, you may find Linux very interesting for just that reason.
The Linux kernel itself - as wonderful of a thing as it is - is not (from my perspective) the thing that is responsible for the popularity and the tremendous growth of Linux. What is responsible for it is the Linux/Open Source model - that of people working on their own, or with a team, and getting full recognition for their work. The traditional hurdle of marketing a product is largely eliminated, since the greatest majority of the programs for Linux are free; the "distribution channel" - the Internet - is also mostly free (the costs are not assignable to Linux, so it is free in this regard.) In those terms, the marketing model for Linux and its software is not the traditional "push" - we have no need to stuff it down the gullets of barely willing customers - it is "pull": when people need a piece of software, they research it, download it, and install it. As well, the "feedback loop" that is usually set up between the programmer and the interested users of the program is a tremendously powerful tool: if fifty thousand people have pounded on your program for a few months, and the flow of bug reports has finally ground to a halt, either that program is as perfect as code can be, or it has simply been cowed into submission. :)
The effect of this is exactly what Robert Pirsig talked about in his "Zen and the Art of Motorcycle Maintenance" (I would guess that you're familiar with the work) - a shift toward Quality being the focus. That, to me, is the most exciting thing about Linux: quality really is "Job #1".
As to co-operatives... well, have you ever tried herding cats? :) There are several things that have worked well in the Open Source community, usually by providing maximum assistance and convenience but minimum direction: any of the large-scale programming projects, such as WINE, Mozilla, the whole series of GNU projects, KDE, etc. There is also SourceForge, which provides an archive/code repository/distribution point for development efforts.
I'm not sure if this is any kind of an answer that you were looking for; mostly, these are just the ramblings of a right-brained guy who loves using his creativity in a left-brained way. <chuckle> I think that dichotomy was a no-starter, for me; never could see it...


(?) Why Linux for routing

From Ian Carr-de Avelon

Answered By Mike Orr

In LG#65 I read:
"Another thing this article does is raise the question, just because we can use Linux in a wide variety of routing situations, should we? Are you choosing a Linux router because it's the most appropriate solution for the task, or simply because "we're a Linux-only shop"? "

Well... What are the choices? Basicly:

  1. CISCO - expensive and involving commands which are unrelated to any other other task you do.
  2. Also ran dedicated routers - less expensive but an ever changing sea of this month's best offer leaving you with a different web based configuration on virtually every router you will buy and if an interface card blows, they don't make them any more. If the system ever gets hacked - they don't provide updates, it is obsolete.
  3. DOS based old PC - cheap but involving commands which are unrelated to any other other task you do. If an interface card blows, it is the same as every PC in your office and local PC store.
  4. Linux based old PC - cheap and allowing you to use the same shell, editor etc which you use for every other computing task (assuming you are Linux based). If an interface card blows, it is the same as every PC in your office and local PC store.

The Linux option has a lot going for it especially if you are an organisation which does not have a team only dedicated to routers, like large telcos do. Routing sits causing no problems for months, while you forget how to work on the router, and then when problems arrive it is panic stations, because nobody can work, clients are not being served and business is being lost. I run a Polish ISP with Linux and one CISCO router, which we bought because I was over ruled, because although the WAN card for Linux was cheaper, the CISCO dealer offered unbeatable financing. I don't see that changing soon.

Yours
Ian

(!) [Mike] You bring up some good points, but that does not invalidate the question. I'm not saying Linux *shouldn't* be used for routing, just that each organization needs to weigh the price-vs-performance-vs-maintainability factors for iteself. The situation I was thinking about (and perhaps it wasn't clear in the paragraph) was not a small, low-traffic network, for which Linux's price and maintainability certainly runs circles over proprietary systems, but rather an an enterprise-level, high-traffic situation. Is there an amount of thoroughput above which Linux routers are not (currently) scalable, a point at which Ciscos would be more economical? I don't know, but a netadmin in that situation would want to explore both options before making a decision.
My point is not so much about Linux vs Cisco, but about jumping on the Linux bandwagon too quickly. We all know hundreds of companies that refused to consider any alternatives to buying NT servers, WINS servers, Novell servers, etc. The same can happen in the Linux world, if one refuses to consider an alternative to a Linux router more because it's politically incorrect than because of an actual comparision of price, performance and maintainability and how they would all affect your organization in its situation.

(?) disappearing act

From eric lin

Answered By Ben Okopnik

Hello Answer Gang,

Let me start off by thanking all of you for providing such excellent service.

I'm running RedHat 6.2 with apache 1.3.9 and Sendmail 8.9.3 as an Internal web/mail server. I use it on a daily basis, but haven't changed any of the configurations since the initial install. Yet mysteriously the httpd.conf and the sendmail.conf files becomes null (file size of 0)!!! This occurs randomly and usually after a reboot of the system.

Since it is internal and no one uses it except for myself, I have no way of explaining why this is.

Do you guys have any ideas???

(!) [Ben] Wow. That's odd. Very odd. It sounds like maybe some sort of a config file backup procedure (?) gone wrong. One of the first things I'd do is switch to "/etc/init.d" and grep the scripts there for any mention of the above files. I'd investigate anything I found with a very sceptical eye, possibly looking for evidence of intrusion (I can see some script kiddie being very interested in those two files...) or just a badly-written script.
If you can't find anything, try setting the immutable attribute on those files via "chattr" (see the manpage); this should at least stop them from "disappearing". I, for one, would be very interested to know what you find out in your troubleshooting process.

(?) getting 2 dynamic ip addresses

From Christi Gell

Answered By Mike Orr

I have a DSL and I want to get 2 dynamic IP addresses w/it. I've got a hub, but every time my husband needs to get online, I need to release my IP address.

(!) [Mike] Your hub is connected directly to the DSL modem? In that case, you will have to contact your ISP to get a second dynamic address from them... if you can.
A more common scenario is to have one computer (the server) connected to the modem and also to the hub. The second computer is connected only to the hub. The first computer has IP firewalling and IP masquerading compiled into the kernel. (I assume you're running Linux, since you sent this to a Linux answer forum. If you're using Windows, you'll have to go somewhere else for help.) Then you enable IP masquerading on the server. Now the second computer can reach the Internet without needing a second dynamic IP from the ISP.
To set this up, search for "masquerading" or "masquerade" in the Linux Gazette search engine (www.linuxgazette.com/search.html). Or pick up a Linux configuration book from the bookstore or look in the manual that came with your distribution.

More 2¢ Tips!


Send Linux Tips and Tricks to gazette@ssc.com


Easy LG browsing 2 cent tip

Fri, 20 Apr 2001 20:31:35 +1000 (EST)
bandido (bandido from drinkordie.com)

This handy dandy function is courtasy of Cobratek on #Mandrake on Efnet, it is super kewl, since you can unpack all your LG issues (you do have all 65 don't you?) and instanty view any one.

Simply add this function to either ~/.bashrc or better yet /etc/bashrc so everyone on your system can read LG.

function lg () { lynx /home/bandido/docs/Linux.Gazette/$1/index.html ; }

Remember to change path to whatever you unpack your LG issues to, and do not use ~/ dirname of course if you put the function in /etc/bashrc :)

Personally I unpack all issues like this,


/home/bandido/doc/Linux.Gazette/1
/home/bandido/doc/Linux.Gazette/2

3 4 5
etc

Thus, I type lg 20 or lg 35 etc, to open 20 or 35 instanlty in lynx, and I am in prior dir when I exit. Nice and handy, never far away from LG :) Feel feel to drop by #Mandrake on Efnet too, unlike most linux channeols, newbies are very much welcome.


vim hot color swapping

Thu, 19 Apr 2001 07:37:04 -0700
Adam Monsen (meonkeys from hotmail.com)

Vim's syntax highlighting can be helpful at times at painful at other times. Add this to your .vimrc and you can turn colors on and off with the tap of a button.

  " map F8 to switch on and off syntax highlighting
  function Swapcolor()
    if exists("g:syntax_on")
      syntax off
      set nohlsearch
    else
      syntax on
      set hlsearch
    endif
  endfunction
  map <F8> :call Swapcolor()<CR>


linux version of dos commands

Sun, 01 Apr 2001 15:06:34 -0700
Steve Winston (xee from mediaone.net)

They start with letter "m." They look at a floppy disk as "a:" or "a:\" as Windoze does.
To copy one file to another, use "mcopy"
If you want to copy a file "myfile" from a: to your home directory, use this command:

mcopy a:\myfile /home

If you want to copy myfile from /home to a: use this command:

mcopy /home/myfile a

To check the contents of a file or directory, use mdir.
To check the contents of a:

mdir a:

Hope that helps a little bit,
stevew


Booting w/ CD-ROM

Tue, 17 Apr 2001 23:38:57 -0400
joseph.lalingo (joseph.lalingo from ablelink.org)
Tip from Daniel S. Washko

Hello,

How can I use CFDISK from my REDHAT CD-ROM as though it was from a hard drive linux installation?

If this is during the install process, I am pretty sure you could hit <ctrl><alt><f1-?> to switch to another terminal. Keep cycling through the keys until you find a free terminal. You should then be able to use cfdisk.

-- Daniel


dvi and Deskjet

Sat, 14 Apr 2001 09:55:53 -0400
C. Martinet (email from cmarti.net)
Tip from Ben Okopnik

Dear answer guy,

I would like to print a dvi file on an HP600 deskjet printer. Is it possible ? I've tried with the commands dvilj, dvilj2p, dvilj4 and dvil4l, but there are all for LaserJet printers. So I have some strange results.

Have you tried "dvihp"? It's supposed to convert DVIs to HP PCL (Printer Control Language.) Or, you could always just run "dvips" - it'll produce a PostScript file that you should be able to print without any problems.
-- Ben


how to find an i/o adress for an specific pci slot

Thu, 29 Mar 2001 09:35:37 -0800
Christer Olsen (christer.olsen from cegal.com)
Tip from Mike Orr

i need to find out the slot adress for my pci network card , how can i easily track down this

my network card is in slot 1 and i need to find out the adress (0x0081 or ???)

Does it say in the boot messages? Run "dmesg | less" to see your boot messages again. If you don't find the right information, please send us back a copy of your boot messages (in particular, the portions beginning with "PCI: " and anything that looks like it may be related to the network card).

Each PCI slot corresponds to a fixed address. Perhaps looking in include/linux/pci.h or drivers/pci/pci.c in the kernel source would help.
-- Mike


Pam.d questions

Tue, 3 Apr 2001 15:11:42 +1000
andrew (andrewkennedy from optusnet.com.au)
Tips from Faber Fedor, Ben Okopnik, and Heather Stern

Back for more of your knowledge

And we're still here dishing it out!

I have an authlog file & i keep seeing this info within it

Apr  3 11:31:58 echelon pam_limits[27640]: invalid line 'hard^Icore^I0'
Apr  3 11:31:58 echelon pam_limits[27640]: invalid line 'soft^Inproc^I100'
Apr  3 11:31:58 echelon pam_limits[27640]: invalid line 'hard^Inproc^I150'
Apr  3 11:31:58 echelon pam_limits[27640]: invalid line 'hard^Ifsize^I40000'

Pam was installed via an RPM & seems to be working fine within everything else.

I would just like to fix this area of it if possible

Check your /etc/security/limits.conf file. It seems PAM doesn't like it. Why? I don't know, but I checked my limits.conf file and my columns were separated by spaces, not tabs.

If you do a cat -v -t -e /etc/security/limits.conf, you'll see tabs as ^I and eon-oflines as $. -- Faber

Just to be nitpicky, cat -A is a combination of those options. -- Ben

cat -T is enough to see the dratted tabs as ^I but stray spaces at the end of the line still won't be obvious. -- Heather


Finding my computer at home from the outside LG #65

Wed, 11 Apr 2001 11:17:02 -0400
Ben Walton (bdwalton from mail.lakeheadu.ca)

Hi there Linux Gazette Team!

I was browsing through LG today, and came across the article 'Finding my computer at home from the outside'. This is a topic that interests me, as I like to be able to access my home machine from school. Although technically accurate, I found that writing these scripts is an extremely cumbersome way to do the job. (Not to mention that passwordless logins (secure tunnel or no) are just plain bad form...). I'm not writing this email to complain (you guys do too much good work), but rather to inform!

If you're in a situation like me, and you either can't get (or can't afford) a static IP on broadband, there is a much simpler solution. http://www.dyndns.org. A free service (they DO accept donations), DynDNS allows you to register a hostname (within one of their domains...for now), and run a client to update with them each time your IP changes. After registering with DynDNS, you can download a little client utility (I prefer ipcheck.py), and have it run from your /etc/ppp/ip-up script (I'm on DSL, so my connection is still PPP)...which is run every time that your IP changes.

I've found the service to be most valuable.

Thanks
-Ben Walton

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


The Weekend Mechanic

By Thomas Adam


Welcome to the new Linux Weekend Mechanic!

Table of Contents


What exactly is the Weekend Mechanic?

Welcome to this months new feature....The Weekend Mechanic. Actually, for those of you who have been avid readers since LG's initial release, you'll realise that this column used to be written by John M Fisk in 1996-1998 and so it is not that new. However, I thought it would be nice to re-introduce this as a regular feature.

The Weekend Mechanic will draw together my experiences of Linux and the problems that I have had to solve either at home or at school each month. So, The Weekend Mechanic will concentrate on the following:

So, with that in mind, lets begin this months fixing and tinkering session......


Customising the Shell Environment

I have noticed that more and more people when using Linux tend solely to rely on the GUI, hoping in vein that they do not have to type in any commands in fear of deleting their work, making a fatal mistake, etc. Although the only real threat of this happening is if you are logged in as "root", I find that people are still wary!! However, there will come a time regardless when typing in commands will be a necessity and it is important that your shell environment is customised so that you can complete your tasks with ease. This article will show you how to customise the login shell so that features such as Aliases, editors, shells, etc can work in the way that you want them to.

Firstly, we should make sure that you have an appropriate editor installed. There are many console editors to choose from, such as: emacs, joe, jed, pico, vi. Once you have found an editor that you like (I happen to use both Pico and Jed) then you can tell the shell to use. Some programs such as Cron (as we shall see later on..) rely on the shell having an editor set up so that you can edit the crontab.

There are two files that we shall be concentrating on. They are located in your home directory as: .bashrc and .bash_profile. In my .bashrc file, I find that it begins with the following:

# User specific aliases and functions

alias ls='ls -o --color=auto'
alias cad='cat /var/squidGuard/db/blacklist/adverts'
alias cc='cd /mnt/cdrom/Mandrake/RPMS'
alias mail='mail -v'
alias rm='rm -i'
alias cp='cp -i'
alias mv='mv -i'
alias d='ls'
alias s='cd ..'
alias p='cd -'

Aliases are useful, especially if you find yourself typing out a command that has a deep directory listing. For example, if you found yourself having to keep typing in the command

cd /var/spool/users/home/mail/root/sun
to save all that typing you can specify a "shortcut" word that automatically does just that. Cool eh?

So to tell the shell that you want to use the word "checkmail" to do the command

cd /var/spool/users/home/mail/root/sun
you would add to the list:

alias checkmail='cd /var/spool/users/home/mail/root/sun'
Then you could type the alias checkmail and hey presto....it works!!

Of course many people like to issue aliases to accommodate their typographical errors; i.e.,

alias eamcs='emacs'
alias emcas='emacs'
Personally I think this is a bad idea, and you should learn to type more accurately!


The next section we shall look at is how to tell the shell which programs to run when it is suitable to run them. In my .bash_profile file I have among the following:

PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin
ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME ENV PATH

This is the section that we shall be concentrating upon setting these variables. Common variables that have not been set are ones like "EDITOR" and "MAIL". These variables are common to the user that is currently logged in, meaning that different values can be specifies for each user. The variable

EDITOR
specifies the editor to use when editing files. This variable is usually called from programs such as Pine and Cron, but it can be very useful when writing shell scripts.

To set the variable, one has to add it to the "export" list, like this:

export USERNAME ENV PATH EDITOR

Exporting a variable releases it into the environment, rather than keeping it within a single program. Exporting is done, so that many different programs can use the same variable name with the same value, get it :-).

Once added to the export list, save the file, and exit your editor. So, now that we have defined a new variable, the next thing to do is to tell Bash, that it is there. To do this, you must "source" the file. This is a bash builtin that re-reads the file. You can either type this in, in one of two ways. Either you can specify

source filename
or you can specify a "." thus:

. filename

And that will then active your new added variable. Well, thats it for this section....


Setting up and Using Crontab

Do you ever find yourself repeating common tasks throughout the day, and wished that there was some sort of program that would automate it all for you? Well, look no further, Mr. Cron is here :-)

Cron is a scheduling program, and even more specifically it is known as a daemon. By daemon, I do not mean that it is a nasty creature with two horns!! A daemon is simply a program that runs in the background waiting for instructions. When it receives them, it executes them and when it has finished, it goes dormant again.

Cron is usually started when you switch to one of your run-levels. However, just to make sure it has started, issue the following command:

ps ax | grep crond

If you get a response similar to:

root       311  0.0  0.7  1284  112 ?        S    Dec24   0:00 crond
root       8606  4.0  2.6  1148  388 tty2     S    12:47   0:00 grep crond

Then cron has started, and you are ready to use it. If you don't get "crond" returned, then you must start the daemon, by typing

crond

Cron is particularly useful when you find yourself needing to run backup and general maintenance programs. To tell cron when to run a program, you have to fill out several fields. Each separate program that is scheduled via cron is put into a file known as a crontab file. The fields are defined as the following:

Min	Hour	DOM	Month	DOW	User	Cmd

And a description of their input values are summarized in the table below:

FIELD DESCRIPTION
Min Specifies the minute on or past the hour. Values range from 0 to 59.
Hour Specifies the hour (Military style) that the script should run at. The range is from 0 to 23 where "0" is Midnight
DOM This is the Day of Month, that you want the command run on, e.g. to run a command on the 23th of each month, the DOM would be 23
Month Specifies the month to run the script in. Values range from 1 to 12, where "1" is January and "12" is December. Or it can be specified using the first three letters of the month, e.g. May
DOW Specifies the day of the week, either as a numeric value of 0 to 7 (0 and 7 are both Sunday) or as the name of the week (using first three letters only), e.g. Mon
User Indicates who is running the command
Cmd The path and name of the script/program to be run

You can use a "*" (without the quotes) in any of the time fields to mean "every minute", "every hour", etc.

So, with the above descriptions in mind, the following examples are all valid:

01 * * * * root /usr/bin/script 	"This command is run at one min past every hour"
17 8 * * * root /bin/mail 		"This command is run daily at 8:17 am"
17 20 * * * root /usr/bin/fetch 	"This command is run daily at 8:17 pm"
00 4 * * 0 root /bin/qweb	 	"This command is run at 4 am every Sunday"
* 4 * * Sun root /usr/bin/file2rpm 	"This command is run at 4 am every Sunday"
42 4 1 * * root /usr/bin/squidlog 	"This command is run 4:42 am every 1st of the month"
01 * 19 07 * root /usr/bin/xman 	"This command is run hourly on the 19th of July"

See how easy it is? :-). Cron also accepts more sophisticated time specifications: run "man 5 crontab" for an explanation of these.

Of course this is all very well, but I have not told you where to put any of your cron entries. So.........hang on there, reader.

The most common version of cron installed on linux systems is "vixie-cron", and so in the "/etc" folder should be a file called "crontab". If you have specified the environment variable EDITOR (see the above section) then you can simply type in:

crontab -e

And that will load the file into your text editor

If you did not open it using the above command, then open it using a text editor of your choice and you should find something that looks like the following

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root@grangedairy.linux
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-parts /etc/cron.weekly
42 4 1 * * root run-parts /etc/cron.monthly

The SHELL variable indicates the current shell that we are using

The PATH indicates the path to the most common programs

The MAILTO option indicates to whom the output of the cron result (i.e. whether it has worked or not) and any output from the program is to be mailed. If you find that it is annoying, then you can delete this variable.

The section below "#runparts" is supposed to work so that in the folder "/etc/cron.daily" for example, whatever script is in there gets executed daily. However, for some strange reason, it has never worked well for me, and I have since found it easier to specify my own cron list.

So, to add the above examples to our crontab, it is just a matter of copying and pasting them in:

SHELL=/bin/bash
PATH=/sbin:/bin:/usr/sbin:/usr/bin
MAILTO=root@grangedairy.linux
HOME=/

# run-parts
01 * * * * root run-parts /etc/cron.hourly
02 4 * * * root run-parts /etc/cron.daily
22 4 * * 0 root run-part