Poof it’s Gone

OK, I’m only really posting this cause I need it and I just want to put it somewhere to remember it. ;-)

To make a file or folder invisible issue the following from the CLI.

SetFile -a V path/to/fileOrFolder

To make it visible again…

SetFile -a v path/to/fileOrFolder

That’s it. This can be especially useful on shared drives to keep others out of specific folders, etc. BTW, the file or folder still shows up in ls, it’s just not visible in Finder.

Posted in mac-osx | Tagged , | Leave a comment

US Navy Seal cleared over attack

BBC News | World | UK Edition

A US military jury clears a Navy Seal over an attack on an Iraqi suspected of killing four American security guards in Falluja.

Amazing that it even got to this point. Poor, poor terrorist.

Posted in life-unscripted | Tagged , | Leave a comment

Don’t Send iCal Replies

I came across a great hint in Mac OS X Hints today. It seems that there’s an easy way to interrupt the process of sending an email reply when accepting iCal invites. As I tend to play around with iCal invites a lot (adding and deleting the same event ad nauseum) — I love this.

I wrote up a modified script like in the example and bundled it with at shell script it install and uninstall the modification. You have to run this script using sudo from the CLI (Command Line Interface aka Terminal.app).

The zip file contains the shell script, the modified Mail.scpt AppleScript, and the original Mail.scpt AppleScript.

To install run “sudo /path/to/iCal_Reply_Send.sh install
To uninstall run “sudo /path/to/iCal_Reply_Send.sh revert
To check usage and status, run “/path/to/iCal_Reply_Send.sh

If you don’t like messing with the CLI then there’s a great little shareware app, iCal Reply Checker that does it all, and more.

It seems that neither method interferes with the code signing of iCal as the script in question is not code signed.

