Random Errors in Perl There is a simple mistake I make frequently with random numbers. I'll use Perl to illustrate, but trust me: I can screw this up in just about any language. And I have...
Living in Ubuntu for a Day The arrival of Mark G. Sobell's "A practical guide to Ubuntu Linux" a few days ago prompted me to try living in Ubuntu for a day.
Trying to Recover SCO Medical Manager Recently I went out to try to recover a SCO system running Medical Manager.
Distributors and Web Dummies A few days ago a customer asked about renewing a license on a piece of Internet equipment they bought from me last year. No, I'm not going to be more specific than that: we need to protect the guilty.
Mac Sandbox Wrapper Mac OS X Leopard includes a new command line tool called "sandbox-exec". What it does is provide a "sandbox" - a restricted environment.
Playing with Perl 5.10 While we were all busy getting ready for the holidays, version 5.10 of Perl appeared on CPAN.
Ding Dong The Cron is Dead Actually, cron is not dead on Leopard; you can still use it if you like. For example, at a Terminal shell, type "crontab -e" and then a lower case "i" and then:
The Un-Server: Using a MacBook I started following through with some of my 2008 resolutions. First thing was to finally take the time to program our thermostat. I set it to 59 degrees at 10:00 PM, then to turn up to 64 at 7:00 AM, down to 62 again at 10:00, up to 64 at 5:00.
Using Mac Screen Sharing with Windows Mac's new Leopard OS X has added a "Screen Sharing" capability.
Any Hope for SCO? SCO's stock price sank and sank and recently they've been delisted: you can't buy their stock on NASDAQ anymore (though it's hard to imagine why you would want to - you'd need a lot of faith and hope to be chasing this rabbit!).
Router Down: Some Days You Just Can't Win Some days you just can't win. One of my clients (you know who you are) had such a day yesterday.
The Missing Manual: Mac OSX Leopard Edition Unlike Mac OS X Leopard Pocket Guide, this is the book you really should buy if you are running Leopard.
How I cheat my way to success I like to think this web site is moderately popular. Maybe a little quirky, a bit unfocused, perhaps a little too geeky for some and far too un-geekish for the real geeks, but fun and informative for the few who read it regularly (estimated at less than 1,000 right now, by the way).
Dueling Document Object Model Inspectors The "DOM", in web page speak, is the Document Object Model. The W3C explains it: What is the Document Object Model?:
Another SCO Unix Filepro System Bites the Dust I spent most of yesterday on the phone helping another consultant port a SCO Unix Filepro system over to Linux.
Improve QuickLook in Leopard Leopard's new "Quicklook" is a nice tool, but for stubborn old command line types like me, it has some limitations: it won't show me plain text files unless they have the extension ".txt".
Equal Height CSS Columns with Filler Text If you search for "column alignment" or "css columns", you'll probably eventually end up at In search of the One True Layout at positioniseverything.net. That's great stuff, but it is not what I wanted.
Who Locked that File? I can't even imagine how many times I've heard someone complain about a locked file.
Leopard Directory Services - dscl & Related Commands I was no great fan of Netinfo, and I think it's great that Apple has gone to XML driven Directory Services as a replacement.
Linux Flyback Needs More Than Ease of Use Recently, there have been a number of posts about Linux Flyback, which is an attempt to wrap a gui around rsnapshot/rsync to make a Linux version of Apple's Time Machine.
Random Subroutines in Perl I'll bet your first question might be "why on earth would I ever want to call subroutines randomly?".
SCO Bumbles Along I now, I know: don't kick a man when he's down. Poor SCO doesn't have much time left on this earth, and here I am complaining about their stuff.. oh well, I'm a horrible person and that's just the way it is.
Viable alternative to SCO OpenServer? I was a little surprised by this Newsgroup thread that began with asking "With the chapter 11 filing and other recommendations, what is a good, long time viable alternative to SCO OpenServer? "
Gmail vs. an in-house Mail Server I suppose I need a disclaimer here: I sell mail servers. Specifically I sell Kerio Mailserver and that represents a good chunk of income for me. Therefore, you wouldn't expect that I'd be recommending Gmail as a corporate mail solution.
Lazy DNS I had a call this morning from a customer who wanted me to come down because their mail server was broken.
A DNS Puzzler Here's an interesting puzzle involving DNS.
Is There Always a Better Way? I happened upon a recent Linux-Watch article about Dell's Dynamic Kernel Module Support.
Looking back at RedHat 6.2 Today I meandered down state to answer a distress call on a Linux box exhibiting a number of baffling symptoms (well, they baffled me on the phone at least). Suddenly, after "changing nothing" (of course), the system:
SCO Goes Bankrupt No great surprise...
Lawrence on Embedded Virtualization VMware and XenSource are moving to hardware near you: Virtualization: A feature of the hardware, not the OS?.
Embedded Virtualization VMware and XenSource are moving to hardware near you: Virtualization: A feature of the hardware, not the OS?
On DNS Troubleshooting DNS problems can cause all sorts of strange network behavior.
Do You Really Need a Domain Controller? Let's start out with the good points: there are advantages to a Microsoft Domain Controller model. Centralized user control, fine grained resource access control: these are often useful and very helpful.
Western Digital My Book USB Drive I had to find an ATA internal hard drive the other morning. In years past there would have been at least a couple of them kicking around here somewhere, but I've let stock go down over the years as demand dwindled.
The Linux Programmer's Toolbox Wow. Regular readers here know I don't say "wow" lightly. I may like a book, I may even think it's useful or even something you really should have, but very few really make my jaw drop.
Fortinet Firewall Virtual IPs I found this a little confusing, so am documenting it here in case you run into the same problem.
Fortinet Firewall Transparent Mode The Fortinet 50A is a firewall router designed for 10 users or less (this is an older model, now replaced by the 50B).
Review: The Linux Programmer's Toolbox Wow. Regular readers here know I don't say "wow" lightly. I may like a book, I may even think it's useful or even something you really should have, but very few really make my jaw drop.
Review: The Apache Module Book Aaargh.. C code. I never thought I'd say that, but there it is. I must be getting old..
Review: Wicked Cool Perl Scripts Order (or just read more about) Wicked Cool Perl Scripts from Amazon.com
Hardware Routers vs. Kerio Winroute Firewall I had a call from a customer who already uses Kerio Mailserver. He had downloaded a demo of Kerio WinRoute Firewall and said he had a few questions.
Giving in to Temptation This analysis was conceived when the coauthors discovered we'd each been independently seriously tempted to buy a Mac Mini, and realized what that temptation implied.
Background Tasks (Why?) A comp.unix.shell newsgroup post asked a neophyte question about how to run a script in the background.
Invalidating the Linux Buffer Cache When you write data, it doesn't necessarily get written to disk right then. The kernel maintains caches of many things, and disk data is something where a lot of work is done to keep everything fast and efficient.
Review: Google Comments Beta While browsing Google Labs, I noticed new Firefox extensions.
GoboLinux - A Breath of Fresh Air? My very first reaction to GoboLinux was negative. The underlying idea of taming the Unix/Linux file system hierarchy with symbolic links isn't new: heck, SCO did that way back with their 3.2v4.0 release, and for exactly the same reasons (see the Software Storage Objects- SSO section at this link).
Maintenance Tools for Mac OS X There are a number of Mac OS maintenance applications that promise to help you with various tasks. We'll take a quick look at a few of them here.
Cron Isn't Working? Let's just get this out of the way first: when someone says cron is not working, it almost always is, and they have just misunderstood something basic.
Handling Missing Data I have an old Perl project that goes out to a Government web site, ftp's some files, massages them in various ways, and spits out some output. Over time, the project grew, and now does more than it used to.
The Influence of Unix on NT For several years now I've been looking for something Bill Gates said. Unfortunately I had misremembered the actual words, and every time I found someone who thought they remembered it, they had the wrong words too and I'd come up dry yet again.
Mysterious Lockups Of all computer problems, the unresponsive hang is the most annoying and most difficult to trace. There's no crash, no panic: everything just stops dead.
More Reasons to Love Unix/Linux I did a lot of clean-up work at this website over the long Thanksgiving weekend. This was all due to radically changing the layout. Some of that was quick and simple do do, but for older pages I needed to do some hand editing before switching to the new format.
Controlling Disk Space w/ Symbolic Links I've covered this in other articles here, but when I went searching for something to point a customer at I had a little trouble finding it, so we'll do it here:
MacBook Pro Battery Exchange I think I was actually vaguely aware of the 15-inch MacBook Pro Battery Exchange Program, but *I* wasn't having any battery problems so I never looked into it.
Losing Data Over VPN Sometimes change is good, sometimes it's bad, and sometimes it's a mixed bag. Such was the case recently when a customer switched a remote office from a 56K line to using a Kerio VPN over Internet connections.
Dealing with Comment Spam If you run a web site that allows comments, you are going to get comment spam - that's just a fact of life in the current Internet.
The Patent Ploy Microsoft to Offer Sales Support for Novell's Suse Linux... Huh? Did I hear that right? Yep, there it is again: Linux to work with Windows.
Understanding Microsummaries One of the new features of Firefox 2.0 is support for Microsummaries. These are simply another kind of live bookmark, and in that sense are similar in context to RSS live bookmarks, but are simpler to implement and contain less information.
How Much is That Link Worth? Text-Link-ads.com has a link ads calculator that purports to tell you how much an ad link on your site (or someone else's) is worth.
Understanding Microformats You may have heard mention of "microformats" recently. If you investigated, you probably ran across mumbling like this from http://microformats.org/about/:
Oracle Linux At "Larry Ellison's Linux nears release", Ashlee Vance is unsure why Oracle would want its own Linux distro.
Terrasoft Supplying Linux for PS3 Is it really news when Terrasoft announces that it will be supplying Linux for the PS3?
Perl loop causes strange read-only error Ok, folks: I don't understand this. It must have something to do with anonymous arrays in Perl (no, it doesn't, I realize now), but I don't grok the connection.
The Psyche of PC Owners Apparently I'm not the only one wondering if Microsoft is going to take a big belly flop with Vista: David Morgenstern at eWeek has a column asking "What if Microsoft Held a Vista Party and Nobody Came?".
Zeroconf I liked the last paragraph of Carla Schroder's "Run Zeroconf for Linux in a Snap"
Continuation Lines There's been a long standing Unix convention of breaking long lines with a "\" to make them easier to read.
Mac OS X Internals Review I've been waiting quite a while for this book. It was the introduction of the Intel Macs that delayed this; an appendix and numerous updates throughout the book cover the new hardware and the software changes (that's the August 2006 printing; if you are buying used and want the Intel info, don't buy the June 2006 edition).
Another old SCO Box The last time I saw a SCO 3.2v4.2 system was the summer of 2004, but another peeked out of the bushes this week.
Grokking the Source At http://www.codinghorror.com/blog/archives/000684.html, Jeff Atwood has an interesting observation:
The Hidden Loop Programmers use loops to avoid writing repetitive code, but sometimes forget that compilers will unroll their loops when possible for efficiency.
Javascript - The Definitive Guide: Review This is the Fifth Edition of "Javascript The Definitive Guide". I dragged out my old Second Edition (1997) of this book for comparison.
Vista vs. Leopard Poker Showdown So Apple has given us a taste of Leopard while almost certainly withholding some features to hit Microsoft with later this year or early next.
Why was Linux Successful (and will it stay so)? Internet News reported on a panel discussion of the reasons why Linux was successful. I had been thinking about that myself recently, and had earlier found an older but more detailed article on the same subject.
Troubleshooting Mistakes The very first part of troubleshooting is identifying the problem. That's not always easy even for skilled professionals.
A/B Testing for Adsense is Often Pointless Google recently posted a little blurb about The ABCs of A/B Testing. I hate to be a wet blanket, but for most of us lower volume publishers, that's a pointless exercise with little to gain.
Mac OS X: Time Machine Apple has added something they are calling Time Machine to the upcoming "Leopard" release of OS X.
Linux pinfo I have never liked Linux "info". The reason is simple enough: I don't like Emacs, and "info" uses an emacs style interface.
Understanding Ajax: Review I enjoyed this much more than the other other Ajax book I reviewed recently.
Review: PHP 5 in Practice As some of my readers know, I'm stuck in Perl. I started my web site with Perl and it's so completely dependent upon it now that I can't imagine changing.
Sleeping Macbooks MacBooks and iBooks can be put to sleep simply by closing the lid. That's the method I usually use when I'm done for the day: just close the lid.
Debugging a Network Failure As is happening in much of the U.S. right now, we are experiencing extreme heat in New England, and of course that means high electrical loads from air conditioning, and also means late afternoon thunderstorms with lightning.
Death of the Command Line It's hard for me to imagine using an OS without a strong command line. Even Microsoft has recognized the for that with their Monad Shell ( though they are at least temporarily removing that from Vista).
Filepro Conversion In years past, I did a lot of Filepro work. This goes way, way back: I worked on the first Tandy Xenix version when it was still beta - so beta that it couldn't even do floating point math reliably!
Linux Libuser The other day I had started typing "ls" while sshed to a RedHat machine and had only typed the "l" when I suddenly decided I needed to switch away to look at something else.
Fugu SSH/SFTP Client Fugu boasts an Apple Design award for Best Mac OS X Use of Open Source. As expected, I found myself wondering why the heck you need a gui interface for scp or sftp, but actually it turned out to be useful and .. I liked it.
Ajax Book Review The first thing I should say is that this is a thoroughly enjoyable book. Ed Woychowsky is fun to read, and I could almost recommend this to you even if you have no interest in Ajax.
Legacy ISA I found a professed "competent" student at the local university who spent a couple of hours destroying the setup in one of the machines. We now have one machine working..
Review: A Practical Guide to Red Hat Linux I'm overwhelmed. This is the book I wanted when I started learning about Unix. OK, Linux didn't exist then, but if it had existed, and if I were sticking my toes in it, this would have been THE book.
Linux Starter Kit Review I should say all the nice things first: this is an attractively packaged DVD distribution of Suse 10.1 which includes a 128 page "Quick Start Guide".
Mac OS X Ruby on Rails - Where to Go Next When we left off with Mac OS X Ruby on Rails, I had Rails up and running but had not a clue as to where to go from there.
Mac OS X Ruby on Rails I've been ignoring Ruby on Rails for a while now. Oh, I knew I'd have to look at it sooner or later, but you know the old saying about old dogs and new tricks.
Ancient Unix I had noticed The Computer History Simulation Project some time ago, but I never got around to doing anything with it. This July Fourth, with nothing else pressing me, I decided to take a more in depth look.
Quicksilver I'm still puzzling over Quicksilver. I'm really not sure whether I don't get it, or it's the people that love it that really don't get it.
Symphony OS The funniest thing about Symphony OS is the posts you'll sometimes see asking if its Mezzo Desktop can be ported to Linux.
Bad Routers I have a customer with a branch office in China. The folks over there need access to resources in the main office, so of course we implemented a VPN between the two offices.
Where's the Memory? I had happened across How To Remotely Monitor Memory Usage and smiled when I saw this :
Puppy Linux It sounds like a toy, doesn't it? "Puppy Linux". So cute, and when it first boots you'll hear "Woof-Woof" as a help screen opens.
Apache and PHP I had a call yesterday with someone looking for help with Php. I explained that I don't do any Php and probably wouldn't be able to help. He countered with "Well, it's really Apache, not Php."
No Docs? Microsoft can buy white papers whenever it wants, and of course they do. They say some of these are "independent, non-sponsored" studies.
Inward Bound There's a Boston customer I have serviced for many years now.
OS X File Encryption I'm going to look at two methods for encrypting files on Mac OS X. The first is built in, and uses DisK Utilty to create an encrypted disk image.
Bash HISTCONTROL I happened to come across Linux Tips: take control of your bash_history.
SMB Caching A customer had a particular shared folder setup so that only he had access to it.
Root Kit Hunter I had a strange problem with one of my own RedHat machines the other day. Very simply, I couldn't su to root, and I couldn't even login at the console as root.
Selinux on FC5 Selinux can be confusing, but it's ordinary and default configuration is actually pretty simple. We'll examine it on Fedora Core 5.
PC-BSD I do like BSD OSEs, but I think the most interesting thing about the release of PC-BSD is that the download page incudes a VMware image.
Tree Maps of Disk Space GrandPerspective and Disk Inventory X are two free Mac OS X apps that give graphical views of where your disk space is being used.
Time to Fix the Bugs? Almost two years ago I wondered about the negative aspects of companies like IBM and HP trying to control Linux by hiring top Linux developers.
mount --bind Most Linux and Unix file systems don't allow hard links to directories (except for the . and .. entries that mkdir creates itself).
The Last Windows OS? Sometimes the game is over even though somebody on the losing team is still running like mad toward home plate.
GDI Printers "But I'm just sending data to Windows - why doesn't the Windows printer driver just take care of it?"
Race Conditions A "race condition" is a circumstance where you have two things that really need to happen sequentially, but don't.
Can't Connect to Internet We talked about DNS problems at Fallure to resolve, but there are other reasons why a particular machine may be unable to browse the Internet while others on the same lan still can.
Slow Down, Simplify Microsoft's most recent updates apparently caused problems more than a few users: Microsoft Patch Snafu Grows, Users Seek Workaround.
Resistance is Futile Microsoft says recovery from malware is becoming impossible. Well, duh.
But is it Programming? Apple has put out a tutorial introducing programming with Core Data, Xcode and Interface Builder. Even if you've never written a line of code in your life - and maybe even especialy if you have not - go take a look at Building a Sample Core Data Application.
Who Said That? My wife and I had run out for errands and had stopped at a D'Angelo sub shop. We were just about to get out of the car when the phone rang. My wife rolled her eyes but I took the call because, well, because that's what I do. Somebody has a problem, I try to answer the phone.
Tar Wild Card Interpretation I had this email earlier this week:
We Have the Brains At Do sandals and ponytails really hold back Linux? former Massachusetts chief information officer Peter Quinn complains that the Linux community is unprofessional and that this is holding back more widespread adoption of Linux. I'm sure he really believes that.
Tomorrows's Date At How can I find tomorrow's or yesterday's date in a script?, some anonymous person left what I consider to be a stupid comment.
OpenOSX Virtualization for OS X OpenOSX is a port of QEMU for OS X. It's a universal binary, so it works on the Intel Macs without translation.
File Date Comparison Sometimes you want to use the date of a file somewhere else. For this example, we'll use the case where a file shouldn't be overwritten if it was created or changed today.
Enabling Linux telnet This has to be one of the more common support calls that I get. The telnet daemon is no longer usually installed by default, so people are surprised when their newly installed Linux system won't answer telnets.
Lady and the Scamp (SCO does the Web) If you visit SCO's website (yeah, I know, why would you?) soon enough, you may see SCO's new Scamp logo: an evil looking bulldog grinning at you across folded arms.
Unexpected entries in Apache error_log For some time now I have noticed a large number of entries in my Apache error log.
Keep in touch (tcp keepalives etc.) You can't please everyone, so you got to please yourself.. (Ricky Nelson)
Compiling on Mac OS X There are a lot of pre-compiled binaries available for Mac OS X, but sooner or later you will need to compile something from source.
Reuse or Write New? Sometime last summer I was involved in a fairly complicated Perl project. It was one of those "Well, it's just like the thing you did for X, but now we need it for Y and Z".
Simple Schedule I often get asked for web-based scheduling programs. I've done quite a few of them over the years, sometimes using scripts available from the web, but more often writing my own simply because I don't like modifying other people's code.
Misunderstanding Security At UNIX Security: Don't Believe the Truth, Thom Holwerda makes a rather silly argument that Unix security is no better than the worst of Windows security because the result to the user is the same: his personal files can be damaged by a worm or virus even if system files are more protected.
VMware's Threat to Microsoft First off, I'm not suggesting VMware is gunning for Microsoft. However, recent developments in their product line aren't exactly favorable to Microsoft.
Mac OS X Security Mac and Linux users aren't used to turning on the news and hearing about security threats that affect us.
Should 'halt' Call 'shutdown'? As mentioned briefly in the comments section of Bootstrapping your Linux Machine, recent Linux systems have added a convenience feature to the 'halt' and 'reboot' commands: they actually call 'shutdown' if the system isn't in init state 0 or 6.
How Shells Call Other Programs An article about How Linux or UNIX Understand which program to run got picked up by a few dozen RSS feeds recently. It's not a bad article.
A ps Problem with BBX Someone recently asked me about increasing command width for 'ps' on SCO Unix.
Security Through Obscurity Threatened as Macs Become More Popular? At Apple's in the eye of flaw finders, Mac users are warned that the growing popularity of the platform will attract viruses and security hacks.
Perl 'Eval' for Data Validation I recently did a little web based Service Schedule. This is something that gets its data from another program: in other words, the details of what will be serviced and when are supplied by that program; this web based app validates things, assigns technicians and does some other things that the first program doesn't.
Vanderpool, Intel Dual Core VT and Intel Macs I (and a few others) been blabbering about this for a while but it seems that very few people are really aware of what is about to happen here.
C Pointer Problems This was written in January of 1990, but is still meaningful today, though we do have better debugging tools now. This was originally published in the Boston Computer Society's PC Report.
Rounding Time It was a long, hard day. Up early to clean a room of furniture so that new carpet can be put in later this week, off to a real estate refinancing closing after that, back to rake leaves and then the usual computer type work.
Terabyte, Tebibye At Will dead media ever end? I opined that we are getting closer to the point where it is unnecessary to have more storage space.
Fedora Time Bug The question of setting time comes up frequently. Setting the timezone and the system clock can be confusing, particularly if the machine is dual boot.
Controlling Concurrent Runs with Perl Sometimes you have a program that can't be run by more than one person, or one that must run frequently but you don't know for sure how long an instance of it will take.
Web site IP Filtering We've talked here before about filtering IP traffic by source for mail servers.
Spotlight, mdfind (Mac OS X Tiger searching) Most users will probably see Spotlight as an enhanced, very fast file searcher: something that builds an index of files and their contents, and can very quickly search that index and return results.
Unixart: Tracking Site Problems As some of you know, I have Foo-web.com and some other sites on another web hosting site. Recently I noticed that I'd frequently get locked up for thirty seconds or so while editing files on that site.
Beginning Web Development with Perl (Review) While Perl may not be the "cool" language for websites anymore, there are some of us who prefer to work with it because we use it for so many other tasks.
Programmer Overkill (MySQL) I have a peeve about MySQL. Oh, not about MySQL directly: it's great. I love it, it's wonderful, no complaints. It's the people who use it when they don't need to that get me shaking my head and talking to myself.
Viruses and Unix I was in a meeting last week where a customer was exploring switching from a Unix platform to Windows.
CSS Frustration CSS is wonderful, because it allows the true separation of content and presentation. CSS is frustrating because it doesn't.
Domain or not? Computer networks are often just automatically set up without much thought: if it's a business, it's set up as a domain, if it's home, it's not.
C++ or C (or both?) Some of you may have made use of Dean Jones' CleanCode Email. It's a nicely done mail sender - it's not an SMTP server, it just sends mail, but lets you specify the gateway or smart host to use, which makes it wonderful for systems that don't need to receive mail.
NBD (Network Block Device) Bird's eye view: you have a block device, for example /dev/nda. It acts like any other black device, which means that you can create a file system on it, make it part of a mirror or RAID 5 array and so on.
Symlinks Linux "symlinks" is a handy utility for managing symbolic links. It can clean up the sort of problems that come from carelesness when creating symbolic links.
A Bit of C Debugging have a customer who has a hodge-podge of machines running various software programs. It's all a mess, low on disk space, not every machine that should be backed up is backed up, and so on. I'm slowly working toward a better world on some of those things, but we still have to deal with the day to day problems.
Taskset For CPU Affinity SMP operating systems have choices when it comes to scheduling processes: a new or newly rescheduled process can run on any available cpu.
Perl Binding, Perl has "||" and "or". While "or" can't be used in bit operations, either one can be used in logical flow control - but there is an important difference between them.
New Interfaces for Microsoft? Microsoft tells us that their application interfaces need revamping. Apparently having eighteen kazillion commands buried under three million menus confuses people now and then.
HLA - The High Level Assembly Programming Language I've noted before that assembly language programming can be quite engrossing. It's the level of detail that captivates; there can be a great deal of craftmanship and mental challenge in writing assembly programs.
Virtual Tape Virtual tape does just what you'd think: a backup thinks it's writing to tape, but in reality the data is going elsewhere. It may still end up on tape eventually, but in the meantime it's heading for disk, local or otherwise. This stuff isn't cheap, but then neither are the systems where people would be interested in it.
The Cost of Linux Matt Asay's AC/OS blog says that one of the "expenses" noted in Microsoft TCO studies is the cost of training.
Windows vs. Unix - the Forgotten Facts (An Opinion) "Windows Beat Unix, But It Won't Beat Linux" makes some valid points, but I think it leaves out one very important thing.
When All Other Explanations Fail.. An article in Wired titled Mind over Matter discusses some researchers who claim that human thought can have effects upon physical events - such as falling ping pong balls and other things.
Mozilla Suite, Seamonkey, huh? OK, apparently some of the Firefox developers aren't happy. I don't follow this stuff closely, and probably wouldn't understand their complaints anyway.
Bash In-process Regular Expressions Bash acquired in-process regular expressions in version 3.0, but I never noticed, probably because most of the machines I'm using are Bash 2.05b.
Bash Aliases Most shells have some provision for aliases. Aliases can assign default behavior to a command (for example "rm" is often aliased to "rm -i") or can be used to create new commands (a typical example is "ll" aliased to be "ls -l").
Lies and Statistics - the Unix Server Market "There are three types of lies - lies, damn lies, and statistics." The source of that truth seems to be unknown, but it's sure on the mark for statistics reported in the Unix server market.
Personal Dictionary for Ispell Ispell works well, but it has to be the most confused project I've ever seen. I started looking into this because I got tired of seeing the same common words pop up for correction and wanted to add those words to some file that would cause Ispell to ignore them.
Creating Perl Modules for Web Sites When you are writing your own code, you are more apt to use someone else's module than write your own, unless your project gets fairly large and complex.
Microsoft Likes Unix? The news from Microsoft is that they will be putting more Unix features into their server offerings according to...
Host, Dig I tend to use "dig" for DNS lookups, but it's more habit than anything else. The main page for host says "host is a simple utility for performing DNS lookup" while dig's brags "Most DNS administrators use dig to troubleshoot DNS problems because of its flexibility, ease of use and clarity of output. Other lookup tools tend to have less functionality than dig."
Darwin (Mac OS X Open Source) I have a handful of Boston clients, so around once a month or so, I take the commuter rail train into Back Bay or South Station.
Bitkeeper,git (patch maintenance) Kernel programmers need to keep track of patches. That's pretty obvious, but what isn't immediately obvious to those of us who aren't kernel developers is just how onerous that task is for Linux kernels.
Perl Range Operator (.. and ...) In a list context, this operator is easy to use and understand:
Bit vector, using Perl vec A bit vector is just an array of bits; subsets of bits within the bytes have some meaning. That allows more compact storage for certain types of data. For example, if you only needed boolean on-off values, you can store eight values in one byte.
LWP (Library for WWW in Perl) If you want to automatically process web pages to extract data, you have a number of tools available. You can bring a web page down to your computer using "curl" or "wget"
Magic Sysrq The "Magic Sysrequest key" is Alt (left or right Alt key) and Sysrq (up there under Print Screen, next to F12 on most keyboards). To use it, you need to have it enabled in your kernel (CONFIG_MAGIC_SYSRQ).
Loadkeys, Dumpkeys You can change the output of the console keyboard with loadkeys. It's an extremely powerful command, and the man page can be confusing, but for simple use (which is often all we need it for), it's very easy.
getconf "getconf" returns the value of certain system variables. According to the man page (which you may not have on your system) it queries system configuration variables which are either:
A.P. Lawrence On Pro Perl In the review copy I read, there still were some unfortunate typos that might confuse someone completely new to Perl. I hope those will be fixed before the actual publication. None of them bothered me, but they could be bad for someone starting with no experience at all.
Basic DNS: PTR Records and Why You Care A PTR record is what lets someone do a "reverse" DNS lookup - that is, they have your IP address and want to know what your host/domain is. At any Unix/Linux command line, you can use "dig -x" to do a reverse lookup:
Samba Problems It never rains but it pours: I've had four Samba call in the past two days. A couple of things to keep in mind as a result of helping those folks:
Controlling Linux colors in vi (vim) Because of an old application that apparently partially looks at termcap and partially hard-codes terminal info, a customer has to set TERM=ansi when using Alphacom to access his Linux box.
Hardening your Kernel with OpenWall The Openwall Project provides security related kernel patches for Linux and BSD kernels.
Goal seeking code This is an extremely unsophisticated program that demonstrates evolutionary DNA. You start by passing it a string:
Understanding PAM PAM is the Pluggable Authentication Module, invented by Sun. It's a beautiful concept, but it can be confusing and even intimidating at first. We're going to look at it on a RedHat system, but other Linuxes will be similar - some details may vary, but the basic ideas will be the same.
Replacing a Spreadsheet Spreadsheets can be powerful tools, and particularly so in the hands of an expert user. A spreadsheet can be used to reorganize data and to extract information not otherwise available. For example, at a client site, an application report generates a listing of hourly billing, but can't give the cross-reference totals desired.
Javascript setTimeout Problem A neighbor wanted to run Google ads on his website. It's one of these turnkey things that give you an on-line store that you can add products to.
Transfer SCO Acucobol to Linux I doubt I'll see too many more of these, but I had a call from someone with a crashed SCO 3.2v4.2 system.
Linux Certification Gaining Ground but Cisco Still on Top I was interested to see that RHCE (Red Hat Certified Engineer) was listed in slot 3 of certifications IT professionals want to get.
Troubleshooting: Preserve the scene You've seen it on television or in the movies: important evidence is lost at a crime scene because someone wasn't careful enough to preserve it.
Fixing 404 errors A 404 error is what you get when your browser tries to access a page that doesn't exist. Maybe you mistyped something, or the link you followed was mistyped by someone else, or maybe the webmaster moved it or renamed it or just deleted it. It's annoying for you, and sites that care about your visit try to avoid it happening.
Transferring Mail to a New Mail Server Sometimes we just have to move on. Your current mail server may just not be meeting your needs, so you've put up something new. But what about old mail? If your servers are identical (Sendmail to Sendmail, etc.) or use the same mailbox storage format, you may be able to just transfer files directly. If not, read on..
Dynamic DNS Services Update Scripts Strangely enough, I never had any need for a dynamic DNS service until this week. In retrospect, it really does seem odd that I've never needed such a service before now, but so be it.
ProFTPd, wu-ftpd, and general ftp security FTP in general has a long and sad history of security problems. If you need to run an ftp server, you need to keep careful track of vulnerabilites and exploits that may make for a very unhappy day.
Writing and Compiling C programs on Linux Most Linux and Unix programs are written in C. When you download source for a project, it will often be C or C++ source code. You don't necessarily need to know a darn thing about C or anything else to compile the source if you aren't changing it. It may be helpful for you to understand a bit if you are having problems with the compile, but even that isn't really necessary.
Testing for Network Connectivity in a Script Sometimes a script needs to know if it has network or internet connectivity before it continues, or perhaps its whole purpose is the report a loss of connectivity or inability to reach specific services.
Creating ext3 File Systems The ext3 filesystem is a journaled file system that is compatible with ext2 (an ext3 filesystem can be mounted as ext2 if necessary).
SME Server Software Raid Failure, Grub 0x10 error An SME customer called this morning saying that his system had apparently stopped working (web pages and mail were unavailable) and therefore he had rebooted.
Text Configuration files and XML Configuration files are a problem for both operating systems and applications. Where do you keep them, how are they structured?
Waiting Too Long to Upgrade had related at Another Raid Failure that an initial attempt to rebuild the raid had failed, and left the story with fresh drives on order and winging their way toward us. The drives did arrive, but unfortunately the rebuild still failed. A Knowledge Base article suggested that there might be unreported problems on other elements of the array, with the suggested solution of blowing it all away and recreating from scratch. As we still had some suspicions about backups at that point, I didn't want to do that until we had unquestioned good recovery capability.
Custom Tab Completion I'm sure you already know about tab completion: type part of a command name and hit TAB and you get its matches. Leave a space and then hit TAB, and you get filenames. Wonderful stuff. But what if YOUR command wants user names instead of file names?
Sun offering free, open source Solaris 10 - not quite yet II'm reading everywhere that Sun is making Solaris 10 free and open source ( http://www.rednova.com/news/display/?id=106224).
Text::Autoformat: Smart Text Reformatting with Perl I've been using http://groups-beta.google.com/ for Newsgroup posting for a while now. It's convenient for me because of my nomadic life style where I have different ISP's and often different machines with varying OSes. Google only needs a browser, and they aren't overly fussy about that, either.
Sun and Open Source We don't even yet know what Sun means by "open source", but already the pundits are arguing about whether making Solaris "open source" (whatever that turns out to mean) will help them or hurt them.
How Old is That File? Sometimes you want to know the age of a file. Perl has a "-M" test that gives you age in days, but this customer needed it in minutes. That's easy:
Another RAID failure There must be something in the air. I've had another RAID failure. This time, it was a hardware RAID, specifically a seven year old DPT controller (DPT was subsequently bought by Adaptec).
Rebuilding failed Linux software RAID Recently I had a hard drive fail. It was part of a Linux software RAID 1 (mirrored drives), so we lost no data, and just needed to replace hardware. However, the raid does requires rebuilding. A hardware array would usually automatically rebuild upon drive replacement, but this needed some help.
Handling Missing Data in Inputs Missing data can be very annoying to a programmer. In fact, it is so annoying that very often we'll write separate programs to clean up data and eliminate unpleasant conditions so that the main program doesn't have to deal with it. Here, I'll show some examples of the kind of problems we see.
More Perl Sorting Perl has an easy to use "sort" function. For example, you might have an array like this:
How "ps" Works And Why The simple "ps" command has generated a fair amount of confusion. Almost every Unix variant does it slightly differently; flags have different meanings and column headers or position also differ. This wreaks havoc with cross-platform scripts and has also caused bitter comments now and then. As I explained at I_WANT_A_BROKEN_PS , I had the same misunderstandings. Albert Cahalan (author of the Linux procps package, which includes "ps") noticed a newsgroup thread where I had made such a comment, and took the time to reply to me. After reading his explanation, I understand that I was quite wrong.
Two Safari's Look carefully at the image below. You see two Safari icons in the Dock (one third from the left, the other next to the app/doc divider), and also two Safari browsers open, both on the same site and page, but displaying very differently. The Font preferences are also shown, and this is what makes them different.
Perl Sorting Arrays often need sorting. Perl has built-in ways to help you, but as usual, there's more than one way to do it.
To play with the examples shown here, you'll need a file containing a few lines of words. I'll use this:
Understanding Floating Point Formats Under ordinary circumstances, you don't have to know or care how numbers are represented within your programs. However, when you are transferring data files that contain numbers, you will have to convert if the storage formats are not identical. If the numbers are just integers, that's fairly easy because the only differences will be the length and the byte order: how many bytes the number takes up, and whether it is stored lsb or msb (least signifacant byte or most significant byte first). Once you know that, conversion is trivial.
Recovering System After Upgrade Usually upgrades are binary: either they work or they don't. Actually, my experience with SME upgrades has been very good: I've only had a very few where the upgrade process didn't work at all. In those cases, you install new, apply all applicable blades, and then restore from backup. That's annoying, but fairly simple.
Transferring to New Hardware With a Supertar With any of the Supertars, transferring to new hardware is easy. If the new hardware uses the same disk controller (or the same driver) as the old, you can just boot from your recovery media and proceed to recover the system. But what about when the new hardware is different?
Getopt and Getopts Both "getopt" and getopts are tools to use for processing and validating shell script arguments. They are similar, but not identical. More confusingly, functionality may vary from place to place, so you need to read the man pages carefully if your usage is more than casual.
Neglect and Misunderstanding of Backups I had a call this week from a client who needed a file restored from backup. I had set them up with DVD-RAM and a Supertar a year ago, and had labeled five cartridges with Mon, Tues, etc. I know that (or thought I knew) they followed this rotation for a while, because I had used the previous day's backup to restore files for them earlier this year.
SME Server Local Networks and VPN's The SME Server (formerly E-Smith) normally rejects attempt to send mail outside of its own domain if you are connecting from somewhere other than the local lan. This is correct behaviour; otherwise anyone could use your server as a mail relay and you'd become an inadvertent spammer rather quickly.
Xinetd Xinetd is a replacement for inetd, which was the original Unix super-daemon used to start network services on demand. The reason for inetd goes back to days of low memory and poor memory management: you didn't want to keep a service running in memory if it was infrequently used. One process (inetd) would listen for connections on appropriate ports, and fire off the appropriate service when a request came in.
Kerio Mail Server The Kerio Mail Server is a cross platform ( Windows, Linux, and Mac OSX) mail server. I tested it on RedHat Linux 8.
MacOSX lookupd and NetInfo Changing Name Resolution Order
Name resolution is how your system figures out the actual IP address for host.xyz.com (and vice-versa). For most Unix systems, that function is provided by "named" and the configuration files are /etc/resolv.conf, named.conf, and perhaps nsswitch.conf. While you'll find a resolv.conf and even a named.conf on Mac OS X, you won't find named in the process list. Instead, MacOSX has a neat resolver capability controlled by "lookupd".
Random Numbers Random numbers are important for computers. Aside from making games like Solitaire more interesting, the use of randomness in generating passwords and encrypting data is critical to security.
Tightvnc, Chicken of the VNC VNC is "Virtual Network Computing" and is a crossplatform method of allowing remote access to desktops (Windows or Unix/Linux, Mac and others)). It is conceptually like using Terminal Services or PcAnywhere etc for Windows but is license free and of course capable of serving Linux/Unix machines also.
Python vs. Perl Perl folk seem not to like Python, at least not at first glance. It's easy to understand why: the languages serve similar purposes, but have annoyingly different syntax and structure. There have been converts, though, and Eric S. Raymond's experiences are probably not atypical.
Microsoft's Services For Unix Gosh, you'd never expect me to say something pleasant about a Windows machine, would you? Well, actually that's not entirely true: I've been known to grudgingly admit that while it isn't Unix, Windows XP Professional really isn't awful. In fact, if you can live without Unixy stuff at your beck and call, Windows XP is pretty good - there are even things I actually LIKE about it.
Lost Root Password (Linux) I have a very good memory. I remember most of my client's passwords (there are a few I forget regularly for no reason that I can understand, but I really do know most), I remember telephone numbers, and of course I know my own passwords. That last isn't as easy as it might sound, because I have quite a few different systems and each has its own password, but though I might use the wrong one now and then, I'll get it on the second or third try.
Securing POP mail access in MacOSX I always worry about my website. Security is serious stuff, and you really can't be too careful. I don't enable telnet, rlogin and use long, complicated passwords with ssh and so on. I use a shared webserver (http://www.interland.com) that allows me virtual root access, and I fortunately don't have to worry about things like sendmail; Interland keeps on top of that sort of thing for me.
Perl Input Perl has wonderful I/O capabilities. I'm only going to cover input here: reading from files or standard input. There are two ways to do that (actually a lot more than two, but this is supposed to be introductory material): you can open a specific file, or you can pass files on the command line and either open them individually or just ignore the whole thing and pretend everything is coming from STDIN.
Numeric Unix Error Messages It's an unfortunate fact that many programmers are lazy about error messages. Very often, all you get is a cryptic "Error 5", and you may be lucky to get that: sometimes all you get is an error return that you have to examine yourself with "echo $?". You can't even depend on that being the actual Unix error, but even if it is, what does it mean?
Mac OS X Panther upgrade A lot of folks have grumbled about paying $130.00 to upgrade to Panther, the latest version of Mac OS X (October 2003). I have to say that it is definitely worth it: maybe you feel cheated because you just paid for Jaguar six months ago, but you will be happy after you install this. The hype, for once, has reality behind it: this is as good as Apple said it would be.
Fork and Exec with Perl Recently I had a project that required a number of different programs that will mostly run all the time, but need to be restarted now and then with different parameters. Normally, the first thing I think of for a program that runs constantly is inittab or svc (daemontools). The svc facility is the more flexible of the two, and will be what I'll use in the final design, but in the "thinking" stages I played with using a Perl program launcher and controller.
Monitoring File or Directory Changes Many modern systems provide a way to watch a directory for events (new files, reading the directory, modification of a file in the directory, etc.). This facility can be done in various ways, from providing hooks in the filesystem code itself to something that watches for inode changes. Linux and BSD have several possibilities in that regard, including dnotify, changedfiles, and watch.
My Wife Hates my Mac First: I LOVE my Mac. It's my wife that hates it. I say that in the hopes of heading off a flood of defensive email. Don't bother to write me telling me how wrong this article is: you would be preaching to the converted. I already know that she's wrong, that's she is just hopelessly corrupted by the Microsoft way. I also know that I'm guilty of not training her in the basics of using this iBook, so yes, it's partly my fault. Or all my fault if you like.
In Defense of Unix (and Linux, of course) Warning: This article contains strong language and unpopular opinions. Reading of this material by Windows advocates may cause severe gastric distress followed by a desire to strike the author sharply about the head. As the author does not enjoy being pummeled, such persons are kindly requested to return whence they came and do something else.
Microsoft's Services For Unix Gosh, you'd never expect me to say something pleasant about a Windows machine, would you? Well, actually that's not entirely true: I've been known to grudgingly admit that while it isn't Unix, Windows XP Professional really isn't awful. In fact, if you can live without Unixy stuff at your beck and call, Windows XP is pretty good - there are even things I actually LIKE about it.
VPN's and Other Remote Access A VPN is a Virtual Private Network. The concept is that you are using public or other shared lines (generally the Internet) to connect machines, but that all packets are encrypted (so your connections are "private").
Installing a Small Office Network For many of us in the SCO world, office networks are a fairly new phenomenon. Many SCO systems are still happily using serial connectivity exclusively, even when Windows machines are part of the enterprise, and even when those machines maybe be networked between each other. In fact, some people even refer to serially connected terminals as a "network" (I won't use that here: if I say network, I mean an Ethernet network).
NT vs. Unix I think it was some Sun piece that said something like: "If all you ever had to do with an OS is install it, NT would be a great operating system".
Unix Permissions These are classic Unix permissions. However, many modern Unixes support extended attributes that go beyond this. We'll look at one example of that later in the article. You also need to know that Unix and Windows permissions don't map well to each other, so if you are using something like Samba or Visionfs , you need to understand how permissions will be shown and honored. Some examples of that are shown later.
Virtual PC for Mac OS X Virtual PC for Windows, Mac (OS 9 or X) and OS/2 creates virtual machines that can run multiple Windows versions. This is particularly advantageous for Mac users, but even ordinary PC users can find value in this. It's easy to have Linux, Windows 98, Windows ME, 2000, XP Home and XP professional all on the same machine.
Kernel Link Failures That's a pretty awful feeling, isn't it? You've got to link a new kernel because you need to change a value or needed to add something, and it fails.
Granite Digital SMARTVue for Mac OS X Self-Monitoring, Analysis and Reporting Technology (S.M.A.R.T) is built into most newer hard drives. S.M.A.R.T records a number of "attributes" that can be reported. These are things like Seek Error Rate, Spin Up Time and more which could help warn of impending difficulties. This predictive and warning function is part of the value for products like Granite Digital's SMARTVue.
Operating System Concepts The CPU (Central Processing Unit) is the heart of any computer, but the operating system is the brain. Unfortunately, understanding exactly how these things really work can be difficult, because it's fairly hard to "play" with the operating system that you are actually using. You can do quite a bit with sophisticated debuggers, but eventually you run into confusion and difficulty.
Using the shell (Terminal) in Mac OS X Many Mac OS X users won't have any need to use the Unix shell that underlies their graphical interface. Some will likely disdain the very idea, but for those adventurous enough to try it, a whole new world awaits.
Setting up Netcat Printers Boy, I like netcat. Just finished converting one client's SCO 5.0.5 system from Berkeley LPD to netcat and recommend the change to anyone now using LPD to print to dedicated print servers.
How secure do you want to be You probably get a good deal of email, letters and phone calls warning you about computer security. The general idea is the same: your systems are threatened, we can stop the threat. The cost of the remedy is seldom mentioned up front. but there are lots of buzz words to make up for any lack of specifics. "Intrusion detection", "secure firewall", "hackers", "Security assessment" and more.
How can I print to a remote PC that does not have a static IP address? This is a fairly common problem: you have a PC at home and you make some sort of connection over the internet to your server, but your application needs to print to your PC. That would be easier if your PC had a fixed, constant IP address, but your connection is dynamic so it changes.
There are many, many ways to solve this problem. So many, in fact. that I'll probably miss one or two in this write up. If I do miss something, do let me know: it may help someone else down the line.
Triple Threat Good things come in small packages, but large things aren't always bad either. That must have been the thought someone had in designing an email newsletter for their customers. Apparently they had quite a bit of news; this particular piece of email was 34 megabytes when it arrived at the Mitel SME (E-Smith) server of one of my customers.
Network Neighborhood, Visionfs, Samba Authentication and all that Unix and Linux machines have been able to provide Network Neighborhood style file and print services for some time now, but I constantly see confusion and problems due to misunderstanding of how these things work.
I'm going to use an example from a real situation involving an XP user and a SCO Visionfs network. The concepts of this apply to Linux, Mac, Samba: it doesn't really matter.
Device::SerialPort on Redhat 8 The end of life for Redhat 6.2 security updates happened at the end of March. Because of this, I have been upgrading our remote buildings with Redhat 8. Since each building has a T1 router, I wrote a small program to log the routers messages to a text file.
DSL and Cable Modem Security Although high speed internet access may not have reached you yet, it probably will soon. The advantages are obvious, but there's a dark side: security. I'm not going to talk about the more general aspects of securing your system here (I've done that in General Security), but only specifically about the issue of clear text passwords with telnet, pop, and ftp.
Setdate The "setdate" is just a more user-friendly front end to changing the date and time:
Counterpoint on Red Hat Linux Counterpoint (http://www.synchronics.com) is a provider of point of sale and accounting software.
Shell Bashing It was about three o'clock on a Thursday afternoon when Kevin called me.
Basics- ssh This article primarily discusses OpenSSH. If you are using SSH1 or SSH2, some of what is covered here will not apply to you or may have slightly different syntax.
Hylafax for OSR5 You'll probably save yourself a lot of trouble if you just decide now that a better place to run Hylafax is on a Linux machine.
SCO OSR5.0.6 Because of an unexpected schedule change, I found myself with a whole day open one recent Tuesday.
Peek Peek, by Computronics (http://www.computron.com/), is a user monitoring/control tool for character based applications. Most Unix platforms are supported, including Linux and SCO OSR5.
Cron, Batch and At These three commands are used to run commands at some other time. They differ in their usage, their environment, and their default actions, so are sometimes a source of confusion.
User Friendly Date Script Setdate
The "setdate" is just a more user-friendly front end to changing the date and time:
Connecting to the Internet Connecting to the Internet
This article is a basic overview to get you started. There are other articles here that cover certain details in more depth. You may also want to read:
Why is my system so slow? This is not a performance tuning article. If your system is always slow, this article may not be what you are looking for. I'll be covering some general performance related issues here, but the main focus is for the system that was running fine yesterday but is sucking mud today. The typical response to such problems is "Reboot it", and while that may indeed fix the problem, it does not address the root cause, so you are likely to have the situation again.
Sendmail Sendmail can be a little scary. If the 1,000+ page O'Reilly reference doesn't give you pause, the cryptic configuration files probably will. But actually, if you can put up with a little pain to get by the basics, Sendmail really isn't all that difficult. It is complicated, but a few "rules of the road" will allow you to understand it.
Why not differential backups? I get this question frequently. It's usually triggered either because the tape device can't hold an entire backup set or because the time required for backup interferes with productive work. Most of the time this can be easily remedied by a larger or faster storage device, but someone is bound to bring up the idea of differential backups.
The idea is that you create a full backup that has everything, and from then on, you only backup the files that have changed. Presumably that's a smaller set of files and therefore this solves the space or time problems. Usually the full backup is refreshed on some schedule and the process starts again. There are variants on the theme; for example the differential may include all files that have changed since the last full backup rather than just those that have changed since the last differential. That sort of scheme eventually ends up with the differential containing any and all files that ever change, no matter how infrequently; the full backup is the source of everything else.
Library Cross Reference This is a cross reference of libraries needed by Skunkware and other binary packages and where to obtain the library or other needed tool. You know you need a library when the program fails to work; sometimes it is friendly enough to tell you what it needs, but sometimes it is not.
Multitech RF550VPN SOHO VPN Router Multitech's new SOHO RF550VPN Router is an inexpensive ($179.00 list ) Internet access router with VPN capabilities suitable for home or small office use.
Features not found in lower end products include
- Five (5) IPSEC VPN tunnels
- Automatic dialup to emergency ISP if WAN connection fails
- Both client and WAN side filtering
- Virtual servers (inward port redirection)
- Redirect RF550VPN logging to a syslog server
- Flash upgradable firmware
Using sudo Most Unix systems have some way of letting ordinary users perform certain tasks as root or some other privileged user. SCO Open Server has "asroot" and can also directly assign "authorizations" such as backup privileges or being able to change other user's passwords. SCO Unixware/Open Unix 8 have a similar facility in "tfadmin". Many Unixes, and Linux, use "sudo".
The configuration of sudo is by the /etc/sudoers file. I'm sure that there are more poorly written man pages, but "man sudoers" is among my all time favorites for obfuscation and poor explanation. The creation of the file and the actual use of sudo isn't all that bad though.
RS232 Wiring Diagrams Meanings of pins in DB25 order:
Backlinks (http_referrers) When a web page is accessed by a link from some other page, the address of the other page (the "referring page") is made available to the web server. We can pick that information up from logs or as the page is being displayed. For example, if we have Server Side Includes or php, we can pickup the referring page from an environment variable. Here's a snippet of Perl code that does that:
$frompage=$ENV{HTTP_REFERER};
$thispage=$ENV{REQUEST_URI};
Yes, there's a missing R in HTTP_REFERER. Yes, that's wrong, but that's what the variable is so that's what you use.
Simple User Request Forms We often have the need for simple forms that request certain actions like adding a new user, etc. A simple perl script lets us do this with a web form that then emails the results.
The example here can be modified to meet your needs. The things that you need to know are noted in comments.
Tape Drive or CDROM Not Found Creating a tape drive or cdrom should be simple: run "mkdev tape" or "mkdev cdrom" and answer the questions, relink a new kernel, reboot and it is done. Unfortunately, people seem to have a lot of problems with this.
(For the remainder of this article I'll be referring only to tape drives. Everything said applies equally to cdroms or indeed any scsi or ide device being added).
SME Server (E-Smith) Mail Forwarding, Lists, Etc. The Mitel Networks SME Server (formerly E-Smith)is a friendly web server and e-mail gateway. The original E-Smith is now called Mitel SME Server V5. There is also a hardware/software bundle referred to as the Mitel 6000 Managed Application Server. Here we cover forwarding email to another mail account and mailing lists.
Noted in Passing June 2002 These are things I'm too busy too look into in depth, but caught my interest somewhere recently, and might be of interest to you also.
SME Server V5 Virtual Domains The Mitel Networks SME Server (formerly E-Smith) is a friendly web server and e-mail gateway. Here we cover creating a virtual domain and giving a user or users ftp access to it.
Notify Cell Phone of Incoming Mail Read this Disclaimer
Many cell phones now have the ability to receive email. While that can be very useful, large messages are often a problem both because they are hard to read and because one large message may be split up into multiple messages at the phone.
Sometimes, though, it's important that certain messages get to you even though they may be large. That's the situation one of my Mitel (E-Smith) mail server customers had: mail sent to a certain account was very important to know about, but he didn't want the entire message shipped to his cell phone. As it turns out, this was an easy problem to solve.
SCO Openserver release 5.0.7 Disclaimer
There is a lot to like in the 5.0.7 release of SCO Openserver. Support for IDE CD-RW and DVD-RAM (you need other tools to actually write to this media, but the important kernel support is built in), more USB devices (though not printers or modems), P4, Xeon, and AMD Athlon processors, UDMA 100 and 133 hard drives, PCI serial and parallel cards, LS-120 and LS-240 IDE drives (see "man Sflp", not "sflp" as the documentation suggests) , several Gigabit network cards, and more PCMCIA support.
The Netscape server is gone, replaced by Apache, OpenSSH is built in, sendmail is at 8.11 (which of course will need immediate updating), and you now have a choice of Mozilla or Netscape for GUI browsers and Lynx is included for character mode.
Too many messages for Outlook Express Read the Disclaimer
Recently one of my Mitel SME Server clients took two weeks off. When he returned, Outlook Express told him he had 23,000 messages waiting on the server! Unfortunately, Outlook Express couldn't bring any of those messages to his PC; it just hung.
Why Production servers shouldn't have external interfaces Read the Disclaimer
People sometimes want to use their application servers as firewalls. This seems attractive at first glance: slap in another network card, add some packet filtering, tighten the system down a bit and connect it to the outside world. Cheap and quick, but a very bad idea.
Linux Logical Volume Manager (LVM) on Software RAID Read the Disclaimer
Logical Volume Manager is now included with most Linux distributions. The RedHat 8.0 installer even allows you to create LVM volumes during initial install. LVM offers capabilities previously only found in expensive products like Veritas.
3.2v4.2 System Recovery Disclaimer
I was called in recently to help with the recovery of an old SCO 3.2v4.2 system that had crashed. The crash had initially been caused by a power supply failure, but after replacing that hardware, the machine would not boot - it just hung after the kernel i/o buffers message. As a common cause for that is simply a missing or damaged inittab, I thought we might be able to fix it by booting from floppies and doing a manual repair. Unfortunately, there were no emergency boot floppies.
Understanding IPTABLES Disclaimer
Packet filtering is something I've always hard a hard time getting my head around. Not the basics; that's easy
enough. It's just the incredible level of detail, the difficulty of keeping it all in your head at once.
And then, of course, there are all the different flavors: ipfw, ipfilters, ipchains, and now iptables. It gets more
than a little confusing, and I've never taken the time for more than a cursory look at any of them.
Why run your own mail server? Disclaimer
First, The Consultant
Recently I was working with another "consultant". I've deliberately put that in quotes because this person really lacked the skills to do the job he was doing, but for political reasons I had to refrain from pushing him out of the way and taking over. His lack of basic knowledge was frustrating, but I gritted my teeth and kept my comments friendly. It wasn't easy.
Anyway, part of what he was doing was configuring a router. I had to hold my breath as he explained that he always left the default password unchanged because "it's easy to remember". After he left, and with the permission of the owner, I changed that. It's just this funny idea I have that a router sitting on the Internet ought not to have a password that is known by a few million people and published on hundreds of websites. I'm funny like that.
How secure do you want to be? Please read this disclaimer
You probably get a good deal of email, letters and phone calls warning you about computer security. The general idea is the same: your systems are threatened, we can stop the threat. The cost of the remedy is seldom mentioned up front. but there are lots of buzz words to make up for any lack of specifics. "Intrusion detection", "secure firewall", "hackers", "Security assessment" and more
|
|