Skip to content

Instantly share code, notes, and snippets.

@thewellington
Last active December 24, 2015 03:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save thewellington/6736246 to your computer and use it in GitHub Desktop.
Save thewellington/6736246 to your computer and use it in GitHub Desktop.
After building an OS X image, start the mac at the welcome screenSo... I needed to deploy a number of macs to a great number of people... and they all needed to have an "out of box" experience with the machine whereby they set up their own account and all the happy stuff that Apple gives you when you take a Mac out of the box. This script allowe…
#!/bin/bash
#
# v.1.1 by bill@wellingtonnet.net
# adapted from instructions posted at
# http://www.macgurulounge.com/easily-prep-mac-resale/
#
# This script sets a Mac up to start at the welcome screen.
# It must be run from single user mode, so put it somewhere on
# the file system, make it executable, then reboot and hold down cmd-s
#
# mount filesystem read-write
mount -uw /
# if you want to also remove all users and information from machine
# uncomment following line (warning, this is untested)
# rm -Rf /Users/*
# remove necessary files
rm -Rf /var/db/.AppleSetupDone\
/var/db/.TimeMachine.Cookie\
/var/db/TimeMachine.Results.plist\
/var/db/.com.apple.iokit.graphics\
/var/db/dhcpclinet/\
/var/db/samba/
# shutdown the machine
shutdown -h now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment