• Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Disable Natural Scrolling With a Script

    I guess it’s a sign of my age. But I can’t stand that whole natural scrolling thing. So I disable it as a part of my imaging process. To do so, set the com.apple.swipescrolldirection global domain to false using defaults, as follows: defaults write NSGlobalDomain com.apple.swipescrolldirection -bool false To set it back: defaults write NSGlobalDomain com.apple.swipescrolldirection -bool true

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Securely Empty The Trash By Default

    You can empty the OS X trash securely by choosing the Secure Empty Trash option from the Finder menu. However, you can configure the empty trash option to be a Secure Empty Trash operation. To do so, write an EmptyTrashSecurely key into the com.apple.finder.plist. Use defaults to write the key into this plist as follows: defaults write com.apple.finder EmptyTrashSecurely -bool true

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Network Infrastructure

    Simple Preflight and Sanity Checking in Scripts

    I was recently building some preflight scripts and was looking to record some information about a machine live, before proceeding with a script. I found the cheapest way to determine information about architectures and chipsets when scripting preflight scripts for OS X to be the arch and machine commands respectively. For example, to verify the architecture is i386, use the arch command with no options: /usr/bin/arch Which simply outputs “i386”: i386 To check the machine type, simply use the machine command: /usr/bin/machine Which outputs as follows: x86_64h

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment,  Network Infrastructure,  Programming,  Ubuntu,  Unix

    Opposite Day: Reversing Lines In Files

    The other day, my daughter said “it’s opposite day” when it was time to do a little homework, trying to get out of it! Which reminded me of a funny little command line tool called rev. Rev reads a file and reverses all the lines. So let’s touch a file called rev ~/Desktop/revtest and then populate it with the following lines: 123 321 123 Now run rev followed by the file name: rev ~/Desktop/revtest Now cat it: cat !$ Now rev it again: rev !$ You go go forward and back at will for fun, much more fun than homework… Enjoy!

  • Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Refresh OS X CRLs

    I recently found an existing image with a lot of stale crl information. We couldn’t rebuild the image, so we decided to instead refresh all of the crl information. This information is stored in /var/db/crls/crlcache.db. Deleting the file turned out to be problematic so we needed to clear items out of the tables instead. While this could be done using a few different tools, it turns out there’s a command built into os x to take care of this process for us called crlrefresh. To use crlrefresh to clean up stale crlinformation and fetch new crlinformation for all CRL and certificates, use: crlrefresh rpvv

  • Bushel,  iPhone,  Mac OS X,  Mac OS X Server,  Mac Security,  Mass Deployment

    Bushel Goes Into Invitation Mode!

    Yesterday the Bushel team finished some new code. This code allows you to refer your friends to Bushel! This skips the codes that everyone was waiting for and lets people create accounts immediately! From your home screen, click on Invite Friends. Or from the Account screen, scroll down to the section that says “Invite friends to join Bushel”. From here, you can post codes to Facebook, Tweet codes, post codes to LinkedIn and even email them. We’re not going into general availability just yet. But we’re definitely making it easier long-term to sign up and use Bushel! We hope you love it as much as we do! Since we’re still architecting how these…