Starts with a replay of the Google Glass commercial, but then an uncomfortable founder of an internet company rambles uncomfortably. 13:12 in he jokes about recording from the stage without people knowing. Strange times we live in.
Archive for the ‘General Technology’ Category
How TED’s introduction to Google Glass Really Happened
Friday, April 12th, 2013Quick Update to a Radiotope Guide for Built-In Mac OS X VPN Connections
Tuesday, March 26th, 2013Just a note for those folks with well-worn bookmarks to this post on Ed Marczak’s blog, Radiotope.com, for authenticating VPN connections with Mac OS X Server’s Open Directory, which is still valid today. When trying to use the System Preferences VPN client/network adapter with the built-in L2TP server in Sonicwall, though, I was curious why OD auth wasn’t working for me, but users that were local to the Sonicwall were. Having been a while since the last time I’d set it up, I went on a search engine spelunking and found a link that did the trick.
In particular, a comment by Ted Dively brought to my attention the fact you need to change the order(in the VPN sidebar item, L2TP Server, when the Configure button pop-up is clicked, it’s under the PPP tab) that the L2TP service is configured to use for authentication type, PAP instead of the more standard MSCHAPv2.
We hope that is of help to current and future generations.
LOPSA-East 2013
Monday, March 18th, 2013For the first year I’ll be speaking at the newly-rebranded League of Extraordinary Gentlemen League of Professional System Administrators conference in New Brunswick, New Jersey! It’s May 3rd and 4th, and should be a change from the Mac-heavy conferences we’ve been associated with as of late. I’ll be giving a training class, Intro to Mac and iOS Lifecycle Management, and a talk on Principled Patch Management with Munki. Registration is open now! Jersey is lovely that time of year, please consider attending!
PSU MacAdmins Conference 2013
Wednesday, February 27th, 2013For the third year, I’ll be presenting at PSU MacAdmins Conference! This year I’m lucky enough to be able to present two talks, “Backup, Front to Back” and “Enough Networking to be Dangerous”. But I’m really looking forward to what I can learn from those speaking for the first time, like Pepijn Bruienne and Graham Gilbert among others. The setting and venue is top-notch. It’s taking place May 22nd through the 24th, with a Boot Camp for more foundational topics May 21st. Hope you can join us!
Set Splunk MySql Monitor To Start On Boot (CentOS)
Thursday, January 31st, 2013Back in the old days of unix there was an easy way to start a daemon or script every time a computer booted. Simply put it in one of the /etc/rc.? text files and it would start all the services in the order specified. Later, it was made more flexible by having different startup folders based on which runlevel you were on. Even later still scripts these rc[1-6].d startup folders became deprecated yet are still used to some extent by legacy programs and now things are all managed with new commands.
To put it bluntly, it’s messy, non intuitive and definitely not as easy as it should be. There is hope however and getting a script or daemon to run “the right way” at startup isn’t too terribly daunting and I’ll walk you through the process now.
In our instance we need a program called splunkmysqlmonitor.py to run on boot. It takes one of 3 arguments, start, stop, restart, and is located in /opt/splunk/etc/apps/mysqlmonitor/bin/daemon/. It’s almost ready to run at startup but first we should look at the command we’re using to call splunkmysqlmonitor.py and that’s the chkconfig command.
The chkconfig command takes a script that’s located in /etc/init.d and creates all the necessary symlinks for it in the rc[1-6].d folders that tell the system what order to start all the services and which runlevels start which services. Runlevels are mostly deprecated in linux these days but just as an FYI, the runlevels you need to pay attention to are 2,3,4 and 5 and they are amost always identical. The only thing you really need to worry about is the order in the boot process that the scripts get started and and less so the order that the script gets shutdown when rebooted. For example, a program that relies on nfs to be on when running started necessarily needs to be run after the nfs command mounts the drives successfully. Numbers lower in the list start first and the list goes from 1 – 99. Since splunk is at priority 90 and this monitor needs to start after splunk I’ll give it a priority of 95. As for shutdown, this service should turn off quickly since it relies on other services to run and may spit out errors if these dependent services are turned off before it. I’ll give this shutdown a priority of 5 which means it’ll be one of the first processes to shutdown.
So now that we know when in the boot process the script should run and at (priority 95) which run levels it should run from (2,3,4,5) we just need to put this info into the system somehow. We do this by adding specially formatted comment lines into our script located in /etc/init.d. Here’s what our example looks like with the new comments added
#!/usr/bin/env python # run level startup shutdown # chkconfig: 2345 95 5 # description: monitors local mysql processes for splunk # processname: splunkmysqlmonitor #
import sys, time, os, socket...
Now we have to put the script into the /etc/init.d folder and that is best done with a symlink.
ln -s /opt/splunk/etc/apps/mysqlmonitor/bin/daemon/splunkmysqlmonitor.py /etc/init.d
And finally the chkconfig command itself
chkconfig --add /etc/init.d/splunkmysqlmonitor.py
This should add the script to startup and next time you reboot it’ll launch automagically.
MySQL Monitoring with Splunk
Wednesday, January 30th, 2013MySQL Logging with Splunk
Getting Splunk running and monitoring common log formats, such as apache logs and system logs, is a pretty straightforward process. Some would even call it intuitive but setting up some of the optional plugins can be tricky the first time you set it up. The following is a quick and dirty guide to getting the MySQL monitor from remora up and running in your splunk instance.
This article assumes you have a splunk server as well as a separate database server running a splunk forwarder that is pushing logs to the main splunk server.
The first step is to prepare your splunk server for the incoming mysql stats. We’ll need to make a custom index (called mysql in our case) on both the server and the database host. See below:
Once that’s done we’ll also need to create a custom tcp listener on the splunk server. This is different from the standard listener that runs on port 9997. Go to the manager and then data inputs to create:
As you see we used port 9936 to be a listener that automatically imports into the mysql index. You’ll want to ensure that this port is reachable from your database server to ensure there are no firewalls blocking your connection. You can test this with a simple telnet command. If you see a prompt that says “Escape character is” then you’re good to go.
Once we have verified the listener is up and running the next step is to get the mysql monitor installed on all the machines. It’s easily available via the splunk marketplace. All you need is to create a username and password.
Once in the market place locate the Mysql monitor
And then restart splunk
Now that that’s installed we need to make sure all the dependencies for the mysql monitor are setup on the database servers that will be pushing data to the main splunk server.
To install on a debian based os use this command:
apt-get install python-mysqldb
For a redhat based os use this
yum install MySQL-python
Accept all the dependencies and assuming there were no issues you’re just about ready.
Next on the list is to make sure your splunk monitoring daemon can talk to the local mysql server. On the machine in our test, we only have mysql running on the internal ip and have to ensure that the mysql user splunk@172.16.154.141 can connect and has permission. You may need to run the following command to grant yourself permission.
grant all privileges on *.* to 'splunk'@'mysql_ip' identified by 'your-password';
To verify that splunk can access your tables use the following command
mysql -u splunk -h mysql_ip -p
Once you’ve got that down the last step is to configure the mysql monitor’s config.ini. Here’s the config.ini we used:
[mysql] host=172.16.154.141 port=3306 username=splunk password=your-password
[splunk] host=172.16.154.250 port=9936
[statusvars] interval=10
[slavestatus] interval=10
[tablestats] interval=3600
[processlist] interval=10
As of this writing, the place to put that config file is: /opt/splunk/etc/apps/mysqlmonitor/bin/daemon
To start the mysql monitor type this on the db server: /opt/splunk/etc/apps/mysqlmonitor/bin/daemon/splunkmysqlmonitor.py
That’s it! If you check the Splunk server then you should start seeing the mysql logs popping in immediately.
Pretty nice eh?
Next time I’ll show you how to make the splunk monitor daemon start on boot.
FileVault 2 Part Deux, Enter the Dragon
Wednesday, January 30th, 2013The Godfather of FileVault, Rich Trouton, has probably encrypted more Macs than you. It’s literally a safe bet, horrible pun intended. But even he hadn’t taken into account a particular method of institution-wide deployment of recovery keys: disk-based passwords.
As an exercise, imagine you have tier one techs that need to get into machines as part of their duties. They would rather not target-disk recovery partition boot(thanks to Greg Neagle for clearing up confusion regarding how to apply that method) and slide a valuable certificate into place and whisper an incantation into its ear to operate on an un-booted volume, nor do they don’t want to reset someone’s password with a ‘license plate’ code, they just want to unlock a machine that doesn’t necessarily have your admin enabled for FV2 on it. Back in 10.7, before the csfde command line tool, the process of adding users was labor-intensive as well. Even in fdesetup times, you cannot specify multiple users without having their passwords and passing them in a unencrypted plist or stdin.
In this scenario, it’s less a ‘get out of jail free’ card for users that forget passwords, and more of a functional, day-to-day let-me-in secret knock. How do I get me one of those?
Enter the disk password. (Meaning like Enter the Dragon or Enter the Wu, not really ‘enter your disk password’, this is a webpage, not the actual pre-boot authentication screen.)

