Mac OS X Leopard Cleanup for New User:

Apple don’t provide a nice OEM or OOBE setup option for installing their systems; they assume everybody gets Mac OS X on a brand new Mac. If you need to pass a computer on to another user with custom software packages, configurations and software updates already applied, it is possible in most versions of Mac OS, Mac OS X, and OS X. The following guide is for Mac OS X Leopard. Once you’ve setup the system with a single admin user account do the following to clean up and prepare the system to run AppleSetup like a new Mac would out of it’s box:

  1. Boot into single user mode. Hold Command-s at startup.
  2. Check the filesystem: /sbin/fsck -fy
  3. If no remaining errors, mount the filesystem: /sbin/mount -uw /
  4. Start up directory services: launchctl load /System/Library/LaunchDaemons/
    Note that single user mode said to use, but that didn’t work — this did.
  5. Find what groups the user belongs to: dscl . -list /groups GroupMembership | grep username — repeat for each group except for the user’s own group.
  6. Remove the group corresponding to the username: dscl . delete /groups/username (this may not be necessary — you may get an error that the group doesn’t exist; you can ignore it and go on).
  7. Remove the user account: dscl . delete /users/username
  8. At this point, you may wish to remove or archive the user folder in /Users.
  9. Remove the .AppleSetupDone file in /var/db to cause the Setup Assistant to run when next booted.
  10. All done? Type reboot to reboot the system or shutdown -h now to shut down the system.

When you reboot you will see the Setup Assistant. Hold down “command” and press “q” , then click Shutdown. When the new user starts the Mac for the first time the Setup Assistant will start and guide them through personalising their new old Mac.