Blogator.com



Sponsored area:

Troubleshooting,Basics,Linux,MacOSX,Microsoft,Networking,Printing,Mail 2010/03/15 I was helping someone troubleshoot a network problem last week. As it turned out, the problem was very physical: a light fixture had fallen down and loosened some connections to a switch. Both the existence and the location of that switch in relation to the rest of the network had vanished from institutional memory so much of the testing we were doing didn't make sense and was hard to interpret. In fact, it was so puzzling that I drove on-site with more sophisticated testing equipment, only to find that someone had noticed the fallen fixture before I arrived. Problem identified and solved, but it did prompt me to look for a general "Network Troubleshooting" page here and I was a bit surprised not to find one. Oh, sure, there is a lot here about network problems, troubleshooting and solutions. I also have a chapter in my Unix/Linux Troubleshooting E-book but even that isn't quite what I wanted. This post attempts to provide that resource. It is a general overview with links to more detailed information. The Basics If you are going to do network troubleshooting, you need basic knowledge and basic tools. If you don't understand basic TCP/IP communications and routing, that's where you need to start. Here are some articles here that can help: Networking 101 Advanced TCP Routing CIDR If you aren't sure of your understanding, you might at least review those articles. You might a
Employment 2010/03/13 I quit early Friday afternoon. I was in a foul mood, partly from lack of sleep the previous two nights, but also because it had just been a crappy, good for nothing week and by 1:00 PM on Friday, I'd had enough of it. I shut down my computer, turned off the lights and left my office. Actually, financially it had been a good week. In fact, the past month has been decent - if the year keeps up with this, we'll do much better than 2009. Paradoxically, that was also contributing to my end of week funk, because most of the income was from distasteful work: transferring old Unix systems to Windows, and resurrecting crashed machines. It's all money, but none of it is satisfying and often it's one time billing - I may never see the customer again when they've moved to Windows and if I do see them, most of that will be stuff I hate like chasing Windows viruses. My wife doesn't really understand that. "It's just money", she says, "What difference does it make whether it's a Unix problem or Windows?" It matters because I don't like the Windows philosophy of monolithic programs not designed to work with other programs. It matters because chasing viruses isn't doing anything productive. It matters. I was also less cheerful because I may have fired a customer Friday morning. I say "may have" because it's up to them: they have unpaid invoices 60 days old and as much as I may commiserate that times are tough, I'm not going to keep supplying services t
Misc.,Web-HTML 2010/03/06 We ordered a Roku box last week. If you don't know what that is, it's a little Internet connected box that lets you stream content to your TV. The funny thing about that is that if you had asked me if I wanted something like this two years ago, or five years ago, or indeed even twenty or forty years back, I would have said 'No". I would have even been mildly amused by the very idea of it because we hardly ever watched movies - so why would we want something that brought movies to our TV? Oh, I don't mean we never watched a movie. Once in a great while we'd venture out to a movie theatre and from time to time we helped make the cable TV industry wealthier by subscribing the HBO and even though we only did that to watch The Sopranos, we'd watch a movie now and then. But we weren't "big on it". Not like my sister, for example, who seems to have seen just about anything and everything you ever heard of. Mention a movie and she has likely seen it. Mention the same movie to us and you might get a blank stare. We just aren't Movie People. Introducing Hulu I don't know when I first noticed Hulu - probably not very long back because, well, remember? We aren't Movie People. What brought me to Hulu was a TV show that we wanted to see but missed - I don't remember now what it was, but I found it there and we watched it. The experience wasn't great, a little choppy now and then and with sound lagging behind the video sometimes, but hey, we got
Linux,OSR5,Backup 2010/03/03 Microlite will soon be releasing a new version of BackupEDGE. The cost to upgrade from a 2.x version will be $250.00 (unless you just bought 2.x in 2009 - it's $100.00 in that case). However, if you act RIGHT NOW (and I mean literally now because this price is going to change very, very soon) you can buy a support contract that entitles you to a free upgrade to the new version. Microlite charges $160.00 for that support contract. When the new version comes out, the contract price is also going up to $200.00 per year. I can sell it to you for $140.00 IF YOU ACT NOW! This is a great opportunity from Microlite - but you have to move quickly. Email or call me NOW. See http://www.microlite.com/ for more information on the new version. Comments: Click Here. Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. If you have any question, please do feel free to contact me. - Skills Tests - Psst - wanna work for yourself? - Unix/Linux Troubleshooting e-book - Kerio Mail Server - Consulting - Advertise Here
Employment,Security 2010/03/02 I previously talked about how the new "201 CMR 17.00: STANDARDS FOR THE PROTECTION OF PERSONAL INFORMATION OF RESIDENTS OF THE COMMONWEALTH" regulations might affect me and my customers. Here I'd like to take a closer look at what the regulations seem to require. Please remember that I am not a lawyer and not a certified security expert. My purpose here is simply to raise questions that you and your customers may want to discuss with a lawyer, insurers and or a security firm. As the fines for non-compliance could be quite large, this is not something you should ignore. So. let's get started. The regulation starts off like this: (1) Every person that owns or licenses personal information about a resident of the Commonwealth shall develop, implement, and maintain a comprehensive information security program that is written in one or more readily accessible parts and contains administrative, technical, and physical safeguards that are appropriate to (a) the size, scope and type of business of the person obligated to safeguard the personal information under such comprehensive information security program; (b) the amount of resources available to such person; (c) the amount of stored data; and (d) the need for security and confidentiality of both consumer and employee information. The safeguards contained in such program must be consistent with the safeguards for protection of personal information and information of a similar character s
Linux,Virtualization,Programming 2010/02/27 I have a number of customers running older Linux apps. Sometimes they have source for the app, sometimes they don't. Sometimes the original app vendor still exists and is willing to be helpful, sometimes they are out of business or uninterested in the old app because they want to sell something newer. Often the app will make a graceful transition across operating system upgrades and changes. Sooner or later though, it probably breaks. Sometimes the fix is simple. Defining and exporting LD_ASSUME_KERNEL might let an older app run on a newer kernel. Sometimes it takes a bit more. I recently had an app that had come from RedHat 6 days and had successfully aged until the latest Debian stopped it cold. To solve that, I asked "ldd" to show what libraries it used. That returned: linux-gate.so.1 => (0xb7fac000) libm.so.6 => /lib/i686/cmov/libm.so.6 (0xb7f7c000) libc.so.6 => /lib/i686/cmov/libc.so.6 (0xb7e21000) /lib/ld-linux.so.2 (0xb7fad000) You can ignore linux-gate. That meant I needed ld-linux.so.2, libc.so.6 and libm.so.6 from a system where the app worked. I copied them to the new Debian and stuck them in a new directory I called /oldlibs. I then changed the calling script to look something like this: LD_LIBRARY_PATH=/oldlibs export LD_LIBRARY_PATH /oldlibs/ld-linux.so.2 oldapp If you just type "/lib/ld-linux.s0.2", you'll see what's going on here: Usage: ld.so [OPTION]... EXECUTABLE-FILE [ARGS-FOR-PROGRAM.
Employment,Security 2010/02/22 Massachusetts has a new data security law going into effect on March 1st, 2010. Frankly, it scares me. Here's the problem: most of my customers are in Massachusetts or do business with MA residents. Most of my customers are NOT in compliance with these new regulations and I am very concerned about my exposure to lawsuits if they are ever sued because of that. I am not a lawyer. I may have some idea of how the new law applies to specific situations, but I'm not in a position to interpret regulations. Do you need to upgrade an old RedHat 8 or SCO 5.0.6 system because they may not meet security requirements and are on the same network as a machine that handles personal information? I DO NOT KNOW. I'd sarcastically note that your lawyer doesn't really know either: if there's a security breach and somebody wants to sue you, their lawyers will be looking for anything they can blame on anyone, so my bet is, yeah, they'd be trying to pin blame on any old OS on the network. But - I DO NOT KNOW. I am not a security expert. I don't even like thinking about security. I'm a trusting person: I trust people, I want them to trust me. I truly hate that there are people in this world that you cannot trust, so that makes it very hard for me to get interested in security. Does your Windows 2000 server present a security risk? Probably, but I DO NOT KNOW. Frankly, I don't WANT to know. I had a conversation this morning with another consultan
Employment 2010/02/22 I know times are really tough for many people. Here in America, we have incredible opportunities to succeed, but our social safety net has a lot of big holes in it - you can fall right through to complete disaster. If you do fall, it can be very hard to move back up, but I fully believe that the best way upward for many of us is self employment. Self employment doesn't mean automatic riches. It may not even mean riches at all. Many self employed people earn a decent living, but we can be affected by recessions and depressions just like any business. I just finished up our 2009 taxes and realized that our gross income was about 55% of what it was 5 years ago and 20% less than what it was last year. That's quite a pay cut, but it does illustrate one of the great advantages of being self employed: I may have less income right now, but I still have income. When you work for yourself, you don't get laid off - unless you've done something very dumb (such as only having a handful of customers), you will always be bringing something in. By the way, I did much better in January and February is also doing well - almost seems like old times.. I don't dare think that things really are about to turn around, but it was nice to have a good run again. We'll see what the rest of the year brings. Are you taking advantage of the lull? Not being busy brings opportunity. When you are running flat out, you may be making money hand over fist, but you probabl
Virtualization,OSR5 2010/02/17 Although many an old SCO box has been replaced by Linux or (shudder) Windows, many others still chug along in server rooms across the country. Sometimes the server remains alive because of stubbornness, sometimes it is just rank ignorance, but more often it's simply that any replacement is economically difficult. The SCO server is kept alive because the company using it can't afford any alternative. I have a number of resources here about converting or maintaining SCO systems. Most of these old systems run on SCO's 3.2v5 operating systems. These date from 1995 (3.2v5.0.0) to 2003 (3.2v5.0.7), so the newest of them is seven years old and are often running on hardware of the same age. Never mind security, operability or anything else: it's downright scary to be running on hardware that old. Unfortunately, installing SCO on anything current can be difficult or even impossible as driver support melts away. As of this writing, it is still possible to install SCO 5.0.7 on generic hardware but when you start getting into RAID systems it can be very hard to find drivers and even network cards can cause some difficulty - it's all become nasty enough that I refuse to do any such work on anything but a flat time and materials basis with no guarantees of success. If the system is older than 5.0.6 and can't be upgraded to at least 5.0.7, I may refuse it anyway - it's just too unpleasant. Life sucks for old SCO owners. SCO has made things a bit
Kerio 2010/02/12 Kerio Mailserver has changed its name to Kerio Connect with the 7.0 release. This is a free download for all current licenses and of course retains all previous users, mailboxes and settings. This is a name change - Kerio Connect is still the same mailserver and no earth-shattering changes have been made. However, there ARE changes in this release that you need to know about. The definitive source for that is the release notes and the manuals, but I'll give you a quick overview here. Browser based administration While the administration client is still available, the preferred administration tool for Kerio Connect is now your browser. By default, this is on port 4040, so you would point your browser at http://yourmailhost:4040/admin/login/ to gain access. There's no control over that port in Administration. However, it is listed in mailserver.cfg, so you could adjust this as necessary. The first thing you'll probably notice is that account functions have been moved to the top. This makes sense: after initial setup, that's the section you are most likely to be using. By the way, I really recommend taking the time to run through every section. You may have missed or forgotten about settings that I won't mention here because they have been in previous releases. I do that myself every now and then because I forget things. In most cases the manuals should answer any questions you might have about a particular setting, but do feel free to call me if
Web-HTML,Blogging 2010/02/11 I see Google Buzz as being a wonderful tool for real conversations. Unfortunately, too many people are seeing it as yet another Twitter. Google has unfortunately helped create that bad impression by offering to republish Tweets in Buzz. That's a bad, bad idea: I've already shut that off in my account and I'd strongly advise everyone else to do the same ( though if you weren't misusing Twitter to begin with, this wouldn't have been as much of a problem as it is). Google made another mistake in duplicating Buzz posts to your email. Some people may want that, but most of us probably do not. Right now, there doesn't seem to be a way to shut that off. You can try to create a filter to delete Buzz posts, but your filter runs the risk of deleting legitimate mail. Google needs to fix that. Buzz also needs better organization. Related threads should be able to be grouped together. There's no way to do that now. Is Buzz a bust? I don't know. I still think it could be very useful, but I also see that these errors could kill it before many people realize that. Comments: Click Here. Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenev
Web-HTML,Blogging 2010/02/10 I've been playing with Buzz for a few hours. There is no question about it: this is Wave Light. There are already plenty of posts whose authors don't understand that - they think this is a Twitter or Facebook clone. No - it's much more than that, but those people never understood Google Wave either, so they won't grok this. I'm just going to link over Buzz related comments from that Wave post and leave it at that. Comments: Click Here. Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. If you have any question, please do feel free to contact me. - Skills Tests - Psst - wanna work for yourself? - Unix/Linux Troubleshooting e-book - Kerio Mail Server - Consulting - Advertise Here
Web-HTML,Misc. 2010/02/06 For the past week I've been playing Hold-em on Facebook. Let's make one thing perfectly clear immediately: this is nothing at all like playing poker with real money. As proof, consider that I, a moderately (and only moderately) skillful player, began the week with a $1,000 play money bankroll. As I write this, my fake bankroll stands at $423,027. If you seriously think that anyone, never mind me, could accomplish that feat in the real world, well, I'd like to sit down and play poker with you. I'm sure we'd both enjoy it. Anyway, even though FaceBook Texas Hold-em is full of "Bingo" players (people who make ridiculous bets with any cards at all) there seem to be enough serious players there that you can (with a little effort) enjoy a good game now and then. The path to a good game requires getting rid of the Bingo players. Interestingly, it's not that hard to do. For those who don't understand the game, in Texas Hold-em you are dealt two cards. Everyone bets based upon what they now have (or would like other players to think you have). In a real game, a typical bet at this point would usually be not more than three or four times whatever the minimum bet is. The reason is that you really don't know what you have - there are more cards to come. A pair of Aces in your hand is certainly good, but it's hardly a guaranteed win. In a tournament, a player might push in all their chips with Aces if the situation is ripe for that play - if i
MacOSX 2010/01/29 The iPad is still not much more than pages on Apple's web site, but already some folks are telling us that it's unimportant, a bust, a no-show, insufficient, ill-conceived and all that. That some of those nay-sayers cast similar barbs at the iPhone could be amusing, but I wouldn't argue against most of the complaints: they are absolutely correct that Apple's new device has warts. And they are absolutely wrong that it will be a failure. The iPad is a game changer. The people carping about its defects are missing the bigger picture - devices like this will ultimately change the way we use our computers. Consider the form factor for a moment. No, the iPad doesn't roll up to fit in your pocket (though some future device like this might). But at 9.6 inches diagonal and with 720p resolution, it is big enough and sharp enough for pictures, TV and movies and, of course, books. Yeah, yeah, E-ink is "better" for books, but that misses the big picture - the iPad has books AND everything else. It also has apps. The existing 140,000 iPhone apps and many more to come that will take advantage of the larger screen real estate. Among those apps are a few that implement some very important three letter acronyms: RDP, VNC and SSH. Those three will make the iPad the perfect choice for technology workers. Set your iPad in its keyboard dock and connect to the company server. But what most everyone is missing is that you'll probably end up using this the same w
Security,Kerio,Mail,TCP-IP,Spam,Networking,Linux,MacOSX,Microsoft 2010/01/19 I was recently contracted to help another consultant sniff a customer's network for suspicious activity. The situation was that the customer had been put on blacklists because some internal machine had apparently been compromised and was sending out spam. Obviously the first task was to find and clean up any infected machines. The consultant contracted that out to someone else who updated virus software and ran scans. Unfortunately, that person didn't provide details of his work - he just reported that he had found and fixed "some problems". This didn't leave anyone feeling confident that the problem had actually been dealt with. I pointed out that, if possible, all machines other than the internal mailserver should be blocked from sending email (other than to the internal mailserver, of course). Ideally, they should be locked down to only whatever outgoing ports are absolutely necessary, but blocking 25 and 465 is a good start. That was done, but my contact still wanted to know how to sniff what is actually happening on the network. I had him buy a DualComm port mirroring switch and arranged to meet him at the customer site. The DualComm is an inexpensive 5 port, USB powered switch that, by default, mirrors port 1 to port 5. It's small enough to keep in your laptop bag, cheap enough that you can leave it at a customer site and the USB power means one less outlet to hunt for. The de
Blogging,Web-HTML 2010/01/14 Google's Custom Search engine is generally accurate at finding the results I'd like it to find when searching this site. However, sometimes it doesn't find what really is the best result. Until now, there hasn't been much you could do about that. The new "Promotions" feature gives us a way to help. Simply, you define keywords, a title and a link. If those keywords are used, your link appears above all the normal results. You can define more than one promotion. For example, if you type "laserjet" into the search box at the top of this page, you'll see that I have added two promotions: one for "netcat" and another for escape sequences to select trays. I think those links are likely to be more important than what Google selects by itself. This is new (I just found out about it this morning), so I haven't added very many of these yet. I don't know what limitations Google has on the total number of promotions or the number per keyword. but I'm sure I'll be using as many as they will allow. Better search results mean happier visitors, right? Comments: Click Here. Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I
MacOSX,Perl 2010/01/11 As I mentioned at Internet Scrabble (the name Scrabble is a trademark of Hasbro, Inc. in the United States and Canada and of Mattel elsewhere), our family has been enjoying playing Scrabble on-line. Aside from the fun of playing, it gives us another reason to keep in touch with each other - the small interactions in the chat windows are part of our involvement in each others lives. i have also been playing with strangers. When I first started that, I was a little shocked by some of the word usage. In our family games, we had never allowed slang, abbreviations, or foreign words. If you had a Q and no U, you were stuck - there was no QI or QAT or QANAT in our games. Isn't that why a Q is worth 10 points? If all it takes is an I to play it, it shouldn't be worth much more than H, should it? Well, that's not how Scrabble is played today. Foreign words, abbreviations, old English and slang have found their way into TWL (The Word List). It almost seems that you can toss down three or four random letters and have a good chance of being able to create a valid Scrabble word. Of course you have to know the words. With the Facebook version, you can guess and let the dictionary correct you, but if you ever want to play face to face, that won't work. You need to learn more words. Not just any words, though. While a large vocabulary isn't a bad thing to have for Scrabble, you can improve your scores by just concentrating on the two and three letter words
Basics,Security,Linux,MacOSX,Microsoft 2010/01/07 I and other people here have mentioned TrueCrypt before. I thought (and perhaps you did too) that it was very simple and obvious to use but I've had several people write to me complaining that they downloaded and installed it, but have no idea what to do next. OK, maybe the interface isn't all that user friendly. It really is simple, but after looking at it from an "ordinary person" perspective, I can agree that it could leave you staring at the screen saying "Huh?" So let's run through using this in plain English. What you don't want to do The most common fear I heard from people was that they were afraid TrueCrypt was going to encrypt their hard drive and that something would go wrong or they'd forget the password. Yes, TrueCrypt can encrypt entire hard drives, and yes, things could go horribly wrong or you could forget your password. So, yes, you have reason to be concerned. I definitely would NOT advise using TrueCrypt for that purpose unless you completely understand what you are doing, what the risks are, and (perhaps most importantly) WHY you are doing it. Most of us need to protect individual files. Maybe you have a text file with all your passwords in it. Maybe you handle sensitive documents for your clients. Whatever it is, you usually don't need to encrypt a whole drive. You just need to lock up those particular files. Protect a file or files This is the simplest and safest TrueCrypt operation.
Web-HTML, 2010/01/02 Our family has recently discovered online Scrabble (the name Scrabble is a trademark of Hasbro, Inc. in the United States and Canada and of Mattel elsewhere) through Facebook. We've been a Scrabble playing family for many decades; we all love the game, but we are seldom all together to play and even when we are, we usually have other things to do. Internet Scrabble changes all that. You can make one move per day or even less. More importantly, you can play more than one game at once: I have one game going with my wife, one with each of our daughters, and one with the four of us. I also have more games going with friends and a few with strangers. I can spend as much or as little time playing as I like - and so can all my opponents. Playing Scrabble on-line is different in other ways. There's no arguing about words: the game enforces acceptable words. On the other hand, words our family never would have allowed in home games can be used; in one of my first games with a stranger, I was shocked to see "NGWEE" appear. That word is the Nigerian unit of currency, but I'm sure you knew that. I'm sure you also know that "AA" is a dry from of lava and that "DUIT" is a Dutch coin - and that all of them are acceptable words in Facebook Scrabble. Another issue, especially when playing with strangers, is the easy availability of on-line anagram solvers. In our family games, we allow checking the dictionary for spelling and minor word-hunting, but
Web-HTML,Blogging,Perl 2009/12/29 This is a continuation of Detecting Comment Spam, Part 2 In the previous posts in this series, I've said that spammers habits allow us to detect their attempts to leave inappropriate comments. I use these techniques here and am able to send most spam comments directly to the bit-bucket without ever having to examine them myself. When I suspect spam but am not sure, I just send the comment to moderation. In practice, very few spam attempts get by the automatic filters. The code I use is a hodgepodge I developed over many years of fighting spam comments. I need to rewrite it and my thought is to move toward a scoring system similar to that used by Spamassassin for mail spam: each "bad habit" increases an overall spam score and the final judgement is made based on the total score accumulated. To that end, I have been pulling out the various tests I use now and examining them. Some always cause the comment to be treated as spam; those would add enough points to ensure that would still happen. Other habits now cause moderation, but in my new design each of those will increase the spam score. Any spam score at all is cause for moderation, but if the post accumulates enough minor points, I can skip that and just throw it away. By the way, there is an effort to create a BlogBlogSpamAssassin. Seven (or more) habits of ineffective spammers I'll be reviewing things covered in the previous two posts and will introduce some new ideas.
Web-HTML,Blogging,Perl 2009/12/23 This is a continuation of Detecting Comment Spam, Part 1 In part 1, I talked about code to read a list of spammish words from a file and look for those words in comment posts. Commenters pointed out that spammers will obfuscate words with dashes, spaces, bizarre spellings and so on, making it very difficult to catch these programmatically. That's true, but there's more to the story. The spam list I use here has some of those common spam words, but most of it is taken up with web addresses. Links are much more difficult for spammers to mangle - they can use redirection at the destination site, but the site itself is static: if a spammer wants you to visit some page at Iamaspammer.com, either that name or its IP must be in a link. Most of my spam list is websites that have been the destination for spammers links. Once the site is in my list, the spammer can never post anything with that link in it - no matter how they mung other words, they will never be allowed to post. A comment here that contains one of those links doesn't even go to moderation - it just gets flatly rejected. Spammers do move on - jklljas.blogspot.com may be a spam link now, but it will get abandoned eventually. I trim the list every month to remove old entries. IP Blocking Should't I just block the spammer's IP from leaving comments? Yes, but spammer's IP's change over time - their IP gets blocked everywhere so they move on. If you block a particular IP fore
Web-HTML,Blogging,Perl 2009/12/21 Suppose you were writing a commenting system for a website and you wanted to check user input against a list of words that might indicate spam. You'd want the list of suspicious words in a file and you'd run through that list. An easy way to do that in Perl is to use Perl's "grep" command. We'll start with a program that won't work. This will show a side effect of grep you need to be aware of: #!/usr/bin/perl # Build the "comment" while (<>) { push @TST, $_; } # Now test against our list open(SPAM,"spamlist"); while (<SPAM>) { chomp; if (grep /$_/, @TST ) { print "found $_\n"; } } You need this code and a "spamlist" file. You'd put the words you want to match in that file. For the purposes of this article, I'll assume that "fribble" is NOT in the list. Therefore, if you run this little script and type "fribble" and press Enter and then Cntrl-D, you'd expect no response - "fribble" isn't in the list of spam words. But that's not what happens. When you run the program, type "fribble", it seems like "fribble" (or any other input) matches every word in the list. That can't be right, can it? The problem is that "grep" modifies $_ in your loop. That's simple to fix; we set a temporary variable: #!/usr/bin/perl # Build the "comment" while (<>) { push @TST, $_; } # Now test against our list open(SPAM,"spamlist"); while (<SPAM>) { chomp; $testing=$_; if (grep /$testing/, @TS
Linux,MacOSX,OSR5,BSD,Basics 2009/12/14 This is a continuation of Unix and Linux startup scripts, Part 2 So, after being rudely interrupted by a server crash and a few days of website migration, we're ready to continue exploring Unix and Linux startup scripts. We looked at both System V and BSD methods; until fairly recently that would have been the end of the discussion: if you were running Unix/Linux, your system used one or the other of these. Not everyone was satisfied, though You can see the hints of unhappiness in the script directives that crept in to BSD startup scripts. More fine grained control was needed and neither System V inittab nor the BSD rc scripts provided enough. Why replace init? One reason is boot speed. Even when scripts can be run in parallel as in SCO's prc_sync "P" scripts , running mostly serial shell scripts takes time; you and I and everyone else want our systems up NOW. But it's not just that. if you step back and look at init objectively, it is just a program starter. That was certainly true with the original BSD /etc/rc and inittab only added a bit more complexity. Init is a "starter", but so are inetd /xinetd, at and cron. Why shouldn't init be able to take on some of that work? There are "event driven" tasks. Today, there are many kinds of hardware we expect to be able to just plug into a running system and be recognized. Usually some program needs to be started up when that happens. Sometimes you want something spec
Web-HTML,Blogging 2009/12/10 We've moved APLawrence.com to a new web host. If you are reading this, you are on the new host. I have comments shut off temporarily while DNS propagates. I'll turn them on again soon. There may be other issues. The old server crashed hard and some files were damaged. Damaged is a lot worse than lost - if the files were missing, I could just replace them, but damaged is harder to identify. If you come across anything odd, please let me know. Comments: Click Here. Many of the products and books I review are things I purchased for my own use. Some were given to me specifically for the purpose of reviewing them. I resell or can earn commissions from the sale of some of these items. Links within these pages may be affiliate links that pay me for referring you to them. That's mostly insignificant amounts of money; whenever it is not I have made my relationship plain. If you have any question, please do feel free to contact me. - Skills Tests - Psst - wanna work for yourself? - Unix/Linux Troubleshooting e-book - Kerio Mail Server - Consulting - Advertise Here
Linux,MacOSX,OSR5,BSD,Basics 2009/12/07 © Andrew Smallshaw This is a continuation of Unix and Linux startup scripts, Part 1 Local start up scripts with the BSD rc.d system Introduction The rc.d system is used on NetBSD, FreeBSD and DragonFly (and possibly a few other systems) to launch daemon processes when the system goes multiuser and terminate them properly at system shut down. In the interests of brevity this article will not examine the system comprehensively: rather, this guide is focussed solely on adding new scripts to control additional daemons or perform other tasks at start up and shut down. Even with this narrow focus I will not attempt a comprehensive treatment, but this guide should suffice for most common tasks and still remain brief enough to read when you actually need to write such a script. Sadly, however, start up and shut down are one of the least standardised areas of Unix systems. This article describes recent versions of NetBSD. Since the system has been adopted by FreeBSD and DragonFly much here will be applicable to those too. On other systems it is likely that little if any of this applies. Background System V-inspired start up systems rely on particular naming of start up scripts to ensure that the scripts are executed in the proper order. In contrast, with the rc.d system each script details internally what services that script requires to run, and in turn what services it provides. This means that the administrator need no
Linux,MacOSX,OSR5,BSD,Basics 2009/12/06 I wrote Automating Program Startup almost 10 years ago. A lot has changed since then and I realized that this has actually become a fairly complicated subject when I tried to answer a forum post that simply asked about starting an arbitrary service. Because that poster used "httpd" as an example and was using a Fedora system, several answers mentioned "chkconfig". That's the right answer if we are specifically asking about httpd on a Fedora system, but it's not the right answer for any arbitrary service on any arbitrary Unix or Linux system. In the beginning In the beginning, there was "init". If you had a Unix system, you had "init" and it was almost certainly process id 1. Process 0 was the swapper (not visible in "ps"); it started init with a fork and, one way or another, init was responsible for starting everything else. There were variations, but not many. BSD systems simply used /etc/rc and /etc/ttys. You'd configure terminals in /etc/ttys and add anything else to /etc/rc. The System V Unixes used the more complex /etc/inittab file to direct init's actions, but really that wasn't much more than the /etc/ttys - life was pretty simple. That didn't take long to change. Basic inittab The Automating Program Startup article describes init and inittab as they worked on SCO Unix and Linux at that time. Linux inittab soon became mostly standardized, though with some confusion of /etc/init.d vs. /etc/rc.d/init.d and Re