Update
It appears that if you’re using an Exchange account in Mail.app that this script is being bypassed and this hint won’t work for you. :-(

Posted in AppleScript, code, computer, mac-osx | Tagged , , , | 5 Comments

New Safari Version??

I’ve just spent the last 40 minutes on the phone with Union Bank tech support because for the past 2 weeks I’ve been unable to log in to my online account with Safari. After all this time the tech support person, who was very nice, told me I was missing a patch to Safari.

I told him I have the latest patches to my OS and I am running the most currently available version of Safari. I told me that someone there “got some update patch and could log in.” I told him, with all due respect, I’ve been using Macs for over 20 years. (I got my first Mac 128K in 1985) I was quite certain that there is no more currently available version of Safari. Naturally I ran Software Update and no updates are available.

Currently I’m running OS 10.6.3 and Safari Version 4.0.5 (6531.22.7), according to the About box. I’m not sure why they want to blame Apple, but for their logic to hold true a single user of theirs seems to have a “more up-to-date” version of Safari than is obtainable from either Software Update or Apple’s site.

Fortunately Firefox still works.

Posted in computer, mac-osx | Tagged , , | 2 Comments

iPad Arrives

Well, with the Easter weekend over and Apple’s iPad gaining more headlines than anything else, I have to say I want one, but I can wait.

I actually got to touch one. Someone at the hospital brought it with them.

  • It’s not that heavy.
  • The display is bright and crisp.
  • It’s fast.

I played a little with the keyboard and I can see with some practice that it’s quite usable.

I’m more excited to see what’s coming Thursday in the iPhone 4.0 announcement. A unified inbox for the Mail.app and Smart Folders would be great.

The iPad is certainly a machine designed for consuming data, not necessarily manipulating data. There are several scripts that I’ve written that make my life easier and I don’t see anyway of making them work on an iPad or iPhone. Not that it’s a deal-breaker, it just means I can’t use the iPad for much more than I use my iPhone now. Except it’s really a faster, better reading environment. I’ll probably buy one based upon that alone.

Time will tell. But I have to say for all those naysayers, wait till you’ve held one!

Posted in computer | Tagged , , , | 1 Comment

Happy Birthday Alan!

Happy Birthday Alan! I hope you’re having a great day on the links. It’ll be good to see you in couple of weeks.

Posted in life-unscripted | Leave a comment

New IP Address

Well, as a cost saving measure and because we really weren’t using more than one, we’ve cut back to a single IP address. Time Warner Cable is the biz Internet provider. They’ve been very helpful in setting up reverse DNS lookups and PTR records, but at the same time the transfer to the new IP really screwed with the cable modem.

I spent many hours with some very nice people at TWC tech support, like Jan, but what eventually fixed the problem was changing the fixed IP I was assigned to another fixed IP.

Long and short is everything, mail, web, etc. seems to be back up and running.

Posted in computer, osx-server | Tagged , | Leave a comment

Baby Steps to Healthcare Reform

Since I’m sure all members of Congress will have the opportunity to read and comprehend the entirety of whatever is the current healthcare legislation the following small steps to improve the situation will be meaningless. I have 3 simple proposals that could fit on a single page. Heck, it fits in a single post.

  1. Eliminate pre-existing conditions as a reason to deny insurance.
  2. Allow insurance companies to sell in any market in the US.
  3. Malpractice reform — Loser Pays

I think the first 2 are self evident so lets focus for a moment on the third.

Loser Pays

What I mean is that all legal fees will be paid by the losing party to the litigation. This would include naming a doctor in a med mal suit and then dropping them from the suit.

You see, just because a doctor gets dropped from a suit doesn’t mean that his malpractice carrier doesn’t incur costs. In fact, it’s usually about $20K to defend a suit that is dropped.

Interestingly, anytime a doc is dropped from a suit, they must sign a release stating that they will not sue the plaintiff’s attorney. I once tried not to sign this but my lawyer told me he’d never seen it done before.

Yeah, I know, it doesn’t solve many of the problems facing our healthcare industry. But I bet it would improve the situation with minimal effort.

Posted in medicine | Tagged , | 2 Comments

Fail2ban on Leopard Server

So here I am running my own server — for almost 2 years now. It’s been a real learning experience and I’ve tried to share. My latest add-on has been fail2ban. I got tired of looking into my logs and seeing where script kiddies or bots were trying to take control of my server. Fortunately, none have.

After a bit of googling, I found fail2ban. It’s a collection of python scripts.

Fail2ban scans log files like /var/log/pwdfail or /var/log/apache/error_log and bans IP that makes too many password failures. It updates firewall rules to reject the IP address.

There are a few tricks I’ve discovered along the way to make it work on my installation and likely on Mac OS X Server in general.

First is that fail2ban creates a PID and socket file in a directory that it fails to create. Yeah, that’s a bug. Since I didn’t want to mess around with the actual scripts in the program, I created a plist that issues the mkdir /var/run/fail2ban command. I placed this in /System/Library/LaunchDaemons and set it to Run at Load. Lingon is your friend, but’s now inactive. :-(

After creating the file you have to use the command line to move it to the /System/Library/LaunchDaemons directory. I also created another launchd plist to reload fail2ban every day. I did this because I run multiple virtual websites and the error logs for those sites get rotated and the names have some time code or something tacked on the end of the filename.

OK, problem 1 solved. Next I discovered that since fail2ban is really running on a multitude of linux boxes all the different methods of IP tracking, sorting etc. were really useless on my OS X Server. I run ipfw firewall and fortunately there’s a module for that in fail2ban. Unfortunately it’s not quite set up correctly, at least it wasn’t for me. I had to tweak it a bit.

What this means is that your action is always going to be ipfw. I tweaked the ipfw.conf file a bit. Now it does the following.

  1. Logs it’s action to ipfw.log
  2. Adds a rulenum to the ipfw command. I did this because some other rule in my setup was allowing the IP before my deny could take effect. By lowering the rulenum my deny now fires off first.
  3. Abstracted the protocol (tcp, udp) to pass as a variable. Just in case something you want to block isn’t tcp.

I also created another filter as I found many times some machine would excessively hit my Apache server looking for nonexistent files. Since it sounds like something a bot would do I decided to ban it. This was the simple creation of a new filter.

I created a jail.local file to hold all my prefs and through trial and error discovered that the examples of how to call for a jail weren’t working for me. Perhaps I just didn’t understand the examples. I soon discovered that parameters for the jail action needed to be passed inside of square brackets in the prefs.

I’m sure, if you’ve gotten this far that you’re either very confused by this whole post or that you’ve had an epiphany. To further the epiphany along I’ve uploaded my file changes.

You should be able to figure out what file goes where from the folder structure of the upload.

A couple of things in summary to remember. First, turn on your server’s firewall. Then make sure you change your server’s local IP address in the files to match your own. That’s the setting for localhost.

Good luck. If you have any questions leave a comment.

Posted in code, osx-server | Tagged , | Leave a comment

Snailjacked

Well, I’ve found out that someone is hijacking my posts with no attribution and no permission. I’m not even sure I understand the logic as there isn’t even any advertising there — yet.

If you’re seeing anything on the domain computersoftware.snailjack.com, it’s a rip off from somewhere else. Do me a favor and don’t click on any links, don’t support there advertising and just don’t go on their site.

Other than restricting my RSS feed I’m not sure what I can do to stop it.

Don’t support anything from the domain SNAILJACK.COM!

Tagged | Leave a comment