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

    What Changed On My Mac?

    According to Wikipedia, fsevents is an API from Apple that allows applications to register for notifications of changes to a given directory tree. This means that when something changes, an application (or daemon/agent) can see the change and take action or track what happened. For Linux, there’s a similar tool in iNotify. This time of the year, a lot of imaging and packaging is going on at schools and companies around the world. A lot of people are also moving various settings out of images and into either post-flight packages, automations or managed preferences of some sort. In OS X, it’s easy to make a change on a computer and…

  • Mac OS X,  Mass Deployment

    Pushing Wireless Networks Out

    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. By default this is called AirPort, so the default command to see all wireless…

  • Mac OS X,  Mac Security,  Mass Deployment

    Automating Locations with networksetup

    The new location options in networksetup are pretty interesting and while I’ve mentioned them in writings in the past I thought I would explore scripting against them, as they do reflect an interesting new challenge, mostly if you’re looking to script against non-booted volumes. To script against a booted volume is fairly straight forward. You have the -listlocations, -getcurrentlocation, -createlocation, -deletelocation and -switchlocation options which lists all locations, lists the current location, creates a location, deletes a location and potentially switches a location. To get started, first look at what locations your system has: networksetup -listlocations If you are on a freshly installed system you should see Automatic as your…

  • Mac OS X,  Mass Deployment

    Managing Airport Settings from the Command Line

    From time to time we will end up writing shell scripts that do a number of tasks with airport interfaces in Mac OS X, including automatically detecting networks and disabling the card based on TCP/IP settings/location, querying signal strength for positioning of WAPs and joining specific wireless networks.  As such, a couple of commands keep coming up, since the airport card in a Mac can be controlled in a number of ways from the command line.  First and foremost – it can be enabled and disabled using the networksetup command, located in /usr/sbin.  The option to use with the command is -setairportpower which is boolean as on or off.  So to…

  • Articles and Books,  Mac OS X,  Mac OS X Server,  Mass Deployment,  Xsan

    Article on scripting networksetup for Xsan on Xsanity

    Wondering why I’ve been a little light on Xsan postings? I posted an article on how to write a script to automate the setup of the Metadata and house networks in an Xsan environment on Xsanity. It uses networksetup for the most part and is meant to be a hybrid between a networksetup walkthrough and a mini-shell scripting tutorial. It can also be leveraged for scripting the initial setup of your clients in an imaging workflow, although you will typically not need to use static IP addresses in a mass deployment scenario.