How did we get here? No advanced black magic, we just run diskutil cs(short for coreStorage, the name of the quacks-like-a-duck-so-call-it-a-duck logical volume manager built in to 10.7 Lion and later) with the convert and -passphrase options, pointing it at root. We could encrypt any accessible drive, but the changes to login are what we’re focusing on now.
The end result, once the process finishes and the machine reboots next, is this(un-customizable) icon appears at the login window:
![]()
Remember that this scenario is about ‘shave and a haircut, two bits’, not necessarily the institution-wide systems meant to securely manage recovery options. Why haven’t you(or the Godfather) heard of this having been implemented for institutions until now-ish? (Was he too busy meticulously grooming his links to anything a mac admin could possibly need to know, or composing the copious content to later link to? Say that three times fast!) (Yes, the disk password functionality has been around for a bit, but we’ve gotten a report of this being deployed, which prompted this post.) Well, there are two less attractive parts of this setup that systems like Cauliflower Vest and commercial solutions like Credant or Casper sidestep:
1. The password (for one or many hosts) needs to be sent TO a shell on the local workstations command line in some way, and rotating the password requires the previous one to be passed to stdin
2. It can be confusing at the pre-boot login window that there seems to be a user account called Disk Password visible
What’s the huge advantage over the other systems? Need to rotate the password? No decrypt/re-encrypt time! (Unlike the ‘license plate’ method.) Old passwords are properly ‘expired’! (Unlike the ‘Institutional Recovery Key’ method of using a certificate.) I hope this can be of use to the environments that may be looking for more ‘middle ground’ between complex systems and manual interaction. Usability is always a factor when discussing security products, so the additional method is a welcome one to consider the benefits of and, as always, test.
Sure, We Have a Mac Client, We Use Java!
Thursday, January 24th, 2013We all have our favorite epithets to invoke for certain software vendors and the practices they use. Some of our peers go downright apoplectic when speaking about those companies and the lack of advances we perceive in the name of manageable platforms. Not good, life is too short.
I wouldn’t have even imagined APC would be forgiving in this respect, they are quite obviously a hardware company. You may ask yourself, though, ‘is your refrigerator running’ is the software actually listening for a safe shutdown signal from the network card installed in the UPS? Complicating matters is:
- The reason we install this Network Shutdown software from APC on our server is to receive this signal over ethernet, not USB, so it’s not detected by Energy Saver like other, directly cabled models
- The shutdown notifier client doesn’t have a windowed process/menubar icon
- The process itself identifies as “Java” in Activity Monitor (just like… CrashPlan – although we can kindof guess which one is using 400+ MBs of virtual memory idle…)

Which sucks. (Seriously, it installs in /Users/Shared/Applications! And runs at boot with a StartupItem! In 2013! OMGWTFBBQ!)
Calm, calm, not to fear! ps sprinkled with awk to the rescue:
ps avx | awk '/java/&&/Notifier/&&!/awk/{print $17,$18}'
To explain the ps flags, first it allows for all users processes, prints in long format with more criteria, and the x is for even if they have no ‘controlling console.’ Then awk looks for both Java and the ‘Notifier’ jar name, minus our awk itself, and prints the relevant fields, highlighted below(trimmed and rewrapped for readability):
:./comp/pcns.jar:./comp/Notifier.jar:
com.apcc.m11.arch.application.Application
So at least we can tell that something is running, and appreciate the thoughtful development process APC followed, at least while we aren’t fashioning our own replacement with booster serial cables and middleware. Thanks to the googles and the overflown’ stacks for the proper flags to pass ps.
InstaDMG Issues, and Workflow Automation via Your Friendly Butler, Jenkins
Thursday, January 17th, 2013“It takes so long to run.”
“One change happens and I need to redo the whole thing”
“I copy-paste the newest catalogs I see posted on the web, the formatting breaks, and I continually have to go back and check to make sure it’s the newest one”
These are the issues commonly experienced with those who want to take advantage of InstaDMG, and to some, it may be enough to prevent them from being rid of their Golden Master ways. Of course there are a few options to address each of these, in turn, but you may have noticed a theme on blog posts I’ve penned recently, and that is:
BETTER LIVING THROUGH AUTOMATION!
(We’ll get to how automation takes over shortly.) First, to review, a customized InstaDMG build commonly consists of a few parts: the user account, a function to answer the setup assistant steps, and the bootstrap parts for your patch and/or configuration management system. To take advantage of the(hopefully) well-QA’d vanilla catalogs, you can nest it in your custom catalog via an include-file line, and you only update your custom software parts listed above in one place. (And preferably you keep those projects and catalog under version control as well.)
All the concerns paraphrased at the start of this post just happen to be discussed recently on The Graham Gilbert Dot Com. Go there now, and hear what he has to say about it. Check out his other posts, I can wait.

