• Mac OS X Server,  Mass Deployment

    iCal Server en Masse

    Deploying iCal Server across a large number of systems at first seems somewhat time consuming. But there are a few options to make things easier than manually touching each system, or trying to script the setup process. When you first open iCal, it will allow you to do an Automatic setup using your email account and password. The server that it will setup this information for is based on a service record (SRV) for CalDAV being found in DNS. For automatic deployment of an iCal Server you can build a service record in DNS that will point to the server. The record should have the following settings (you can leave…

  • Mass Deployment

    %@ vs. `whoami`

    When scripting login events for Mac OS X, there are a number of ways to pull the name of the existing user. The easiest is likely to use the whoami command, which reports back the user name that is currently logged into a system. To do so you can simply run whoami. You can also place `whoami` in scripts where you want the current user to run, unless you have elevated privileges when running the script. For example, when a user logs in, if you want to mount their home directory and it’s on a server called myserver.domain.com then you could use: mkdir /Volumes/`whoami` mount_afp ‘afp://server.example.com/Users/`whoami` /Volumes/`whoami` If you run…

  • Uncategorized

    Mac OS X Server and Quotas

    There are a number of ways to handle quotas in Mac OS X Server. To enable quotas is simple enough. If you open Server Admin and then click on Share Points and then the volume, you can check the box for enable quotas on this volume. It will take awhile for the data to load once you’ve clicked save, but then it will show you how much space is in each users quota. You’ll then notice the .quota.ops.user and .quota.user files at the root of the file system you just enabled quotas for. If you enable group quotas then you will see .quota.group and .quota.ops.group as well. Since these are…

  • Mac Security

    Google Hax0ring a Neighborhood Near You

    I seem to remember that Google once made a promise to do no evil. This doesn’t mean they don’t occasionally do wrong, but they continue to react in ways that are appropriate and keep the wrong from becoming evil. Google Maps is one of my favorite parts of the web. Before I book a hotel room I usually check out the area from a few different angles. In part, this is made possible by the Google street view cars. These little cars zip around the globe taking images of the front of our homes, out potential hotels and even catch people doing things they shouldn’t. But those same cars were…

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

    One More Character In Serials

    Yesterday I showed a way to get the serial number from a Mac OS X machine. However, as a couple of people pointed out, Apple will soon be adding another character to the serial number. This means that rather than use cut I should have used awk to allow for either serial number length. To grab the serial this way: ioreg -l | grep IOPlatformSerialNumber | awk ‘{print $4}’ Or without the quotes: ioreg -l | grep IOPlatformSerialNumber | awk ‘{print $4}’ | sed ‘s/”//g’

  • Mac OS X,  Mass Deployment

    Grabbing Serials and MAC Addresses

    During various automations in Mac OS X it helps to grab some key unique identifiers for machines. Two very common identifiers are the serial number of a computer and the MAC Address. To grab a systems serial number I usually use ioreg to run the following, which simply outputs a systems serial number: ioreg -l | grep IOPlatformSerialNumber | cut -c 37-46 Because a system can have multiple MAC addresses (one per unique adapter), I will also use ioreg to grab those: ioreg -l | grep IOMACAddress Or to just see an output of the first in the list (en0): ioreg -l -w 0 | grep IOMACAddress | cut -c…

  • Articles and Books,  Mac OS X

    Time to Read MacTech

    Haven’t had much time to read, but now that I have a couple of books completely finished I can sit back and get caught up on my reading. And it is worth mentioning that the very first reading that I’ll do is getting caught up on the articles in MacTech Magazine, which is the only magazine I actually pay for. If you don’t get it yet, you really should check it out:

  • personal

    Minneapolis HackerSpaces

    Minneapolis has a HackerSpace located at 3119 E. 26th Street in Minneapolis, MN 55406. Monthly donations are $50, but there are a number of free events that can be found on their twitter page: http://twitter.com/tcmaker HackFactory of Minneapolis Tour from David Bryan on Vimeo. Find them on the web at http://www.tcmaker.org.

  • Mac OS X,  Mass Deployment

    Scripting a Battery Sanity Check

    When I’m running a script that might be somewhat time intensive I like to check the battery of the MacBooks first. Otherwise I might end up hosing some machines that die out in the middle of a script. To do so I’ll use ioreg to grab the maximum load that a battery can sustain, stored in MaxCapacity: capacity=`ioreg -l | grep MaxCapacity | cut -c 35-39` Then I’ll grab the current load on the battery, stored in CurrentCapacity: current=`ioreg -l | grep CurrentCapacity | cut -c 39-43` Finally I’ll grab a percentage: echo “scale=2; $current*100/$capacity” | bc If the percentage is above a certain threshold then I’ll run the script,…