Anyone who supports graphic designers learns to hate fonts. As tiny pieces of software loaded directly into the operating system, they're responsible for more than their fair share of system issues. So it goes with Tiger users whose systems freeze up on login, displaying nothing but their desktop background and a lonely spotlight icon in the upper left corner of the screen. The issue is so common, it's worth talking about for any shop that hasn't yet adopted Leopard. And like so many common problems, this one comes down to fonts again.
If you've got a box in this not-uncommon state, the important thing to remember is that it isn't locked up completely. The graphical interface may be frozen, but the Unix subsystem is still running just fine underneath. It's for times like these that it's so useful to have SSH (Secure Shell) enabled on client machines, which is done by checking "Remote Login" in the "Sharing" pane of System Preferences.
Faced with a machine that consistently lets users log in, but get no further, the problem is very often a corrupt font cache. This causes the system to have issues rendering type, prevents the menu bar from displaying properly, and therefore stops the login process before the user can take control of their work environment (even after reboot). One way to correct the problem is to type the following from the Terminal of another machine:
ssh USER@MACHINE 'rm -r /Library/Caches/com.apple.ATS/*'
Replace USER with the name of any administrative user, and MACHINE with the hostname or IP, belonging to the workstation. You'll be asked for that user's password, after which the command will remove the Apple Type Server caches from the frozen machine, and with them this issue. You can then safely restart, and login (as well as fonts) should function normally again.
Special Thanks: We were reminded of this problem (and this succinct solution) by Aaron Robinson, systems administrator at Seattle's fine Hornall Anderson Design Works.
Recommended Reading: For more information on corrupt font caches (and some products to clear them without the command line), you can check out the CreativeTechs QuickTips blog.
Posted on 20 August 2008 by Ellis Jordan Bojar
Since Mac OS X premiered in 2001, a wide range of applications have shipped with installers in Apple's .pkg format. While the contents of these installers were originally browsable in the Finder or from the command line, determining exactly what will be installed (and where) can still be a difficult and time-consuming process. It's made all the more frustrating by the fact that .pkginstallers lack an uninstall option, making such detective work a requirement to completely uninstall some third-party software. And in Leopard, there's a new "flat package" format, which can't even be read without Apple's Developer Tools.
That's where Suspicious Package comes in, a Quick Look plugin that lets you view exactly what and how will get installed by any package-format installer.

Just select a .pkg file in the Finder, hit the space key, and you're greeted with an interactive Quick Look window. The folder structure of the installer can be browsed using the unfolding arrows to the left of the file names, and the installation scripts can be read with the expansion button to the left of the script icon. Suspicious Package even lets you know if an installer requires an administrative password to run, or that your machine be restarted after installation.
Designed to do just one thing, and do it very well, Suspicious Package is an incredibly clever (and incredibly useful) little utility. It's also an enormous time saver, and a fantastic extension of Apple's Quick Look framework.
Suspicious Package is available for free from Mothers Ruin Software.
Posted on 16 July 2008 by Ellis Jordan Bojar
Last week, in part one of this series, we took began deploying Portable Home Directories, reviewing their prerequisites and enabling the mobile managed preferences. This week we'll continue the process, by setting up an AFP share to host our user homes and configuring our Open Directory accounts to take advantage of them.
Sharing Portable Home Directory Files:
In order to make your server-based home directories available to other machines, you'll need to share them out to your network (preferably via AFP). In Leopard, the "File Sharing" settings reside in the Server Admin application. Open it, then select your server name, and choose the gear-shaped "Settings" button from the toolbar. You'll see a collection of potential server features to enable (such as allowing SSH and ARD access) including a listing for "Server Side File Tracking". Checking the box and clicking "Save" will allow Mac OS X server to cache file changes prior to synchronizing home directories, which offers a significant performance boost over Tiger's system of scanning and comparing home directory contents.

