Home Directory Helper

Anyone whose ever implemented networked home directories on and OS X Server has probably come across the need to add or remove preference files from user accounts. Changing settings for new accounts is easy, just add the files to the User Template folder.

Existing users is a different story though. They already have their home directories. Depending on how many users you have, adding/deleting files from you old users can be a daunting task. Ten users is easy enough, but 50 is silly and over 100 is ridiculous.

Long ago I wrote a series of scripts (well actually just one) that I use and modify for whatever files I need to change. I basically just loops through each home folder in a specified directory. It’s really a pretty basic script. Here’s an example of one that I was using:

# Copy new dock and fix permissions

echo "\ncpdock.sh"

dir=`ls $1`

cd ${1:?"No directory specified!"}

echo "PWD = `pwd`"

echo "\n$dir\n"

for folder in $dir; do
    echo "...copying dock plist to $folder"
    cp /com.apple.dock.plist $folder/Library/Preferences/com.apple.dock.plist
    chmod -R 700 $folder/Library/Preferences/com.apple.dock.plist
    chown -R $folder:staff $folder/Library/Preferences/com.apple.dock.plist

That’s easy enough. It’s kind of a pain though to modify the scripts all the time. Also, it’s very difficult (and scary) to try and explain how to use these scripts to my less Bash-inclined co-workers.

The other day I found this great little piece of software written by Nicole Jacque called Home Directory Helper. It does exactly what all of my scripts did, except with an easier to use GUI interface. Very nice, and highly recommended.

Madden ’09: Madden-sized Disappointment

I finally got my hands on my copy of Madden ’09 earlier this week. I had actually gotten the game pre-ordered way back in early-July, but didn’t end up getting it until this week.

Let me get this part out of the way first: Dear EA Sports. For the love of god, please hire some fracking user interface designers. The user interface for Madden sucks, and seems to get worse every year. Quit spending all of your time making everything glossy and shiny. Just make it better. If you’re unsure of how to do this, WWDC might be a good place to start.

Moving on. My first impressions of the game went something like this:

  • Loading, Waiting, Loading, Waiting
  • Madden Test. Neat idea. What’s with the weird glassy field and see-through players?
  • Apparently I am close to all-madden on offense, but am still at rookie level on defense. Interesting. The combined IQ puts me at below 500.
  • Loading, Waiting, Loading, Waiting
  • Start up franchise mode. No need to save, I just started.
  • Start first game. Oh wait, I can practice for points. Umm, really confusing, I have no idea what I’m doing. OK, I completely buggered up whatever that was. Let’s start the goddamned game already.
  • Loading, Waiting, Loading, Waiting
  • Because of my offense in the madden test, playing offense now is completely impossible for me. I quickly throw one interception and punt twice. Despite my rookie-level defensive settings, the Jaguars quickly pass and rush their way down the field and score on me. This is not going very well.
  • What’s with all of the ridiculous camera angles?
  • Is it just me or is the game-pace faster?
  • Sometime in the late first quarter or early second, I call a play from the play call screen. The sound continues, but the screen freezes at the play call. I hear my players run the play I called, the controller vibrates, announcers continue talking. I can actually continue picking plays an even call timeouts, but the screen is completely frozen. I have to restart the game.
  • At this point, I realize that I had not saved anything yet and decide that maybe I would rather do something else.

That was Wednesday night. Thursday night went like this:

  • Repeat all steps from Wednesday night

So basically, I’ve attempted to play exactly two franchise games. I have not even made it to halftime without the game freezing on me. WTF EA Sports. This is the sorriest excuse of a release game. It is unplayable. Even worse, a quick Google search shows that I’m not the only one:

Madden Freeze Search

Keep in mind here that this game is brand new and I played it exactly twice; both times it froze. My PS3 is only a couple of months old as well. The official EA Forum has a thread about the freezing issues. It’s currently 37 pages long.

I was really hoping that this game would look great on the PS3. I didn’t expect for it not to work at all. I really hope that that class action lawsuit succeeds and they sue the shit out of EA.

Discover which programs prevent disk image ejection

I stumbled across this great tip the other day about solving that pesky error message that happens when you try and eject a that is busy disk. This seems to happen all too often, I’ll try and eject one of my external hard drives and get the message even though there are no visible programs using it. Sigh. Use this commmand in Terminal:

lsof | grep DISKNAME

Read the full tip from Mac OS X Hints.

Leopard Server Quickstart Guide

Corey Carson was written a fantastic quickstart guide for Leopard Server.

This updated quickstart guide is very similar to the Tiger Server Quickstart Guide posted in 2005. It’s primary purpose is to get you up and running quickly, overcoming common hurdles such as DNS and binding confusions. With the move to launchd over cron, those steps are now included as well.

You can grab the pdf at AFP548.com.

The article includes some particularly good instructions on using and setting up rsync, launchd, and Network Home Redirector.

Via Infinity’s End.

You Are Unable to Log in to the User Account at Time

This one is just a quickie, but I thought I’d post it because I know that I’ve gotten this message before and that there is very little useful information turned up in a relevant Google search.

At my work we use an OS X server to host the home directories of all of our users who log in to our lab computers. We currently only support OS X clients, so we’re only doing this over AFP. Last semester we used a Tiger server and clients, but this summer we are upgrading everything to Leopard.

After setting up a test client computer in Directory Utility (used to be Directory Access in Tiger) to connect to our server I figured we were good to log in with one of migrated user accounts. We don’t do binding or Active Directory or really anything complicated so usually the process is pretty straightforward.

After setting up the client and restarting, I attempted to log on using one of our network users, and was met with this big fat error message:

You are unable to log in to the user account [username] at this  time

Not only did not logging in not work, but the entire description of the error read “Logging in to the account failed because an error occurred”. Gee, thanks Apple. Very useful.

This error wasn’t entirely foreign to me. I remembered seeing it occasionally in Tiger, but couldn’t remember if we had ever established a cause, let alone a solution. Just for kicks I tried logging on with the same account on one of our older Tiger clients (that was known to work with the old Tiger server). The message is slightly more verbose, but generally still the same:

You are unable to log in to the user account [username] at this  time (Tiger Message)

I knew that AFP was working because we had some share points up and running. So, AFP and at least some level of authentication were working. After inspecting the server firewall and open directory logs, as well as the client logs, it seemed clear that the user was authenticating properly. It was something that was happening after the actual successful authentication that was causing the error message.

After some research and thought, it occurred to me that it was very likely that there was some sort of configuration gone awry with the actual home directories. Then I realized that I had completely neglected to actually configure the old home directories on our server to be shared at all!

So basically the user was logging in and authenticating successfully. Then when the client asked for the home directory the server was like, what home directory? And the client was like aww shit. I’m gonna log you out right now ’cause I need your home to work. And the server was like, all right, fine. Something like that.

After some simple home directory sharing configurations, everything was running without another episode. Sigh.