(fixed some typos...sorry, posted from memory. Of course test on spare Mac and tweak as needed... Don)
Hi Nick,
Sure, here's a sample:
Snapshot shows we need to deploy user level stuff:
/Users/jdoe/Library/Preferences/crap1 /Users/jdoe/Library/Application Support/crap2
So we set up the pkg to dump the above here:
/tmp/usercrap/Library/Preferences/crap1 /tmp/usercrap/Library/Application Support/crap2
Using a postflight script to copy the stuff to existing/future users:
#!/bin/sh # # Copy from /tmp to existing/future users.
# Copy to User Template and set owner to root. /usr/bin/ditto /tmp/usercrap /System/Library/User Template/English.lproj /usr/sbin/chown -R root:wheel /System/Library/User Template/English.lproj
# Loop to populate existing user directories, set owner and group too. for i in $(/bin/ls /Users) do /usr/bin/ditto /tmp/usercrap /Users/$i/ /usr/sbin/chown -R $i:staff /Users/$i/ done exit 0
The /tmp directory purges on reboot. Tweak as needed.
Hmmm...bonus points to anyone who can tell us what to do the script to have it IGNORE the /Users/Shared directory? :)
(this is where Steve/Thomas usually chime in with the golden nugget answer!)
We used input from the usual suspects on this list (Steve Wood, Thomas Larkin, etc.)...
Don
