My Grotto | Small snippets of info so I don't have to remember

Nov/08

30

Reset Mac OS X back to Setup Assistant

Note, all the steps must be done in single-user mode (hold down cmd-s during boot).

Delete the user home directory

$ mount -uw /
$ rm -R /Users/<username>

Delete the user from Directory Services

$ cd /System/Library/LaunchDaemons
$ /bin/launchctl load com.apple.DirectoryServices.plist
$ dscl . -delete /Groups/admin GroupMembership <username>
$ dscl . -delete /Users/<username>

Remove .AppleSetupDone to cause Setup Assistant to run

$ rm -rf /var/db/.AppleSetupDone

Once the final step has completed, you can shutdown the computer using the command below and then boot from another HD and image if necessary using Disk Utility.

$ shutdown -h now

No tags

<<