Next, select "File Sharing" from the Server Admin toolbar (or the equivalent settings in Tiger's Workgroup Manager). If your server has fast redundant disk space available to hold your portable home directories, there's not a compelling reason to not just share out /Users. If you have a large number of users (or a small boot disk), you'll want to create a separate share on external storage. In either case, select the "Volumes" and "Browse" buttons below the toolbar and select the folder you'll be using for your Portable Home Directories, then click the "Share" button right above the file browser and "Save" at the window's bottom-right.

Once you share the directory, a new "Share Point" button will appear at the center of the "Sharing" pane. Select it, then check "Enable Automount". You'll then be asked to enter an administrative user name and password for your Open Directory domain. Keep the default setting of mounting user home folders over AFP by clicking "OK", then move on to the "Protocol Options" button below it.
When Portable Home Directory deployments go wrong, it's usually at this stage. In the AFP "Protocol Options", be sure that "Allow AFP guest access" is checked (you'll also want to uncheck the options to share via SMB, FTP, or NFS). If you have other AFP shares active (which you most likely do), be sure guest access is turned off on the rest of them. Then select "AFP" from the service list on the left of the Server Admin window, choose the "Access" pane, and check "Enable Guest access" there as well.

This may seem counterintuitive, as guest (or unauthenticated) access to the home directory share may sound like a terrible idea. In most cases you wouldn't want any data shared out to network guests, and Apple even forces you to confirm the setting in two separate places. In the case of Portable Home Directories, however, the shared volume gets automounted prior to any user logging in. The data inside each home directory stays private, but the root of the share needs to be accessible to any machine bound to the Open Directory domain. Guest access is the mechanism through which this is achieved, and without it the remainder of your deployment process won't get anywhere.
Assigning Portable Home Directories To User Accounts:
Now that your mobility preferences are set and your AFP share is set to automount, the final step is assign home directories to your existing users. Open Workgroup Manager and select "Accounts" from the toolbar, then highlight a test user from the left column and choose the "Home" pane. By default, two options are offered as home directory locations, /Users and None. Instead, click the "plus" button at the bottom of the list to add an additional option.