Back? Cool. Now you may think those are all the answers you need. You’re mostly right, you smarty you! SSDs are not so out-of-reach for normal folk, and they really do help to speed the I/O bound process up, so there’s less cost to create and repeat builds in general. But then there’s the other manual interaction and regular repetition parts – how can we limit it to as little as possible? Yes, the InstaDMG robot’s going to do the heavy lifting for us by speedily building an image, and using version control on our catalogs help us track change over time, but what if Integrating the changes from the vanilla catalogs was Continuous? (Answers within!) (more…)
If It’s Worth Doing, It’s Worth Doing At Least Three Times
Monday, January 14th, 2013In my last post about web-driven automation, we took on the creation of Apple IDs in a way that would require a credit card before actually letting you download apps(even free ones.) This is fine to speed up the creation process when actual billing will be applied to each account one at a time, but for education or training purposes where non-volume license purchases wouldn’t be a factor, there is the aforementioned ‘BatchAppleIDCreator‘ applescript. It hasn’t been updated recently, though, and I still had more automation tools I wanted to let have a crack at a repetitive workflow like this use case.
SikuliScript was born out of MIT research in screen reading, which roughly approximates what humans do as they scan the screen for a pattern and then take action. One can build a Sikuli script from scratch by taking screenshots and then tying together the actions you’d like to take in its IDE(which essentially renders HTML pages of the ‘code’.) You can integrate Python or Java, although it needs(system) Java and the Sikuli tools to be in place in the Applications folder to work at all. For Apple ID creation in iTunes, which is the documented way to create an ID with the “None” payment method, Apple endorses the steps in this knowledge base document.
When running, the script does a search for iBooks, clicks the “Free” button to trigger Apple ID login, clicks the Create Apple ID button, clicks through a splash screen, accepts the terms and conditions, and proceeds to type in information for you. It gets this info from a spreadsheet(ids.csv) that I adapted from the BatchAppleIDCreator project, but currently hard-codes just the security questions and answers. There is guidance in the first row on how to enter each field, and you must leave that instruction row in, although the NOT IMPLEMENTED section will not be used as of this first version.
It’s fastest to type selections and use the tab and/or arrow keys to navigate between the many fields in the two forms(first the ID selection/password/security question/birthdate options, then the users purchase information,) so I didn’t screenshot every question and make conditionals. It takes less than 45 seconds to do one Apple ID creation, and I made a 12 second timeout between each step in case of a slow network when running. It’s available on Github, please give us feedback with what you think.
Change PresStore’s port number to avoid conflicts with other services
Thursday, January 10th, 2013PresStore by Archiware is a multi-platform data backup and archive solution. Rather than writing a GUI control panel application for each platform Archiware uses a web-based front end.
By default PresStore uses port 8000 for access:
http://localhost:8000
This is a common port number, though, for many applications such as Splunk, HTTP proxies, games and applications that communicate with remote server services. 8000 isn’t a special port—it’s just a common port.
If PresStore is installed on a UNIX-based server with another application also using port 8000, changing its port number to something else is as simple as renaming a file. This file is located in PresStore’s install directory and is called lexxserv:8000:
/usr/local/aw/conf/lexxserv:8000
A local administrator can change the name of this file using the mv command. Assuming he wants to change it to port 8001, he’d use:
sudo mv /usr/local/aw/conf/lexxserv:8000 /usr/local/aw/conf/lexxserv:8001
After changing the port, stop the PresStore service:
sudo /usr/local/aw/stop-server
And start it again:
sudo /usr/local/aw/start-server
Or just use the restart-server command:
sudo /usr/local/aw/restart-server
Windows administrators will need to open the PresStore Server Manager utility and change the port number in the Service Functions section.
25 Tips For Technical Writers
Wednesday, January 9th, 2013At 318, we write a pretty good amount of content. We have 5 or so authors on staff, write tons of technical documentation for customers and develop a fair amount of courseware. These days, I edit almost as much as I write. And in doing so, I’ve picked up on some interesting trends in how people write, prompting me to write up some tips for the blossoming technical writer out there:
- Define the goal. What do you want to say? The text on the back jacket of most of my books was written before I ever wrote an outline. Sometimes I update the text when I’m done with a book because the message can change slightly with technical writing as you realize some things you’d hoped to accomplish aren’t technically possible (or maybe not in the amount of time you need to use).
- Make an outline. Before you sit down to write a single word, you should know a goal and have an outline that matches to that goal. The outline should be broken down in much the same way you’d lay out chapters and then sections within the chapter.
- Keep your topics separate. A common trap is to point at other chapters too frequently. Technical writing does have a little bit of the find your own adventure aspect, but referencing other chapters is often overused.
- Clearly differentiate between section orders within a chapter. Most every modern word processing tool (from WordPress to Word) provides the ability to have a Header or Heading 1 and a Header or Heading 2. Be careful not to confuse yourself. I like to take my outline and put it into my word processing program and then build out my headers from the very beginning. When I do so, I like for each section to have a verb and a subject that defines what we’re going to be doing. For example, I might have Header 1 as Install OS X, with Header 2 as Formatting Drives followed by Header 2 as Using the Recovery Partition followed by Header 3 of Installing the Operating System.
- Keep your paragraphs and sentences structured. Beyond the headings structure, make sure that each sentence only has one thought (and that sentences aren’t running on and on and on). Also, make sure that each paragraph illustrates a sequence of thoughts. Structure is much more important with technical writing than with, let’s say, science fiction. Varying sentence structure can keep people awake.
- Use good grammar. Bad grammar makes things hard to read and most importantly gets in the way of your message getting to your intended audience. Strunk and White’s Elements of Style is very useful if you hit a place where you’re not sure what to write. Grammar rules are a lot less stringent with online writing, such as a website. When it comes to purposefully breaking grammatical rules, I like to make an analogy with fashion. If you show up to a very formal company in $400 jeans, they don’t care that your jeans cost more than most of their slacks; they just get cranky you’re wearing jeans. Not everyone will pick up on purposeful grammatical lapses. Many will just judge you harshly. Especially if they hail from the midwest.
- Define your audience. Are you writing for non-technical users trying to use a technical product? Are you writing for seasoned Unix veterans trying to get acquainted with a new version of Linux? Are you writing for hardened programmers? The more clearly you define the audience the easier it is to target a message to that audience. The wider the scope of the audience the more people are going to get lost, feel they’re reading content below their level, etc.
- Know your style guide. According to who you are writing for, they probably have a style guide of some sort. This style guide will lay out how you write, specific grammar styles they want used, hopefully a template with styles pre-defined, etc. I’ve completed several writing gigs, only to discover I need to go back and reapply styles to the entire content. When you do that, something will always get missed…
- Quoting is important when writing code. It’s also important to quote some text. If you have a button or text on a screen with one word that begins with a capped letter, you don’t need to quote that in most style guides. But if there’s only one word and any of the words use a non-capped letter or have a special character then the text should all be quoted. It’s also important to quote and attribute text from other locations. Each style guide does this differently.
- Be active. No, I’m not saying you should run on a treadmill while trying to dictate the chapter of a book to Siri. Use an active voice. For example, don’t say “When installing an operating system on a Mac you should maybe consider using a computer that is capable of running that operating system.” Instead say something like “Check the hardware compatibility list for the operating system before installation.”
- Be careful with pronouns. When I’m done writing a long document I’ll do a find for all instances of it (and a few other common pronouns) and look for places to replace with the correct noun.
- Use examples. Examples help to explain an otherwise intangible idea. It’s easy to tell a reader they should enable alerts on a system, but much more impactful to show a reader how to receive an alert when a system exceeds 80 percent of disk capacity.
- Use bullets or numbered lists. I love writing in numbered lists and bullets (as with these tips). Doing so allows an author to most succinctly go through steps and portray a lot of information that is easily digestible to the audience. Also, if one of your bullets ends with a period, they all must. And the tense of each must match.
- Use tables. If bullets are awesome then tables are the coolest. You can impart a lot of information using tables. Each needs some text explaining what is in the table and a point that you’re usually trying to make by including the table.
- Judiciously use screen shots. If there’s only one button in a screen shot then you probably don’t need the screen shot. If there are two buttons you still probably don’t need the screen shot. If there are 20 and it isn’t clear in the text which to use, you might want to show the screen. It’s easy to use too many or not enough screen shots. I find most of my editors have asked for more and more screens until we get to the point that we’re cutting actual content to fit within a certain page count window. But I usually have a good idea of what I want to be a screen shot and what I don’t want to be a screen shot from the minute I look at the outline for a given chapter. Each screen shot should usually be called out within your text.
- Repetition is not a bad thing. This is one of those spots where I disagree with some of my editors from time to time. Editors will say “but you said that earlier” and I’ll say “it’s important.” Repetition can be a bad thing, if you’re just rehashing content, but if you intentionally repeat something to drive home a point then repetition isn’t always a bad thing. Note: I like to use notes/callouts when I repeat things.
- White space is your friend. Margins, space between headers, kerning of fonts. Don’t pack too much crap into too little space or the reader won’t be able to see what you want them to see.
- Proofread, proofread, proofread. And have someone else proofread your stuff.
- Jargon, acronyms and abbreviations need to be explained. If you use APNS you only have to define it once, but it needs to be defined.
- I keep having editors say “put some personality into it” but then they invariably edit out the personality. Not sure if this just means I have a crappy personality, but it brings up a point: while you may want to liven up text, don’t take away from the meaning by doing so.
- Don’t reinvent the wheel. Today I was asked again to have an article from krypted included in a book. I never have a problem with contributing an article to a book, especially since I know how long it takes to write all this stuff. If I can save another author a few hours or days then they can push the envelope of their book that much further.
- Technical writing is not a conversation. Commas are probably bad. The word um is definitely bad. Technical writing should not ramble but be somewhat formal. You can put some flourish in, but make sure the sentences and arguments are meaningful, as with a thesis.
- Be accurate. Technical reviewers or technical editors help to make sure you’re accurate, but test everything. Code, steps, etc. Make sure that what you’re saying is correct up to the patch level and not just for a specific environment, like your company or school.
- Use smooth transitions between chapters. This means a conclusion that at least introduces the next chapter in each. Don’t overdo the transitions or get into the weeds of explaining an entire topic again.
- Real writers publish. If you write a 300 page document and no one ever sees it, did that document happen? If the document isn’t released in a timely manner then the content might be out of date before getting into a readers hands. I like to take my outline (step 2) and establish a budget (a week, 20 hours, or something like that).
Quickly forward individual emails using Outlook for Mac
Tuesday, January 8th, 2013
Forwarding an email message is fairly simple but forwarding multiple messages can be inconvenient for either the sender or the receiver.
If the sender forwards multiple messages as attachments then the recipient receives one message with a variety of potentially unrelated information. This also makes sorting by subject or Date Sent impossible. If the recipient wants individual messages then the forwarder has no option but to send each message individually. This is time consuming.
Like most email clients for Mac OS X, Outlook for Mac can forward messages but it has a unique feature that makes automating forwarding individual messages easy without resorting to scripting—it can forward using a rule.
But Apple’s Mail, Thunderbird and practically any other email client for Mac has rules too! What makes Outlook different?
Outlook can run disabled rules individually. Both Mail and Thunderbird support creating rules and then disabling them so that they won’t be applied to incoming messages, however, for either to run a single rule manually it must run all rules whether they’re enabled or disabled. Running a long list of rules is potentially troublesome.
To configure a fule in Outlook:
- Select Tools menu –> Rules… and select the type of email account using this rule (POP, IMAP or Exchange).
- Click the + (plus) button to add a new rule.
- Give the rule a descriptive name such as “Forward to <email address>”.
- Set the rule to apply to All Messages.
- Set the rule to Forward To <email address>.
- Deselect the Enabled option. This prevents the rule from firing when new mail arrives.
To use this rule to forward multiple messages individually:
- Select one or more messages in Outlook’s message list.
- Right-click or Control-click anywhere within the selected messages.
- Select Rules –> Apply –> Forward to <email address>.
The rule will run for each message and should take only a few seconds to run. The recipient will receive individually forwarded messages. Both sides save time.
…’Til You Make It
Monday, January 7th, 2013Say you need a bunch of Apple IDs, and you need them pronto. There’s a form you can fill out, a bunch of questions floating in a window in some application, it can feel very… manual. A gentleman on the Enterprise iOS site entered, filling the void with an Applescript that could batch create ID’s with iTunes (and has seen updates thanks to Aaron Friemark.)
That bikeshed, though, was just not quite the color I was looking for. I decided to Fake it. Are we not Professional Computer Operators?
Before I go into the details, a different hypothetical use case: say you just migrated mail servers, and didn’t do quite enough archiving previously. Client-side moves may be impractical or resource-intensive. So you’d rather archive server-side, but can’t manipulate the mail server directly, and the webmail GUI is a touch cumbersome: are we relegated to ‘select all -> move -> choose folder -> confirm’ while our life-force drains away?
Fake is described as a tool for web automation and testing. It’s been around for a bit, but took an ‘Aha!’ moment while pondering these use cases for me to realize its power. What makes it genius is you don’t need to scour html source to find the id of the element you want to interact with! Control-drag to the element, specify what you want to do with it. (There are top-knotch videos describing these options on the website.) And it can loop. And delay(either globally or between tasks,) and the tasks can be grouped and disabled in sections and organized in a workflow and saved for later use. (Can you tell I’m a bit giddy about it?)
So that mail archive can loop away while you do dishes. Got to the end of a date range? Pause it, change the destination folder mid-loop, and keep it going. (There is a way to look at the elements and make a conditional when it reads a date stamp, but I didn’t get that crazy with it… yet.)
And now even verifying the email addresses used with the Apple ID can be automated! Blessed be the lazy sysadmin.
The State of Tablets in Schools
Thursday, January 3rd, 2013Any managed IT environment needs policies. One of the obvious ones is to refresh the hardware on some sort of schedule so that the tools people need are available and they aren’t hampered by running new software on old hardware. Commonly, security updates are available exclusively on the newest release of an operating system. Tablets are just the same, and education has been seeing as much of an influx of iOS devices as anywhere else.
Fraser Speirs has just gone through the process of evaluating replacements for iPads used in education, and discusses the criteria he’s come up with and his conclusions on his blog
A Simple, Yet Cautionary Tale
Friday, December 28th, 2012While we don’t normally cover web development security basics, or find much to report when poking around in iOS apps, a great example of independent investigative tech journalism related to these topics broke late last week. On Nick Arnott(@noir‘s) blog Neglected Potential, he expands on a previous post involving how data is stored within an app(nice shout-out to a personal fave, PhoneView by Ecamm,) to talk about how it communicates with whatever services it may be hooked up to. Generally speaking, SSL and PKI don’t magically solve all our issues(as comically referred to here: This is 2012 and we’re still stitching together little microcomputers with HTTPS and ssh and calling it revolutionary,) and end users reflexively clicking ‘accept’ on self-signed cert warnings is the front lines of the convenience vs. security battle. No, you shouldn’t send auth in plaintext just ’cause it’s SSL. (Yes, you should be seeding any straggler self-signed certs on the devices in your purview so you don’t need to say ‘just for this ONE sites self-signed cert, please just click Continue’.) The fact that a banking users SSN number was being sent to the app on every communication was… surprising, and corrected immediately after the heightened interest resulting from the aforementioned blog post.
After the publicity surrounding the post, however, folks were reassured by getting an immediate audience with the Director of Engineering at Simple, Brian Merritt(@btmerr.) Perhaps the flaw may have been considered too contrived a process for traditional(read: an email to their security team) channels at Simple to respond in a way that satisfied Mr. Arnott before he went ahead and published his post. “If only Jimmy had gone to the police,” the saying goes, “none of this would have happened” – please do note that while responsible disclosure was attempted, the issue is with PKI and not Simple itself, and updates were added to the post when clarifications were worth mentioning to present the facts in an even-handed manner. A key take-away is the fact that there is no live, zero-day exploit going on, just the relative ineffectiveness of PKI being exposed.

Although a process can enable the snooping of traffic, by default proxy’d SSL wouldn’t be allowed to start a session
But even more importantly, the fact that observing the traffic was even possible (thanks to CharlesProxy, also recently mentioned on @tvsutton‘s MacOps blog) highlights the ease with which basic internet security can be thwarted, and how much progress is left to be made. Of the improvements out there, Certificate Pinning is one of those ‘new to me’ concept enhancements regarding PKI, which luckily already has proposals in for review with the IETF. (An interesting contender from about a year ago is expounded on at the tack.io site.) There are quite a few variables involved that make intelligent discussion of the topic difficult for amateurs, but the take-away should be that you can inspect these things yourselves, as convoluted as it may be to get to the root cause of security issues. Hopefully we’ll have easier-to-deploy systems that’ll enable us to never ‘give up’ and use autosign again.
Thanks to Mr. Merritt, Michael Lynn and Jeff McCune for reviewing drafts of this post.
Manually delete data from Splunk
Thursday, December 27th, 2012By default Splunk doesn’t delete the logging data that it’s gathered. Without taking some action to remove data it will continue to process all results from Day 1 if doing an All time search. That may be desirable in some cases where preserving and searching the data for historical purposes is necessary, but when using Splunk only as a monitoring tool the older data becomes superfluous after time.
Manually deleting information from Splunk is irreversible and doesn’t necessarily free disk space. Splunk users should only delete when they’ve verified their search results return the information they expect.
Enabling “can_delete”
No user can delete data until he’s been provided the can_delete role. Not even the admin account in the free version of Splunk has this capability enabled. To enable can_delete:
- Click the Manager link and then click the Access Controls link in the Users and authentication section.
- Click the Users link. If running the free version of Splunk then the admin account is the only account available. Click the admin link. Otherwise, consider creating a special account just for sensitive procedures, such as deleting data, and assigning the can_delete role only to that user.
- For the admin account move the can_delete role from the Available roles to the Selected roles section.

