Skip to content

Instantly share code, notes, and snippets.

@gjpalau
Created July 20, 2015 21:57
Show Gist options
  • Save gjpalau/fa104a8cd28619aa9d5c to your computer and use it in GitHub Desktop.
Save gjpalau/fa104a8cd28619aa9d5c to your computer and use it in GitHub Desktop.
script to prepare a default user before capturing an image
#!/bin/bash
\#
\# defaultuser-prep.sh
\# preparer for default user account on Mac OS X
\#
/bin/rm –rf /System/Library/User\ Template/English.lproj
if [ -d "/Users/default/Library/Keychains" ]; then
/bin/rm -rf /Users/default/Library/Keychains
fi
/bin/mkdir /Users/default/Library/Keychains
/usr/sbin/chown default:staff /Users/default/Library/Keychains
/bin/chmod 700 /Users/default/Library/Keychains
/usr/bin/rsync -a --delete /Users/default/ /System/Library/User\ Template/English.lproj
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment