Tiny Deathstars of Foulness

There are a number of ways that you can protect your WordPress site from spam bots. The first is to only allow authenticated users to post comments. Doing so can still be a bit unwieldy, but this feature is built into WordPress and so pretty straight forward to use. Some, who deal with large amounts of spam bots then choose to completely disable the commenting feature outright (Settings -> Discussion -> Uncheck Allow people to post comments on new articles), but comments can still be made on existing articles and commentary is one of the best features of WordPress for many. To stop comments on older articles, also disable commenting on older articles (same page but also choose the Automatically close comments on articles older than option as well). No site should have to disable comments or bend to the will of a spam bot. You can also then choose (same page again) to email the administrator when a comment is made and then choose to not publish comments until the administrator approves them. But spam bots will still attack, and now you’ll just get a ton of junk email. So many will turn to plug-ins for WordPress. There are a few of those that I like a lot. One is called Invisible Defender. Invisible Defender adds a couple of fields that are suppressed using the style sheets. These invisible comment fields, because they’re not displayed to a browser should then never be filled out. Therefore, if a field is filled out, it had to have been done by a bot. Those comments are then automatically blocked. Then there’s the ability to force captcha (shows you funny garbled letters and you type them into a verify field). Captcha for account creation means that all but the most sophisticated bots will fail. This form of forcing an additional form of verification that a visitor is a real human can then be circumvented by users of OpenID, FaceBook and other services, using plug-ins that allow those users to be authenticated through the third party (typically requires a little theme customization). Then there are the antispambee and akismet plug-ins, which look at the actual comments and attempt to determine which ones are spam. These make a good layer of defense but should not be the only layer used. Regrettably, any time you have user generated content on a web site you are going to have automated bots attempting to do a number of things, most likely sell black market pharmaceuticals and other items of questionable origin. There are also bots that attempt to exploit the login page of the WordPress admin (<DOMAIN>/wp-admin.php or /wp-login.php. These are defeated an entirely different way. One of the best strategies is to lock out those who have attempted a number of invalid attempts that exceeds a threshold that you define.  Amongst those is Login Lockdown WordPress Security. Another layer for protecting the administrative side of the site is to add an .htaccess file to provide an additional layer of security on top of WordPress. You can also change the URLs of your login page, which I usually use a plug-in called Stealth Login for. Finally, I like to back up WordPress in an automated fashion. There are a lot of plug-ins to do this, but I’ve always used WordPress Database Backup. Why? Because it works every time I tested it. I haven’t even bothered to test a good backup and restore for another software package because WordPress Database Backup always works, backs up data to another server I have, and it hasn’t failed me yet. I always test the restores of data that I’m backing up and I recommend that you test this (mileage may vary) if you choose to put it into production as well (false senses of security are in many cases worse than no security).

September 28th, 2010

Posted In: WordPress

Tags: , , , , , ,

Apple computers and AutoCAD once worked together in a harmonious land known now as 1990. Yes, grunge was on the way in, NES was already in, big hair on the way out and architects across the land embraced and loved their Apple computers. Then, AutoCAD 13 (the unluckiest of numbers) was released and suddenly, in 1992 there was no more AutoCAD. I sadly never knew AutoCAD for the Mac in my professional life. But I’ve heard the tales, sung by Bards (some named Bard) across the land. And the tales are sweet, sung with love and heroism and everything you could want out of the marriage of two great products. But it was not meant to be. Mortal Kombat was released that year, and I have always thought that Kano must have had something to do with it. But no matter who you play, Liu Kang eventually always wins. And so AutoDesk has at last come back to their senses and AutoCAD for the Mac is on the way after an 18 year hiatus away from the Mac. Many of those architects I know to this day still keep a Mac hidden away in reverence (or hate life and run it a virtual environment), like a religious heretic praying to their god in a land of intolerance. Now they can rejoin the Mac faithful. No more living in shame or trying to hide who you really are! You can find out more about AutoCAD for the Mac at And while you’re at it, no more using crappy CAD tools for the iPhone/iPad. AutoCAD will have you covered there too: It’s a love affair. Mainly between the architect and his hot rod!

September 24th, 2010

Posted In: Mac OS X

Tags: , , , , ,

I have been feeling guilty for being too busy to write much these past few weeks (well, I’ve written hundreds of pages, just for something else). So, to tide ya’ over, enjoy a little trailer of a comic that was always one of my favorites, despite the peer pressure to fall for the X-men.

September 23rd, 2010

Posted In: personal

If you need to push a wireless network into your image in Mac OS X, you can do so with the networksetup command. Networksetup has a few options that are specifically geared to working with wireless networks. In order to obtain a list of all of the networks that your system has used, you will use the networksetup command along with the -listpreferredwirelessnetworks option. The man page lists that you will follow this command with the hardwareport. The hardwareport is the name of the wireless network adapter, which can be seen in the System Preference pane.

Finding the hardwareport

By default this is called AirPort, so the default command to see all wireless networks in your preferred list would be:

networksetup -listpreferredwirelessnetworks AirPort In order to remove items from the list you will use the -removepreferredwirelessnetwork option. Here, you will run networksetup followed by the option and then the hardwareport followed by the name of the network to be removed. So to remove a network called Linksys: networksetup -removepreferredwirelessnetwork AirPort Linksys You can also remove all of them by using the -removeallpreferredwirelessnetworks option followed by the hardwareport: networksetup -removeallpreferredwirelessnetworks AirPort And then of course, the most useful is to add networks, which uses the -addpreferredwirelessnetworkatindex option. You would follow this with the hardwareport, then the network, then the index number you’d like it to be assigned to (or 0 if you don’t know) and then the security type of the wireless network (OPEN, WEP, WPA, WPA2, WPAE or WPA2E). For example, to add a network called drpepper that is a wide open network: networksetup -addpreferredwirelessnetworkatindex AirPort drpepper 0 NONE Or, if it was WPA with a password set to thedrisin: networksetup -addpreferredwirelessnetworkatindex AirPort drpepper 0 WPA thedrisin Note: For a new image I prefer to begin with 0 and then work my way up numerically when adding networks into the list.

September 21st, 2010

Posted In: Mac OS X, Mass Deployment

Tags: , , , , , , , , , , , ,

When installing Microsoft’s Exchange 2010, the installation will force you to correct some errors with the system before it will complete. One of these will indicate the error that “The start mode for the Net. TCP Port Sharing service must be set to Automatic before Setup can continue”. When you encounter this error, there is a quick and easy powershell command that you will need to run. To proceed, click on the powershell icon in the system tray of your server. Then run the following command.

Set-Service NetTcpPortSharing -StartupType Automatic

Once run, the setup check will complete the indicated step as intended.

September 17th, 2010

Posted In: Windows Server

When you are using a preset with Open Directory, it will copy a number of settings from a template, or preset, that you have created. But the preset will not keep the managed preferences. But you can copy the managed preferences you have defined. I know that this has been covered before by a few different people, but it has mostly been for Local MCX or other types of uses. But if you are using Open Directory and you want to create a template, here’s what I do. Once I’ve configured a group’s managed preferences as I want them, I will save the group in Workgroup Manager and then open a terminal window. Assuming that you are working from the Open Directory master, that your Open Directory administrative account is called diradmin and that a computer group you are using as the template is called templatecompgroup you could use the following command to export tamplategroup’s Managed Preferences:
dscl -u diradmin /LDAPv3/ mcxexport /ComputerGroups/templatecompgroup -o /Users/diradmin/Desktop/export.plist
This will create a property list called export.plist on the desktop of your diradmin user. You can then use the following command to import that into another ComputerGroup (in this case called myothergroup):
dscl -u diradmin /LDAPv3/ mcximport /ComputerGroups/myothergroup /Users/diradmin/Desktop/export.plist
There are lots of other cool uses for mcximport and mcxexport, but if you have a lot of groups that use a lot of managed preferences and you have enough subtle differences between them that you don’t want to nest them within one big group, this can be a great strategy to get a lot of work done fairly quickly!

September 11th, 2010

Posted In: Mac OS X Server

Tags: , , ,

In Part I of our look at college football this season, we discussed how you never know what’s going to happen. Trying to figure out what a bunch of college kids are going to do is like trying to write regular expressions when your slashes are flipped the wrong way and you are making typos at the same time. And boy, Ole Miss sure made some serious fat fingers when they lost in an embarrassing debacle against a team in a lower division than them, Jacksonville State. And then there was Kansas, only managing to put up a field goal, which is 3 points, against North Dakota State in the first time they managed an upset against a Big 12 team. But that’s the thing, kids will be kids… The message for part II of our College Game Day analysis is about old hatreds being hard to die. You see, the University of Georgia dominated Florida for a long time. Then along came this little schmuck named Steve Spurrier. Then Florida turned the tide against Georgia and began to win. And instead of Georgia going for national titles, it was Florida that dominated that part of the South Eastern Conference (SEC). Spurrier left Florida for the NFL, where he had a short and lackluster career before returning to college football to take over for the South Carolina Gamecocks. At this point, I don’t really care whether or not Georgia beats Florida. I only care that I get to see an angry Steve Spurrier throw his visor against the ground, cursing at my Bulldogs. So the first hatred that is hard to die, is that of the opposing coach. With Georgia ranked 22 and South Carolina ranked 24, it will be interesting to see whether either team, currently distracted with off the field blunders, will manage to pull themselves together and play like they mean business. Some things you just can’t forget. If the Cisco guy decides to hold the entire city of San Francisco hostage then my guess is that he’s not going to be able to get a job doing Cisco stuff there any more (if he ever gets out of prison). Miami just can’t forget a loss to Ohio State, who is currently ranked #2 in the country and seems an early favorite to play for a national title berth. But Miami, ranked #12, is out for blood. Reason is that in 2003, Miami (who had previously won 34 games in a row and was a national title contender every year) went down to Ohio State, who had been a bit lackluster before that but who now is a perennial national title contender. Understandably, Miami is thinking that a win will turn the tide back their way. It’s akin to if MySpace could beat Facebook in Halo though; Facebook would still have a better site, but if you really liked Halo and you had to make a choice between working for MySpace and Facebook, you might eventually end up working at MySpace. Is that analogy a stretch? Probably, but the point is that another type of hatred is the hatred you feel for a team you think stole your mojo (like with Austin Powers, you gotta’ go get your mojo back). The next form of hatred goes back a long, long way. Back to Alabama still being mad about northerners meddling in their affairs. The new south has lost much of the memory that was seared into its mind of the loss of a war. But in many a small town throughout the south, Penn State will be boo’d, with that old man that only science can be keeping alive (no, not Favre, Paterno) coaching against the man that could win the Governor’s seat in Alabama if he wanted, having won a national title last year, Nick Saban. Without last years Heisman Trophy winner, who is likely to sit the game out due to injury, the Tide may have a little bit of trouble against the Nittany Lions, who happen to be starting a true freshman. That means an 18 year old sitting there with millions watching him on the interwebs – like the star wars kid (over 18 MILLION views?!?!?!), only he’ll need better moves with the Alabama line frothing at the mouth to eat him alive… Then there’s Florida State and Oklahoma. Really, there’s not a lot of hatred here, just a team on the rise (Florida State) and a team that has been good for a long time (Oklahoma). Perl vs. Python: they each have their uses, but no one really looks down on either (unless you’re a Ruby guy from USC, but then you look down on everything always anyway, despite the obvious flaws in your own program – DOH)… The only other games to note are:
  • Oregon vs. Tennessee – Oregon will either win big (as they are projected) or falter as they tend to do at least once a season. When your QB goes stealing laptops and you’re stuck with a new guy, it could take a little time to get things worked out. But then, the QB ended up at Ole Miss where he is not exactly doing so hot, now is he (those laptops were obviously running Windows Millennium thus causing a big massive horrible terrible Karma drain for both Massoli the QB and the Ducks)…
  • Virginia Tech vs. James Madison – Expect VT to treat James Madison like Ballmer would like to treat the iPhone! After their loss to Boise State last week, the Hokies are going to have a lot of aggression to unload on someone.
  • Idaho vs. Nebraska – Not really, the Huskers are going to decimate the Vandals, but I love sayin’ Vandals…
  • Minnesota vs. North Dakota St. Er, I mean South Dakota. After a loss in 2007 to North Dakota State, the Golden Gophers of Minnesota can’t forget that they still have some players from that team around when they go up against the South Dakota Coyotes (True men don’t kill Coyotes, in case you haven’t heard). What should be an easy win… Well, I’ll believe it when I see it…
  • Notre Dame vs. Michigan – I never thought I’d see the day that neither team is ranked. Both are locked and loaded with talent and on any given Saturday could win any game they play. Both have had (or have had) nobs for coaches, but both could literally end up with a national title and the ESPN guys would be saying “I saw that comin’.” You know, like we all say about the emergence of Google (or not). BTW, some day remind me to tell you about my theory about Charlie Weiss vs. Haynesworth and the whole golf cart thing…

September 10th, 2010

Posted In: Football

Tags: , , , , , ,

Front Row is awesome. Hot keys are awesome. Typos are not. While zipping along, typing my fool heart out, I tend to fat finger about enough to drop my words per minute in half at times. Occasionally, my typos will land me in an annoying spot, with some application opening: often that application is Front Row. Which led me to unmapping the hot key. But then of course, since I reimage my machines a lot, I wanted to put that into my image… Hot keys are stored in, in a users ~/Library/Preferences. You could setup a system with the exact key mappings that you wish to have, use managed preferences to send specific key strokes into the property list or script the augmentation of the file with the defaults command. Within the file a dictionary called AppleSymbolicHotKeys and a number of options that correspond to options in the Keyboard Shortcuts defined in the Keyboard System Preference pane, under the Keyboard Shortcuts tab. Each shortcut entry is a nested dictionary, with a boolean key for whether it is enabled or not and a value dictionary nested even further within that. The value dictionary has a parameters array for the keys that invoke the action and a key that is a string for type (that is always set to standard). That parameters array is comprised of three items, aptly named: Item 0, Item 1 and Item 2. Those items are filled with numbers that map to a key on the keyboard or a 0 if the key is not used. Some of these keys include:
  • 50: ~
  • 52: Enter
  • 53: Escape
  • 122: F1
  • 120: F2
  • 99: F3
  • 118: F4
  • 96: F5
  • 97: F6
  • 98: F7
  • 100: F8
  • 101: F9
  • 109: F10
  • 103: F11
  • 111: F12
  • 105: F13
  • 107: F14
  • 113: F15
  • 131072: Shift
  • 262144: Control
  • 524288: Option
  • 1048576: Command
Note: A useful tool for finding key codes for combinations of keys is Full Key Codes, from Some of the entries in the list that can be controlled, along with their corresponding numeric identifier in the file:
  • 32: All Windows
  • 33: Application Windows
  • 36: Desktop
  • 62: Dashboard
  • 73: Front Row (my goddess of the fat finger)
Note: If you have one that is not in this list, then simply copy the plist, make the change, open both in your favorite property list editor and either eyeball them for the delta or use the diff command. Now, let’s look at setting that symbolichotkeys property list to set the Front Row (Dictionary 73 within Dictionary AppleSymbolicHotKeys to disable, by changing the enabled key to 0, and then leaving the value dictionary as is by copying it back in with the same values (if you care: delimited from the enabled key with a ; and defined as a a dictionary based on the content between the {} with an array inside of it, defined using parenthesis to start and stop the array, followed with another semicolon to delimit the end of that key followed by the type keypair followed by yet another semicolon to end each open key).
defaults write AppleSymbolicHotKeys -dict-add 73 “{enabled = 0; value = { parameters = (65535, 53, 1048576); type = ‘standard’; }; }”
To then re-enable:
defaults write AppleSymbolicHotKeys -dict-add 73 “{enabled = 1; value = { parameters = (65535, 53, 1048576); type = ‘standard’; }; }”
You could also map different keystrokes by sending different numerical values (some are shown above) into the parameters array.

September 7th, 2010

Posted In: Mac OS X, Mass Deployment

Tags: , , , , , , , , ,

I recently needed to temporarily enable optical disk sharing on a couple of machines at a number of different sites (don’t ask why, long story). There were enough to where I wanted to do it sending a script. But where is this stuff stored? Snapshot says: in Which keys? diff says: EnableODiskBrowsing and ODSSupported, both boolean. Resulting command to enable sharing out my DVD drive:
defaults write EnableODiskBrowsing -bool true defaults write ODSSupported -bool true
Not the kind of thing I wanted to leave running, so to then disable it again:
defaults write EnableODiskBrowsing -bool NO defaults write ODSSupported -bool NO

September 3rd, 2010

Posted In: Mac OS X, Mass Deployment

Tags: , , , , ,

For those of us who like football (and specifically college football), we’ve been waiting all year for this. Many of us have watched with great embarrassment as our teams collectively made some of the worse off-field blunders since the beginning of time (which is for me is since 1892 when the University of Georgia played their first football game). But now we’re ready to put all the locking of players in oubliettes, smacking around players, coaches suing coaches, coaches suing schools, court battles over whether or not coaches can sue schools, coaches driving hammered and both coaches and players beating people up behind us, pin our ears back and play some good, old fashioned football (or at least watch it if we’re out of our playing years). But that’s us, the ones that like football. What about the majority of my readers? Those of you who have been with me since the beginning will remember a time when I posted a lot about Georgia football. For those of you who had no clue what I was talking about when I referenced football, I have a weekly column I’m going to do for the next few months. Many of you work for higher education environments. And this time of the year can be very trying if you don’t follow the team, or even college football. Others get stuck at the water cooler, looking at your feet as the people who you have absolutely no trouble talking to the rest of the year get lost in a religious fervor known as football. So I’m going to give you some tasty morsels, even if you have no idea what a spiral is, who “Bear” is or why I consider Tim Tebow to have been the spawn of satan (and he was, I assure you). If you choose to read these articles then “you gonna’ get a’ edumacation, son.” The quote of the week is “anything is possible.” This week is, for many big schools, an easy week. Florida, the number 4 team in the country plays Miami of Ohio. The only team with anything to loose here is Florida. You see, they will win that game. But if something weird happens (about as possible as a kext loading up properly on a Windows 7 computer), and somehow they manage to not win it big, then they will drop in the rankings. And in the power elite of college football, the rankings are almost everything. Also, if Florida looses, their  coach will have a heart attack (Urban Meyer, as much as I despise Florida is a great football coach who has a poorly programmed heart) and they will go back to the mediocrity they knew when Ron Zook was their coach (he couldn’t even coach a team of salesmen at Fry’s – sorry Illini, it’s true, I mean really, the veer option?!?!). But even though San Jose State shouldn’t be able to beat #1 Alabama and Western Kentucky shouldn’t have a shot against #8 Nebraska, there seems to be a surprise every year, like when Appalachian State defeated the mighty Michigan Wolverines. And one team that shouldn’t be able to win this week is likely to do so. Therefore, if some team called Samford that no one has ever heard of manages to eek a historic victory out against a team like #20 Florida State and this comes up at the water cooler, just say “anything is possible.” After all, whether they’re being payed or not (can you imaging writing code for free?), they’re still just a bunch of kids… And if on Friday you see people going through a manic episode as their anticipation is getting the best of them (you know, like you and I might have over the new iOS), just ask “where are they ranked pre-season?” and you will immediately be back into the water cooler talk (despite having no clue what it all means)! Finally, if you would actually like to watch some games, then the Utah vs Pittsburgh game is sure to be a good one, as is the TCU vs Oregon State (DO NOT BET $ ON THAT GAME) game and the LSU vs North Carolina game. For that last game, given that North Carolina has some issues, I wouldn’t plan on rooting for them. They’re likely to have some star players out and LSU is likely to capitalize on that (plus LSU could probably pwn a fully weaponized UNC anyway, even if Butch Davis has a better coach than LSU does). The best game of the weekend though, might just be Boise State vs. Virginia Tech. These are two top 10 teams, both incredibly well coached and both playing to remain in contention for the national title. Expect some pretty good football here! Extra Credit: If (you live on the west coast or in Utah) and (Utah manages to beat Pittsburg) then (say “Utah sure is acting like a Pac 10 team so far!”) Disclaimer: If I have angered you with a comment I made about your team here, then please smile in anticipation of the USC rant that is building up inside me and compare to that at a later date.

September 2nd, 2010

Posted In: Football