- Click the Save button to keep the changes.
Finding data
Before deleting data be sure that a search returns the exact data to be deleted. This is as simple as performing a regular search using the Time range drop down menu to the right of the Search field.
The Time range menu offers numerous choices for limiting results by time including Week to date, Year to date and Yesterday. In this case, let’s search for data from the Previous month:
Wait for the search to complete then verify the results returned at the results that need deleting.
Deleting data
Deleting the found data is as simple as performing a search and then piping it into a delete command:
This runs the search again, deleting found results on the fly, which is why searching first before deleting is important. Keep in mind that a “delete and search” routine takes as long or longer to run as the initial search and consumes processing power on the Splunk server. If deleting numerous records proceed with one search/delete at a time to avoid overtaxing the server.
BSD as a useful tool
Monday, December 17th, 2012Whether or not you know it, the world runs on BSD. You can’t send a packet more than a few hops without a BSD-derived TCP/IP stack getting involved. Heck, you’d be hard pressed to find a machine which doesn’t already have BSD code throughout the OS.
Why BSD? Many companies don’t want to deal with GPL code and the BSD license allows any use so long as the BSD group is acknowledged. This is why Windows has BSD code, Mac OS X is based on BSD (both in its current incarnation which pulls much code from FreeBSD and NetBSD as well as via code which came from NeXTStep, which in turn was derived from 4.3BSD), GNU/Linux has lots of code which was written while looking at BSD code, and most TCP/IP stacks on routers and Internet devices are BSD code.
In the context of IT tools BSD excels due to its cleanliness and consistency. GNU/Linux, on the other hand, has so many different distributions and versions that it’s extremely difficult to do certain tasks across different distributions in any consistent way. Furthermore, the hardware requirements of GNU/Linux precludes using anything but typical x86 PC with a full compliment of associated resources. Managing GNU/Linux on non-x86 hardware is a hobby in its own right and not the kind of thing anyone would want to do in a production environment.
NetBSD in particular stands in stark contrast to GNU/Linux when deploying on machines of varying size and capacity. One could just as easily run NetBSD from an old Pentium 4 machine as a tiny StrongARM SheevaPlug, a retired PowerPC Macintosh, or a new 16 core AMD Interlagos machine. A usable system could have 32 megs of memory or 32 gigs. Disk space could be a 2 gig USB flash drive or tens of terabytes of RAID.
Configuration files are completely consistent across architecture and hardware. You may need to know a little about the hardware when you first install (wd, sd, ld for disks, ex, wm, fxp, et cetera for NICs, for example), but after that everything works the same no matter the underlying system.
Some instances where a BSD system can be invaluable are situations where the installed tools are too limited in scope to diagnose problems, where problematic hardware needs to be replaced or augmented quickly with whatever’s at hand, or where secure connectivity needs to be established quickly. Some examples where BSD has come in handy are:
In a warehouse where an expensive firewall device was flakey, BSD provided a quick backup. Removing the flaky device would have left the building with no Internet connection. An unused Celeron machine with a USB flash drive and an extra ethernet card made for a quick and easy NetBSD NAT / DHCP / DNS server for the building while the firewall device was diagnosed.
At another business an expensive firewall device was in use which is not capable of showing network utilization in any detail without setting up a separate computer for monitoring (and even then it is limited to giving very general and broad information), nor is it flexible when it comes to routing all traffic through alternate methods such as gre or ssh tunnels. Setting up an old Pentium 4 with a four port ethernet card gave us a router / NAT device which allowed us to do tests where we passed all traffic through a single tunnel to an upstream provider to test the ISP’s suggestion that too many connections were running simultaneously (which wasn’t the case, but sometimes you have to appease the responsible party before they’ll take the next step). They can also now monitor network traffic quickly and easily using darkstat (http://unix4lyfe.org/darkstat/), monitor packet loss, see who on the local networks is causing network congestion, et cetera. The machine serves three separate local network segments which can talk with each other. One segment is blocked from accessing the Internet because it contains Windows systems running Avid, but can be turned on momentarily to allow for software activation and similar things.
When another business needed a place to securely host their own WordPress blog, an unused Celeron machine was set up with a permissions scheme which regular web hosting providers won’t typically allow. WordPress is set up so that neither the running php code nor the www user can write to areas which allow for script execution, eliminating almost all instances where WordPress flaws can give full hosting abilities to attackers, which is how WordPress is so often used to host phishing sites and advertising redirectors.
DNS hosting, NAT or routing can be set up in minutes, a bridge can be configured to do tcpdump capture, or a web proxy can be installed to save bandwidth and perform filtering. An SMTP relay can be locally installed to save datacenter bandwidth.
So let’s say you think that a NetBSD machine could help you. But how? If you haven’t used NetBSD yet, then here are some tips.
The latest version is 6.0. The ISOs from NetBSD’s FTP server typically weigh in at around 250 to 400 megabytes, so CDs are fine. The installer is pretty straightforward and the mechanisms for installing on various architectures is not germane.
After boot, the system is pretty bare, so here are things you’ll want to do:
Let’s look at a sample /etc/rc.conf:
hostname=wopr.example.com
sshd=YES
ifconfig_wm0=”dhcp”
dhcpcd_flags=”-C resolv.conf -C mtu”
ifconfig_wm1=”inet 192.168.50.1 netmask 255.255.255.0″
ipfilter=YES
ipnat=YES
dhcpd=YES
dhcpd_flags=”wm1 -cf /etc/dhcpd.conf”
ip6mode=router
rtadvd=YES
rtadvd_flags=”-c /etc/rtadvd.conf wm1″
named9=YES
named_chrootdir=”/var/chroot/named”
named_flags=”-c /etc/namedb/named.conf
So what we have here are a number of somewhat obvious and a few not-so-obvious options. Let’s assume you know what hostname, sshd, named9, ipnat and dhcpd are for. You can even make guesses about many of the options. What about ifconfig_wm0 (and its flags), ip6mode and other not-so-obvious rc.conf options? First, obviously, you can:
man rc.conf
dhcpcd is a neat DHCP client which is lightweight, supports IPv6 auto discovery and is very configurable. man dhcpcd to see all the options; the example above gets a lease on wm0 but ignores any attempts by the DHCP server to set our resolvers or our interface’s MTU. ifconfig_wm1 should be pretty self-explanatory.
ipnat and ipfilter enable NetBSD’s built in ipfilter (also known as ipf) and its NAT. Configuration files may often be as simple as this for NAT in /etc/ipnat.conf:
map wm0 192.168.50.0/24 -> 0/32 proxy port ftp ftp/tcp
map wm0 192.168.50.0/24 -> 0/32 portmap tcp/udp 10000:50000
map wm0 192.168.50.0/24 -> 0/32
rdr wm0 0.0.0.0/0 port 5900 -> 192.168.50.175 port 5900
And lines which look like this for ipfilter in /etc/ipf.conf:
block in quick from 78.159.112.198/32 to any
There’s tons of documentation on the Internet, particularly here:
http://coombs.anu.edu.au/~avalon/
To quickly summarize, the first three lines set up NAT for the 192.168.50.0/24 subnet. The ftp line is necessary because of the mess which is FTP. The second line says to only use port numbers in that range for NAT connections. The third line is for non-TCP and non-UDP protocols such as ICMP or IPSec. The fourth redirects port 5900 of the public facing IP to a host on the local network.
The ipf.conf line is straightforward; ipf in many instances is used to block attackers since you wouldn’t turn on or redirect services which you didn’t intend to be public. Other examples are in the documentation and include stateful inspection (including stateful UDP; I’ll let you think for a while about how that might work), load balancing, transparent filtering (on a bridge), port spanning, and so on. It’s really quite handy.
Next is BIND. It comes with NetBSD and if you know BIND, you know BIND. Simple, huh?
rtadvd is the IPv6 version of a DHCP daemon and ip6mode=router tells the system you intend to route IPv6 which does a few things for you such as setting net.inet6.ip6.forwarding=1. You’re probably one of those, “We don’t need that yet” people, so we’ll leave that for another time. IPv6 is easier than you think.
dhcpd is for the ISC DHCP server. man dhcpd and check out the options, but most should already look familiar.
So you have a system up and running. What next? You may want to run some software which isn’t included with the OS such as Apache (although bozohttpd is included if you just want to set up simple hosting), PHP, MySQL, or if you’d like some additional tools such as emacs, nmap, mtr, perl, vim, et cetera.
To get the pkgsrc tree in a way which makes updating later much easier, use CVS. Put this into your .cshrc:
setenv CVSROOT :pserver:anoncvs@anoncvs.netbsd.org:/cvsroot
Then,
cd /usr
cvs checkout -P pkgsrc
After that’s done (or while it’s running), set up /etc/mk.conf to your liking. Here’s one I use most places:
LOCALBASE=/usr/local
FAILOVER_FETCH=YES
SKIP_LICENSE_CHECK=YES
SMART_MESSAGES=YES
IRSSI_USE_PERL=YES
PKG_RCD_SCRIPTS=YES
PKG_OPTIONS.sendmail=sasl starttls
CLEANDEPENDS=yes
Set LOCALBASE if you prefer a destination other than /usr/pkg/. PKG_RCD_SCRIPTS tells pkgsrc to install rc.d scripts when installing packages. PKG_OPTIONS.whatever might be different for various packages; I put this one in here as an example. To see what options you have, look at the options.mk for the package you’re curious about. CLEANDEPENDS tells pkgsrc to clean up working directories after a package has been compiled.
After the CVS has finished, you have a tree of Makefiles (and other files) which you can use as simply as:
cd /usr/pkgsrc/editors/vim
make update
That will automatically download, compile and install all prerequisites (if any) for the vim package, then download, compile and install vim. I personally use “make update” in case I’m updating an older package, FYI.
With software installed, the rc.conf system works similarly to the above. After adding Apache, for instance (www/apache24/), you can just add apache=YES >> /etc/rc.conf. That sets Apache to launch at boot; to start it without rebooting, just run /etc/rc.d/apache start.
One package which comes in very handy when trying to keep a collection of packages up to date is pkg_rolling-replace (/usr/pkgsrc/pkgtools/pkg_rolling-replace). After performing a cvs update in /usr/pkgsrc, one can simply run pkg_rolling-replace -ru and come back a little later; everything which has been updated in the CVS tree will be compiled and updated in the system.
Finally, to update the entire OS, there are just a handful of steps:
cd /usr
cvs checkout -P -rnetbsd-6 src
In this instance, the netbsd-6 tag specifies the release branch (as opposed to current) of NetBSD.
I keep a wrapper called go.sh in /usr/src so I don’t need to remember options. This makes sure that all the CPUs are used when compiling and the destinations of files are in tidy, easy to find places.
#!/bin/sh
./build.sh -j `sysctl -n hw.ncpu` -D ../dest-$1 -O ../obj-$1 -T ../tools -R ../sets -m $*
An example of a complete OS update would be:
./go.sh amd64 tools
./go.sh amd64 kernel=GENERIC
./go.sh amd64 distribution
./go.sh amd64 install=/
Then,
mv /netbsd /netbsd.old
mv /usr/obj/sys/arch/amd64/compile/GENERIC/netbsd /
shutdown -r now
Updating the OS is usually only necessary once every several years or when there’s an important security update. Security updates which pertain to the OS or software which comes with the OS are listed here:
http://www.netbsd.org/support/security/
The security postings have specific instructions on how to update just the relevant parts of the OS so that in most instances a complete rebuild and reboot are not necessary.
Security regarding installed packages can be checked using built-in tools. One of the package tools is called pkg_admin; this tool can compare installed packages with a list of packages known to have security issues. To do this, one can simply run:
pkg_admin fetch-pkg-vulnerabilities
pkg_admin audit
A sample of output might look like this:
Package mysql-server-5.1.63 has a unknown-impact vulnerability, see http://secunia.com/advisories/47894/
Package mysql-server-5.1.63 has a multiple-vulnerabilities vulnerability, see http://secunia.com/advisories/51008/
Package drupal-6.26 has a information-disclosure vulnerability, see http://secunia.com/advisories/49131/
You can then decide whether the security issue may affect you or whether the packages need to be updated. This can be automated by adding a crontab entry for root:
# download vulnerabilities file
0 3 * * * /sbin/pkg_admin fetch-pkg-vulnerabilities >/dev/null 2>&1
5 3 * * * /sbin/pkg_admin audit
All in all, BSD is a wonderful tool for quick emergency fixes, for permanent low maintenance servers and anything in between.
iOS Backups Continued, and Configuration Profiles
Friday, December 14th, 2012In our previous discussion of iOS Backups, the topic of configuration profiles being the ‘closest to the surface’ on a device was hinted at. What that means is, when Apple Configurator restores a backup, that’s the last thing to be applied to the device. For folks hoping to use Web Clips as a kind of app deployment, they need to realize that trying to restore a backup that has the web clip in a particular place doesn’t work – the backup that designates where icons on the home screen line up gets laid down before the web clip gets applied by the profile. It gets bumped to whichever would be the next home screen after the apps take their positions.
This makes a great segue into the topic of configuration profiles. Here’s a ‘secret’ hiding in plain sight: Apple Configurator can make profiles that work on 10.7+ Macs. (But please, don’t use it for that – see below.) iPCU possibly could generate usable ones as well, although one should consider the lack of full screen mode in the interface as a hint: it may not see much in the way of updates on the Mac from now on. iPCU is all you have in the way of an Apple-supported tool on Windows, though. (Protip: activate the iOS device before you try to put profiles on it – credit @bruienne for this reminder.)
Now why would you avoid making, for example, a Wi-Fi configuration profile for use on a mac with Apple Configurator? Well there’s one humongous difference between iOS and Macs: individual users. Managing devices with profiles shows Apple tipping their cards: they seem to be saying you should think of only one user per device, and if it’s important enough to manage at all, it should be an always enforced setting. The Profile Manager service in Lion and Mountain Lion Server have an extra twist, though: you can push out settings for Mac users or the devices they own. If you want to manage a setting across all users of a device, you can do so at the Device Group level, which generates extra keys than those that are present in a profile generated by Apple Configurator. The end result is that a Configurator-generated profile will be user-specific, and fail with deployment methods that need to target the System. (Enlarge the above screenshot to see the differences – and yes, there’s a poorly obscured password in there. Bring it on, hax0rs!)
These are just more of the ‘potpourri’ type topics that we find time to share after being caught by peculiarities out in the field.
Getting your feet wet with ACL’s
Monday, December 3rd, 2012As an old school unix geek I have to admit that I’ve been dragging my feet in my efforts to learn and really grasp the idea of Access Control Lists (ACL’s) until embarrassingly recently. As you may know, *nix OS’s of the past have had only basic levels of access control over files on a system and for a surprisingly long amount of time, these simple controls were enough to get by. You were given 3 permission scopes per file, representing the ability to assign specific permissions for the file’s owner, a single group, and everyone else. This was enough for smallish deployments and implementations but when you start having 1000′s of users, setting specific permissions per user started to get needlessly complicated.
Enter ACL’s which grant extremely granular control over every operation you can do on a file. Need a folder to propagate a single user’s permissions to all files but not folders? No problem. Need to give read only access and disallow deletes for a set of folders? No problem there as well. It’s this fine level control that makes using ACL’s important, even mandatory, in some specific cases.
Just a few days ago, encountered an program that was behaving strangely. It was crunching a large number of files and creating the correct output files but for some strange reason, it was deleting them immediately after creating them. I noticed this as I control – C’d the program and saw my file only for it to be deleted once the process resumed. If only there was a way for the OS to disallow the offending program from removing it’s output files…
This is where ACL’s come in and why they are so powerful. I was able to tell the OS to block a program from deleting anything in it’s output folder. Here’s the command I used to check the ACL’s and set them on my mac:
>ls -le
As you see there are no ACL’s set. To set the append only attribute I typed the following.
>chmod +a ‘alt229 deny delete’ ‘output folder’
You see, the ACL has been set. I’ll try and delete something now.
What gives? Unlike Linux systems ACL inheritance isn’t enabled by default when set from the command line. We’ll need to tweak our original command to enable that.
Clear old permissions first:
>chmod -R -N *
>chmod +a ‘alt229 deny delete,file_inherit,directory_inherit’ ‘output folder’
Now permissions will inherit but only to newly created folders. You’ll see that the extra permissions have only been set on the newly created folder named ‘subfolder3′
Rerun the command like this to apply it to existing folders.
>chmod -R +a ‘alt229 deny delete,file_inherit,directory_inherit’
Now, you won’t be able to delete any file that’s contained within the main folder and it’s sub folders.
There are many other special permissions available to tweak your system and help pull you out of strange binds that you may find yourself in. Here’s a list of some of the other ACL’s available in OSX that you can use to customize your environment. This is straight from the man page.
The following permissions are applicable to all filesystem objects:
delete
Delete the item. Deletion may be granted by either this
permission on an object or the delete_child right on the
containing directory.
readattr
Read an objects basic attributes. This is implicitly
granted if the object can be looked up and not explicitly
denied.
writeattr
Write an object’s basic attributes.
readextattr
Read extended attributes.
writeextattr
Write extended attributes.
readsecurity
Read an object’s extended security information (ACL).
writesecurity
Write an object’s security information (ownership, mode,
ACL).
chown
Change an object’s ownership.
The following permissions are applicable to directories:
list
List entries.
search
Look up files by name.
add_file
Add a file.
add_subdirectory
Add a subdirectory.
delete_child
Delete a contained object. See the file delete permission
above.
The following permissions are applicable to non-directory filesystem
objects:
read Open for reading.
write Open for writing.
append Open for writing, but in a fashion that only allows writes
into areas of the file not previously written.
execute
Execute the file as a script or program.
ACL inheritance is controlled with the following permissions words, which
may only be applied to directories:
file_inherit
Inherit to files.
directory_inherit
Inherit to directories.
limit_inherit
This flag is only relevant to entries inherited by subdirec-
tories; it causes the directory_inherit flag to be cleared
in the entry that is inherited, preventing further nested
subdirectories from also inheriting the entry.
only_inherit
The entry is inherited by created items but not considered
when processing the ACL.
BizAppCenter
Thursday, November 29th, 2012It was our privilege to be contacted by Bizappcenter to take part in a demo of their ‘Business App Store‘ solution. They have been active on the Simian mailing list for some time, and have a product to help the adoption of the technologies pioneered by Greg Neagle of Disney Animation Studios (Munki) and the Google Mac Operations Team. Our experience with the product is as follows.
To start, we were given admin logins to our portal. The instructions guide you through getting started with a normal software patch management workflow, although certain setup steps need to be taken into account. First is that you must add users and groups manually, there are no hooks for LDAP or Active Directory at present (although those are in the road map for the future). Admins can enter the serial number of each users computer, which allows a package to be generated with the proper certificates. Then invitations can be sent to users, who must install the client software that manages the apps specified by the admin from that point forward.

Sample applications are already loaded into the ‘App Catalog’, which can be configured to be installed for a group or a specific user. Uploading a drag-and-drop app in a zip archive worked without a hitch, as did uninstallation. End users can log into the web interface with the credentials emailed to them as part of the invitation, and can even ‘approve’ optional apps to become managed installs. This is a significant twist on the features offered by the rest of the web interfaces built on top of Munki, and more features (including cross-platform support) are supposedly planned.

If you’d like to discuss Mac application and patch management options, including options such as BizAppCenter for providing a custom app store for your organization, please contact sales@318.com
Outlook Mailbox Maintenance and Search Troubleshooting
Thursday, November 29th, 2012How to keep an Outlook Database tidy. From the get go, it’s important to lay the foundation for Outlook and the user so that their database doesn’t grow out of hand. This is done by:
- Organizing Folders the way the user would like them
- Creating Rules for users (if they need them)
- Creating an Archive Policy that moves their email to another database (PST).
- Mounting the archive PST in Outlook so that it’s searchable.
- Checking the size of the archive PST every quarter or half year to ensure the size hasn’t grown above it’s maximum.
- Creating a new archive folder for every year.
Organizing Folders the way the user would like them.
Sit down the user, and see how they would like to organize their folders. If they don’t know, them revisit this with them in a couple of weeks / months. Speak to them regarding their workflow and make recommendations to streamline their productivity as necessary. Creating folder is as simple as right clicking the directory tree in Outlook and clicking on “Create Folder”. It can also be done to create subfolders.
Creating Rules for users (if they need them).
Some users use rules, others don’t, some don’t even know they exist. Start up a conversation with a user and see if they know what Outlook rules are, and see if they would like to know more about them, use some, or give it a test run for a day or so. In a nutshell, Outlook rules move email from the Inbox to any mail enabled folder based on a set of, well rules. You can move by sender, subject, keywords, etc. Where to create rules is a little different depending on the version of Outlook you’re using:
Creating Rules in Outlook 2003: http://www2.lse.ac.uk/intranet/LSEServices/itservices/guides/softwareAndTraining/microsoftOffice/outlook/email-rules.aspx
Creating Rules in Outlook 2007: http://uis.georgetown.edu/email/clients/outlook2007/outlook2007.createrule.html
Creating Rules in Outlook 2010: http://office.microsoft.com/en-us/outlook-help/manage-email-messages-by-using-rules-HA010355682.aspx
Try to create rules that run from the Exchange server when possible. This will allow the rules to run on the server and organize them before they hit the Outlook mail client.
Creating an Archive Policy that moves email to another database (PST)
NOTE: If autoarchiving from Outlook, the e-mail will not be available in Outlook Web Access / Active Sync. If archiving in Exchange 2010 for a user, the Archive databases can be available in Outlook Web Access. Proper licensing on Exchange and Outlook apply: http://www.microsoft.com/exchange/en-us/licensing-exchange-server-email.aspx
There are some defaults that Outlook uses.
- Generally, it will automatically auto archive to an archive pst called archive.pst.
- By default, it will tend to run every 14 days, and tend to archive all messages older than 6 months.
- The archive.pst will be on the local workstation.
- Microsoft best practice is to NOT store the PST file on the network due to it being fragile and if it receives any incomplete data it will get corrupt.
- You cannot put the PST in read only mode, if you do, you will not be able to mount it until you take it out of read only mode.
Setting up AutoArchive, or manually archiving for Outlook 2003: http://office.microsoft.com/en-us/outlook-help/back-up-or-delete-items-using-autoarchive-HP005243393.aspx
Setting up AutoArchive, or manually archiving for Outlook 2007: http://office.microsoft.com/en-us/outlook-help/automatically-move-or-delete-older-items-with-autoarchive-HA010105706.aspx
Auto Archive Explained for Outlook 2010: http://office.microsoft.com/en-us/outlook-help/autoarchive-settings-explained-HA010362337.aspx
Turning off AutoArchive, or manually archiving for Outlook 2010: http://office.microsoft.com/en-us/outlook-help/archive-items-manually-HA010355564.aspx
Outlook PST Size limitations:
Outlook 2003 default is 20GB, but it can be changed: http://support.microsoft.com/kb/832925
Outlook 2007 default is 20GB, but it can be changed: http://support.microsoft.com/kb/832925
Outlook 2010 default is 50GB, but it can be changed: http://support.microsoft.com/kb/832925
Searching PSTs
For Outlook 2003 with latest updates:
- Open PST in Outlook
- File > Open > Outlook Data File
- When using Advanced Find make sure the archive.pst file is select to be searched.
For Outlook 2007:
- Ensure Windows Search is installed
- Go to Control Panel > Index Options and ensure your achive.pst is selected to be indexed.
- Now when you run a search, ensure “search all Outlook folders” is selected. This will now allow the user to search ALL folders in Outlook at once, including the archive.pst.
For Outlook 2010
- Ensure archive.pst is open in Outlook
- Search using Instant Search in Outlook or Windows Search
Searching doesn’t work in Outlook2007 and 2010: Troubleshooting steps you can do:
- Check the Event Logs for anything unusual with Office, Outlook, or Windows Search, and troubleshoot the errors that you find.
- Ensure that the pst file has been marked for being indexed:
- Outlook 2007: Tools > Options > Search Options
- Outlook 2010: File > Options > section Search > Indexing Options > Modify > Microsoft Outlook
- Ensure the pst hasn’t gone over it’s maximum limit, if it has you will need to run scanpst.exe to repair it (you will lose some data within the PST, and there’s no way to control what will be removed). If not, skip to Step #4. Scanpst.exe can be found in different places depending on the version of Outlook you have:
- Outlook 2010
i. Windows: C:\Program Files\Microsoft Office\Office14
ii. Windows 64-bit: C:\Program Files (x86)\Microsoft Office\Office14
iii. Outlook x64: C:\Program Files\Microsoft Office\Office14
- Outlook 2007
i. Windows: C:\Program Files\Microsoft Office\Office12
ii. Windows 64-bit: C:\Program Files (x86)\Microsoft Office\Office12
- After the repair has completed, open Outlook again and allow it to index (how long depends on how big the PST is). If you check the Indexing Status, you should see it update at least every half hour.
i. Check Indexing Status in Outlook 2010: Click in Search field > Click Search Tools button > Select Indexing Status
ii. Check Indexing Status in Outlook 2008: Click on Tools > Instant Search > Indexing Status
- Proceed to Step #4.
- Disable and then re-enable the file for indexing. Go to Search Options and remove the checkmark for the PST that is giving you issues. Close Outlook and wait a couple of minutes. Open Task Manager and ensure Outlook.exe is not running anymore. Once you’ve confirmed it’s stopped running on its own, open Outlook again and go back to the Search Options and put a check mark back on the PST that was giving you issues. Leave Outlook open and alone and allow it to index until that Indexing Status says “0 items remaining”.
- If after indexing, it still doesn’t go down to “0 items remaining”, or isn’t even close, or the search STILL isn’t working properly, it’s possible the search index is corrupt. To rebuild it, go to: Control Panel > Indexing Options > Advanced > Rebuild. This is something that would best be done overnight as it will not only slow down Outlook, but slow down the computer as well.
- If rebuilding the Search Index still doesn’t work, then you may need to “Restore Defaults” . On Windows 7, this can be done by clicking on the “Troubleshoot search and indexing” link under Control Panel > Indexing Options > Advanced. Then click on “E-mail doesn’t appear in search results”.
- If after all of that, it still doesn’t work, it’s possible you have a corrupt PST. In which case, follow through with step #3.
- If that still doesn’t work, consider patching up Microsoft Office to it’s latest updates.
- If that doesn’t work, consider repairing Microsoft Office by going to: Control Panel > Uninstall a Program > Microsoft Office 2010 > click on the Modify button > Click Repair. Proceed to Step #4.
- If that still doesn’t work, create a new PST and import the data (using the Import function, or drag and drop) from the bad PST into the new PST. Proceed to Step #3.
LifeSize: Establishing A 3-Way Call
Tuesday, November 27th, 2012- Established the first call.
- Use the Call button on the remote to bring up the address book screen (aka Call Manager).
- Highlight the Requested call to add.
- Clicking OK on the remote.
- The second call added will appear side-by-side with your video of your call on the 2nd monitor. Your call should then appear on the first monitor of each of the two callers with their screen side-by-side with the first one you added on their second monitor.
- When the call is finished, click on the hang up button on the remote to bring up Call Manager.
- Click on the Hang Up button again to disconnect all users.
- OR at this point you could also add another call, bandwidth permitting.
- If you start a presentation while on the call then all callers will be tiled on the main screen and the presentation will play on the second screen.
Repeat this process to add more and more callers. If you have an RJ-11 w/ POTS you can also add voice callers. Granted they can’t see anything you’re piping over the video, but they can still participate in the areas of calls where they don’t need video.
Monitor Apache Load Times
Saturday, November 24th, 2012When troubleshooting apache issues it becomes necessary sometimes to turn up the level of logging so that we can further determine what a given server is doing and why. One new handy feature of the Apache 2 series is the ability to log how long it takes to serve a page. This allows us to track load times throughout the entire website so that we can pipe it into our favourite analytical tool such as splunk or for you old admins, webalyzer or awstats.
Adding this new variable is straightforward. Just navigate over to your httpd.conf file and look for the section that defines the various log formats. We’re going to add the %D variable there which represents the time it takes to serve a page in microseconds. Here is my httpd.conf for example:
bined
LogFormat “%h %l %u %t \”%r\” %>s %O \”%{Referer}i\” \”%{User-Agent}i\”" combined
LogFormat “%h %l %u %t \”%r\” %>s %O” common
LogFormat “%{Referer}i -> %U” referer
LogFormat “%{User-agent}i” agent
The quick and dirty way to get this mod installed is to look for the type of log that your server is configured to use (usually common or combined) and add the %D to the end (although you could put it anywhere) As you see below I’ve added it to the combined part of the logfile.
The other option is to make a new type of log and put it in there. I’m going to make a new LogFormat named custom and put it there below. Note that you’ll have to make sure that your vhost is set to use this type of log.
Bash Tidbits
Friday, November 23rd, 2012If you’re like me you have a fairly customized shell environment full of aliases, functions and other goodies to assist with the various sysadmin tasks you need to do. This makes being a sysadmin easy when you’re up and running on your primary machine but what happens when you’re main machine crashes?
Last weekend my laptop started limping through the day and finally dropped dead and I was left with a pile of work yet on my secondary machine. Little to no customization was present on this machine which made me nearly pull out my hair on more than one occasion.
Below is a list of my personal shell customizations and other goodies that you may find useful to have as well. This is easily installed into your ~/.bashrc or ~/.bash_profile file to run every time
export CLICOLOR=1
export LSCOLORS=GxFxCxDxBxegedabagaced
export SN=`netstat -nr| grep -m 1 -iE ‘default|0.0.0.0′ | awk ‘{print \$2}’ | sed ‘s/\.[0-9]*$//’ `
export ph=”phobos.crapnstuff.com”
PS1=’\[\033[0;37m\]\u\[\033[0m\]@\[\033[1;35m\]\h\[\033[0m\]:\[\033[1;36m\]\w\[\033[0m\]\$ ‘# Aliases
alias arin=’whois -h whois.arin.net’
alias grep=’grep –color’
alias locate=’locate -i’
alias ls=’ls -lh’
alias ns=’nslookup’
alias nsmx=’nslookup -q=mx’
alias pg=’ping google.com’
alias ph=’ping phobos.crapnstuff.com’
alias phobos=’ssh -i ~/.ssh/identity -p 2200 -X -C -t alt229@phobos.crapnstuff.com screen -R’
alias pr=’ping `netstat -nr| grep -m 1 -iE ‘\”default|0.0.0.0′\” | awk ‘\”{print $2}’\”`’
alias py=’ping yahoo.com’
At the top of the file you have 2 variables that set nice looking colors in the terminal so make it more readable.
One of my faviourite little shortcuts comes next. You’ll notice that there is a variable called SN there and it is a shortcut for the subnet that you happen to be on. I find myself having to do stuff to the various hosts on my subnet so if I can save having to type in 192.168.25 50 times a day then that’s definitely useful. Here are a few examples of how to use it:
ping $SN.10
nmap -p 80 $SN.*
ssh admin@$SN.40
Also related is the alias named pr. This finds the router and pings it to make sure it’s up.
Continuing down the list there is the alias ph which goes to my personal server. Useful for all sorts of shortcuts and can save a fair amount of work. Examples:
ssh alt229@$ph
scp ./test.txt alt229@$ph:~/
There are a bunch of other useful aliases there too so feel free to poach some of these for your own environment!
Playing Taps
Wednesday, November 21st, 2012It seems like the whole world’s gone mobile, and along with it the tools to transition the stampede of devices coming through businesses doors into something manageable. For iOS, it wasn’t long ago that activation was through iTunes only(*gasp!*) and MDM was a hand-coded webpage with xml and redeemable code links on it. Back then Apple ID’s were a monumental headache (no change there) and Palm wasn’t dead yet. It could cause one to reminisce back to the first coming of Palm. Folklore has it there was a job duty at Palm called ‘tap counter’, to ensure nothing took longer than 3 taps to achieve. If you’ve deployed any number of iOS devices like iPads, you may be painfully aware just how many more than that there are just to take one of these devices out of the box before they get into a usable state:
Manually doing each individual device “over the air”, you need to tap 16 times to activate and use the device with an open wireless network (17 if it’s a newer iPad with Siri integration)
And the ‘iTunes Store Activation Mode’ method leaves 9 taps, since it skips the language selection and time zone choices along with the option to bypass Wi-Fi setup.
If you have access to a Mac running Apple Configurator, it takes only 13 after ‘Prepare’ the device for use. It would seem like things haven’t actually improved. But Apple Configurator has more tricks than just the newer one we discussed recently, which is getting Apple TV’s on a wireless network. When you want to do iOS’s version of Managed Preferences, configuration profiles (a.k.a .mobileconfig files,) that’s another two taps PER PROFILE. This is an opportunity to really learn to love Apple Configurator, though, as it shows two of it’s huge advantages here (the third being the fact it can do multi-user assignment on a single iPad, including checking sets of applications out and reclaiming the app licenses as desired)
- You can restore a backup of an activated device (or as many as 30 at once), which answers all of the setup questions in one automated step (along with any other manual customizations you may want)
- If you put the device in Supervision mode, you can even apply configuration profiles WITHOUT tapping “accept” and “install” for each and every one
There are so many things to consider with all the different ownership models for apps, devices, and the scenarios regarding MDM and BYOD, I thought it was worth just to have a mini-topic of ‘how do folks approach getting them iPads out of the box and into a usable state?’
OS X Server backup in Mountain Lion (and beyond)
Monday, November 19th, 2012Data backup is a touchy subject. Nobody does it because they want to. They do it because sometimes bad things happen, and we need some way to take a dead server and transform it into a working one again. For Mac OS X Server, that wasn’t always easy. Because of it’s basic nature – a mixture of Open Source components and proprietary Apple technology – backing up OS X Server effectively would usually mean coming up with at least two backup solutions.
To help with all of this, 318 put together the sabackup package. Its purpose was to use Apple’s built-in server management command line tool (serveradmin) to export service settings in such a way that you could turn around and import them with serveradmin and get your server working again. I know that having those backed up settings not only allowed me to resurrect more than one server, but I also have used them to find out when a specific change was made. (Usually after we realized that said change had broken something.)
With Lion and Mountain Lion, Apple decided to address the problem of properly backing up services and service data, and Time Machine now includes a mechanism for backing up running on OS X Server. Inside the Server.app bundle, in the ServerRoot folder that is now the faux root for all Server.app services, you’ll find a ServerBackup command. This tool uses a selection of backups scripts in /Applications/Server.app/Contents/ServerRoot/usr/libexec that allow for backup and restore of specific services. There’s also a collection of SysV-style scripts in /Applications/Server.app/Contents/ServerRoot/etc/server_backup that contain the parameters that ServerBackup will use when backing up services. As with all things Apple, they’re XML Plists. Certain services merit their own specfic backup scripts: Open Directory, PostgreSQL, File Sharing (called “sharePoints” in this context), Web, and Message Server. The OD script produces an Open Directory archive in /var/backups, the PostgreSQL script produces a dump of all your databases, and Message Server will give you a backup of the Jabber database. Web backs up settings, but it’s important to note that it doesn’t back up data. And then there’s the ServerSettings script, which produces a serveradmin dump of all settings for all services. Everything is logged in /var/log/server_backup.
This is what sabackup was designed to do, only Apple has done it in a more modular, more robust, and 100% more Apple-supported way. With that in mind, we’ve decided to cease development on sabackup. Relying on Apple’s tools means that as new services are added, they should be backed up without any additional work on your part – ServerBackup will be updated along with Server.app.
ServerBackup has its quirks, mind you. It’s tied to Time Machine, which means Time Machine has to be enabled for it to work. That doesn’t mean you have to use Time Machine for anything else. If you exclude all the Finder-visible folders, you’ll still get a .ServerBackup folder at the root of the volume backup, with all the server backups. You’ll also get /private, including var (where backups and logs are), and etc, where a lot of config files live. You can dedicate a small drive to Time Machine, let Time Machine handle the backup of settings and data from Server.app services, and make sure that drive is a part of your primary backup solution. You do have a primary backup solution, don’t you?
Custom dynamic dns updater
Sunday, November 18th, 2012Serving pages over a dynamic ip can be frustrating, especially if you try to use a free dynamic dns account. Many of them expire if not used in X number of days, some cost more many than your actual domain and a lot of the built in clients in many of today’s popular routers don’t work reliably.
This is where some custom script foo comes in. Using industry standards like SSH, SSI’s and cronjobs we can setup a super lightweight script that sends your dynamic ip to a webserver so that it can direct visitors to your in house server.
The graphic below should help visualize:
As you can see from the diagram this script runs, gathers a single variable and then pushes it out to a server via ssh. From there the server calls that file and uses the ip as a variable to pass along to clients visiting the website by using a simple meta refresh.
Dynamic IP Configuration
After getting ssh keys setup there are really only 2 steps to getting this script to work. If you haven’t set those up before refer to this guide for help.
Step 1. Download the ip_updater.sh script here and change the following 4 variables to your own setup
IDENTITY = path to your ssh identity file (usually ~/.ssh/identity or ~/.ssh/id_rsa)
DEST_SERVER = ip or hostname of the server you’re sending your ip to
DEST_FILE = temp file on the server that holds your ip (/tmp/myip)
USERNAME = username to logon as
Step 2. Setup a crontab to run this script at certain intervals
Here is my sample crontab which runs this script once an hour at 15 after:
# m h dom mon dow command 15 * * * * /home/alt229/bin/ip_update.sh
Web Server Configuration
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Zync Catalog Redirect</title>
<meta http-equiv="refresh" content="0;URL='http://<!--#include virtual="cableip" -->'" />
</head>
<body bgcolor="#000000">
<p>Redirecting you to <!--#include virtual="myip" --></p>
</body>
</html>
When clients hit your server and get served this page they will automatically get redirected to your dynamic address.
Owncloud: Finally a Dropbox that can sync to your local LAN
Saturday, November 17th, 2012If I had a megabyte for the number of times I praised a cloud provider’s service while simultaneously lamenting that my data had to leave my LAN to live out the rest of it’s days on their servers then I’d have collected enough MB’s to fill a DVD.
That statement is definitely a tad hyperbolic but the need for good “cloud” software that average users can admin and control is definitely much sought after and needed.
Enter Owncloud which has the lofty goal of making all your data accessible everywhere and over all your devices. I said it was lofty right? I was more than a tad skeptical when I read this too but Owncloud delivers.
Setup is almost deceptively straightforward as all you have to do is download a tar file and extract it to your web root folder. From there, make sure your permissions are all owned by the apache daemon user (www-data for ubuntu and apache for redhat / centos). The only real tricky part is making sure you have all the prerequisites installed and have SSL running properly. Check the official site for a list of prerequisites http://owncloud.org/support/install/
wget http://mirrors.owncloud.org/releases/owncloud-4.5.3.tar.bz2 tar -jxvf owncloud-4.5.3.tar.bz2 mv owncloud /var/www chown -R www-data /var/www/owncloud/
You’ll want to make sure that the Allow Overrides variable is set to all or else the custom .htacces that comes with Owncloud won’t work and certain modifications (such as moving the data folder outside the web root) will need to be made due to security concerns.
Next step is to login to your domain and create a username and password. You also have the option of connecting to a mysql database or using SQLite. If unsure choose SQLite as it’s the easiest to setup and most compatible.
Next, you have to install the sync client on your local machine. Grab the latest version from the official website: https://owncloud.com/download.
Run the installer and open the app. The first time you run it it’ll require your connection settings. Enter them like so:
Hit next and with any luck you’ll be off to the races! The default folder is ~/ownCloud and you can start syncing files immediately simply by dragging and dropping.
Next time we’ll go over some more in depth configurations such as configuring contact / calendar syncing as well as syncing to an amazone s3 bucket.
If you get stuck anywhere in the process please refer to the official install guide located here: http://owncloud.org/support/install/
























