Archive for the 'OS X' Category

Hacking Time Machine

Posted by dre on August 8th, 2008

It’s “hack some shit up” Friday. Everybody ready?
Have a Time Capsule or Mac OS X Server configured to provide network time machine backups? Of course you do! Let’s examine the client / server interaction.
The Time Machine preference pane provides a list of available backup volumes. This list includes local volumes as well as network volumes. [...]

Applied Kerberos troubleshooting

Posted by dre on July 4th, 2008

The following is an IRC transcript taken from #afp548, irc.freenode.net. It chronicles the troubleshooting process of a fairly well-hidden edge case of Kerberos configuration in Mac OS X Server.
pastebin.ca was used to relay larger hunks of textual information; I’ve made local copies of the results since the pastebin pages expire in 1 month. Pastebin displays [...]

Exploring Leopard’s Local KDC

Posted by dre on May 13th, 2008

I recently had an excuse to dig into Leopard’s local KDC (LKDC), and have created a page on my wiki to hold the results. Some excerpts below:
The Local KDC (LKDC) is a Kerberos implementation that extends “single sign-on” capabilities into ad-hoc networks. The LKDC supports the AFP, CIFS, and VNC services included in Mac OS [...]

disksleep

Posted by dre on November 15th, 2007

The purpose of this script is to add a bit of granularity and intelligence to the energy saver settings in Mac OS X for disk sleep.
Problem: I want to let my disks sleep, but I HATE having to wait for a spinup while I’m working.
Solution: Allow the disks to spin down only when I’m not [...]

Apple airport base station monitor

Posted by dre on April 27th, 2007

Download.

{1} andre@dude [~] % airport -h
Program Options:
-h print this help
-d output in comma delimited format
[...]

The opposite of split is cat.

Posted by dre on January 2nd, 2007

/usr/bin/split and /bin/cat, that is. Why is this useful information? Let’s imagine a wonderful world in which your web host gives you oodles of bandwidth and disk quota, and then one day secretly enacts a policy that disallows access to files over a certain (largish) size. Say, something like:
[Tue Jan 02 13:07:24 2007] [error] [client [...]

Installing perl modules locally

Posted by dre on December 6th, 2006

Dealing with CPAN has always felt a little weird. Today I found a nice shortcut for getting perl modules installed in a home directory, which is really useful for when you don’t have admin on the box, or if you simply prefer to keep your custom perl stuff all cinched up in a tidy homedir [...]

VLC and wireless networks

Posted by dre on October 27th, 2006

I typically keep all my digital media on either my desktop at home or my server, but I like to watch it on the laptop while reclining in my papasan chair, or perhaps just kicked back in bed. The problem is that certain files will stutter occasionally during playback, even though the bitrate of the [...]

Decrypting afp mount strings

Posted by dre on September 15th, 2006

{10} andre@werk [~] % mount | grep /Volumes/andre
afp_006Af01nOUmc001Eic06SdO0-1.2c0000ae on /Volumes/andre (nodev, nosuid, mounted by andre)
Huh? how helpful is that! How can I tell what server it came from? Yeah, I could netstat, but what if there’s a bunch of AFP sessions open?
DisplayURL to the rescue!
{12} andre@werk [~] % ~dre/bin/DisplayURL /Volumes/andre
url: “afp://idio.dreness.com/andre”
kCFURLComponentScheme: “afp” including separators: “afp://”
kCFURLComponentNetLocation: [...]

Spotlight indexes on read-only media

Posted by dre on September 8th, 2006

Here’s a way to let spotlight do a full content index of a read only CD. It can even persist across uses :)
#!/bin/sh
# pass in the name of the r/o volume, e.g. DiskWarriorCD
# this is proof of concept only. seriously :)
if [ ! $1 ] ; then echo “supply a volume name” ; exit 1 [...]

adduser script for Mac OS X / Mac OS X Server

Posted by dre on July 9th, 2006

http://www.dreness.com/bits/tech/adduser.html (syntax colored)
http://www.dreness.com/bits/tech/adduser (raw)

The /usr/bin/defaults command gives us basic command line access to the Mac OS X preferences system. I say ‘basic’ because it provides no facility for directly operating on any keys / values that are not at the top of the heirarchy. For example:

{8} andre@werk [~] % defaults read com.apple.finder ComputerOptions
{
ComputerListViewColumnFlags = [...]

Managing dual boot Macs

Posted by dre on May 30th, 2006

How I learned to stop worrying and image / restore those dastardly windows NTFS partitions:
http://www.bombich.com/mactips/dualboot.html

The Journeyman’s Guilde to Quicktime Presentations

Posted by dre on April 29th, 2006

This guide will demonstrate a method for creating multi-track, multi-media, self-contained quicktime movies. A good example of this would be the presentation format where there are multiple tracks of media that need to be coordinated with specific timings. Perhaps there is a ‘talking head’ video track, and a series of slides that need to be [...]

Cacti in Tiger Server

Posted by dre on April 29th, 2006

Install XCode
Install and configure darwinports
Download the newest version from macosforge.
Add the darwinports paths to your shell config file. e.g.
PATH=”/opt/local/bin:/opt/local/sbin:/usr/local/bin:/usr/local/sbin:$PATH”
Update the ports collection
sudo port -d selfupdate
Install rrdtool from darwinports
Execute the following to install rrdtool and all of its dependencies for you.
sudo port install rrdtool
Local user setup [...]