In the dialog sheet that appears, use the first field to enter the AFP address of the home directory share in URL format (such as afp://server.example.com/Users). In the second field, fill in just the name of the user's home directory, which should be the same as their account "short name". In the third field, enter the full path of the automounted home share as it will appear on client machines. This begins with /Network/Servers/, then the address from the first field minus the afp:// prefix, and finally the user's short name. When all three fields are filled properly, click "OK", then assign the user a disk quota (somewhere between 20-40GB is reasonable for most user environments) and hit "Save".

With this first account done, you can now highlight all the users who'll be getting mobile accounts, select your pre-configured share point, assign a quota, and save those settings to the entire list at once. If these are new accounts, you can even use the "Create Home Now" button to populate your AFP share with custom home directories. If you'll be syncing existing home directories on client machines, you don't have to create a home folder at all, instead allowing the data to copy to the server on their next network-based login.
Recommended Reading: For the full story on Portable Home Directory setup, try the essential Leopard User Management Guide [PDF - 2.5MB] at Apple.com.
Posted on 2 July 2008 by Ellis Jordan Bojar
Available since version 10.4, Portable Home Directories have become one of the most elegant and well-implemented features of a full Mac OS X Server deployment. Functioning much like Windows' roaming profiles (or earlier Solaris NFS/NIS environments), they allow a user to log in from any computer on your network while retaining their personal data and settings. Unlike entirely network-based systems, however, they do so by synchronizing user data to the server (so that a full copy of the home directory exists in both locations), eliminating the need for constant connectivity.
Portable Home Directories make for simpler backup of user data, both by copying off the server rather than each client machine, and by allowing remote users to synchronize via VPN. They also free users from being tied to a single machine, allowing for greater flexibility and less service down-time. It's because this functionality is so powerful that it's often assumed to be difficult to put into practice. Instead, with the proper infrastructure already in place, deploying Portable Home Directories is practically the reward for having done everything else right.
Planning For Portable Home Directories:
Before you actually implement any kind of server-based account storage, you'll want to make sure you have sufficient storage and bandwidth on an available OS X server. This may seem obvious to some, but for reasonable performance, fifty users with a 40GB quota requires at least 2TB of relatively high-speed (and hopefully redundant) disk attached to a gigabit network switch. This isn't an exotic setup by any means, but it may be more than you just have lying around.
You'll also need clients bound to a functioning Open Directory environment, complete with internal DNS. If you don't yet have this set up, refer to our earlier series on how to master Open Directory. Once Directory Service users and groups are in place, Portable Home Directories are nothing more than cleverly deployed managed account preferences. There's a lot to keep track of, but very little you wouldn't already know how to do.
Configuring Portable Home Directory Preferences:
In Workgroup Manager, browse to the "LDAPv3" directory (as opposed to the local user directory), then choose the multi-headed "Groups" button on the left and the "Preferences" icon from the toolbar. Select the group (or groups) you're offering Portable Home Directories, then click the "Mobility" icon in the center of the window to configure that group's settings. If you're deploying this feature to all your users, you're better off creating an all-encompassing "Employees" group to do so.

Beginning in the "Account Creation" tab with the "Creation" pane, choose to manage these Preferences "Always", the check "Create mobile account when user logs in to network account". Uncheck the box which requires confirmation, as this allows the user to skip the Portable Home Directory set up for their individual account. Below that, choose to "Create home" directories "with default sync settings".

Next comes the Account Expiry tab, new to 10.5. By allowing you to set a time limit after which the client-side copy of a home directory expires, it helps clean up the occasional "orphaned" set of user data (a full home directory left, for instance, on a machine only used once by that user during maintenance on their own machine. This feature can reduce the chance of accidentally filling client machines with multiple unused accounts, but does so at the risk of letting the computer determine when data should be disposed of. If you enable it, do so with caution.

Finally, the "Rules" tab lets you set what data will synchronize and when. Start with the "Login & Logout Sync" pane and once again click the button to "Always" manage, then check the box to "Sync at login and logout". The first list above allows you to set which directories you'll sync, and unless you feel you can fully predict your users' behavior the best approach is usually to select the entire home directory (as represented by the tilde symbol). You can then choose what not to sync in the second list below, including full paths, partial names, and even regular expressions. Be careful if you delete any of Apple's pre-configured items to skip, especially ~/Library/Application Support/SyncServices, which can result in synchronization issues and potentially data loss. The "Merge with user's settings" box allows you to decide if individuals can add or subtract to the list of data being synchronized.
The Background Sync pane, functions identically, and in most cases makes sense to configure identically as well. The only exceptions would be huge local files which change often, or live databases which won't sync properly. The Entourage database, for instance, sits both criteria and should be excluded from background synchronization. The "Options" pane also allows you to choose how often background sync takes place. With your configuration decided, click the "Apply Now" button to save your settings.
Next week, in part two, we'll set up the AFP share where your new Portable Home Directories reside and configure your Open Directory accounts to store user data there.
Recommended Reading: While I might not recommend implementing it in a production environment, Greg Neagle's multi-part article on Portable Home Directory Without Open Directory provides fantastic under-the-hood information on exactly how Portable Home Directories function at his "Managing OS X" blog.
Posted on 25 June 2008 by Ellis Jordan Bojar
We've written about launchd (the daemon which governs OS X system processes) before. We've detailed its xml-based syntax, even as we've struggled to remember every tag and attribute. We could have saved ourselves the trouble and pointed to Peter Borg's Lingon, the free graphical editor for launchd plist files.
Inexplicably named for a swedish berry, with an icon like the giant red ball from Alias, Lingon's odd presentation quickly gives way to its powerful and convenient functionality. Its main panel allows you to create and edit launchd jobs with just their names, the Terminal command or script they run, and their scheduling options.

An advanced mode offers syntax-colored construction of the full range of launchd options (such as inetd compatibility, hard resource limits, and listening sockets). For power-users, Lingon is a tremendous time-saver, eliminating a great deal of referencing and proofreading for what amounts to an occasional task. For the novice, it's like Dreamweaver for dangerous system modifications.
Lingon has one major annoyance: The inability to save files anywhere other than live system directories. This isn't so bad if you're composing your plist files on a system that's meant to run them. If you're composing a launchd job for another machine (or many others), you must save it first without enabling it, then fish it out of the directory Lingon squirreled it away in. A "Save As" feature would go a long way here, and the absense of one could cause serious trouble for a careless user.
Despite its eccentricities, Lingon is an impressive tool, simple when it needs to be and complex where it has to. It's also a generous open-sourced contribution to the Macintosh administration community.
Lingon is available free of charge.
Posted on 28 May 2008 by Ellis Jordan Bojar
Earlier Posts »