I had to reinstall Leopard on my home computer, and it was among the most frustrating experiences in my 24-year history as a Mac user. The re-installation was required because of a problem with a single tiny file that caused Setup Assistant to demand registration again and again - on a computer that has long been registered - no matter what else was tried.
The problem started with RAM. I was upgrading my 1.33 GHz PowerBook G4 (September 2003) from 1.25 GB to 2.25 GB. (Never mind that it can only address 2 GB; the machine has 256 MB on the motherboard, and two slots; it's an odd problem.) After installing the RAM and starting up, Setup Assistant ran. I couldn't escape and return to my account, so I assumed it was a problem with the RAM. After several attempts, I powered down, removed the power supply and battery again, and reinstalled the old RAM. Another boot; same problem.
I started researching the matter via my wife's computer, and found that Apple has a technical note on this precise topic for Leopard: "Setup Assistant appears after every restart." In forums, I discovered similar advice, which appeared to be required when a QuickTime update or other software upgrade for Leopard had gone awry.
I followed the brief instructions, which are, quite simply: start up with the Shift key held down (to trigger Safe Mode), and then click the Restart button on the account login screen. (Safe Mode startup took nearly 10 minutes on my computer, but I found after a few tries, I didn't have to keep the Shift key held down after the progress circle appeared under the Apple logo at startup.)
The advice didn't help. I turned to colleagues, who noted that the problem appears to lie in a file located in the /var/db directory called .AppleSetupDone. The file indicates that, you know, the Apple setup is done. The file was present; usually its absence is a problem. I mounted my computer in FireWire target disk mode to my wife's MacBook, and examined the file. I wound up trying several tactics, including replacing the file with hers, and deleting it. Nothing seemed to help. (In retrospect, it may have been a permissions problem with the file or its parent directory, but Disk Utility's Repair Permissions found nothing wrong with files or the disk.)
I had to give up at last and use the Leopard installer's Archive and Install option. With this option, described in depth among other strategies in Joe Kissell's "Take Control of Upgrading to Leopard" book, you preserve applications, user accounts, and other information, but the installer puts in place a clean copy of the operating system.
This, of course, worked perfectly. After the installation was complete, my system was back to normal. The .AppleSetupDone file is now at zero bytes (with an odd set of permissions: user writable, world readable). And I had to download about 200 MB of updates to get myself back into sync.
After those updates were complete, I ran a Time Machine backup to ensure that if it happened again, I'd be in a little better shape; my previous backup was a few days old, and I wouldn't have lost anything critical. It's just that an Archive and Install seemed less painful than a system restore because I could retain my precise current state. Had that failed, a Time Machine restore would have been next up.
A TidBITS reader, Dave Dykes, wrote in with the link to an alternate solution that avoids reinstallation but requires a bit more technical finesse. The article he recommends explains how to boot a Mac into Unix single-user mode, and then carry out a short sequence of commands that removes two files I was unaware of - .SoftwareUpdateAtLogout and .SoftwareUpdateOptions - to disable Setup Assistant's loop. Thanks, Dave!
Have you encountered this problem? Did you find a better solution? Let me know, and I'll add the details to this article. I suspect, based on searches on Google, that this problem is not common, but it's not exceedingly rare, either.