A question posed on today’s edition of Macintouch prompts this post. Sometimes it’s desirable to set up a brand-new Mac with additional software (and system updates), but still display the startup assistant when the machine first boots, for that fresh-out-of-the-box experience. There is a way to do this, but it involves a little Terminal futzing. The steps necessary are included as part of the man page for asr(8), Apple’s utility for system imaging and restoration. Here’s the shortish version:
- After building the machine the way you want it, make sure there are no other users on the system except one admin-level user, reboot, and log in as that user.
- Bring up a Terminal window. It’s in /Applications/Utilities.
- Remove the file used to determine whether the setup assistant should run —
sudo rm /var/db/.AppleSetupDone
- Change to the root directory (this is largely a safety precaution against problems arising from the next step) —
cd /
- Remove the home directory for the admin account —
sudo rm -r /Users/[username]
where [username] is the short name of the admin account.
- Here’s the big one — remove the entry in the local NetInfo database for the admin account; this removes all trace of the account in the system’s database of users.
sudo nicl -raw /var/db/netinfo/local.nidb delete /users/[username]
and again, [username] is the admin account’s short name.
- Shut down the machine, and do it soon. Having removed all trace of your account, it’s not a good idea to linger.
I used to do this every so often at NIH when setting up a new machine for someone, but these days I just drop a standard image onto it, which is much easier. Still, it’s a handy way to prep a Mac for resale, or as a gift to someone.
none