Posted on 11-10-2011 02:27 PM
#
# Copy stuff to existing/future users, set ownership and permissions.
#
# Copy to User Template and set root:wheel ownership
/usr/bin/ditto /tmp/USERCRAP /System/Library/User Template/English.lproj
/usr/sbin/chown -R root:wheel /System/Library/User Template/English.lproj
# Copy to existing user directories and set ownership and permissions.
for i in $(/bin/ls /Users | sed -e '/Shared/d' -e '/Deleted Users/d' -e '/.localized/d' -e '/.DS_Store/d' -e '/.com.apple.timemachine.supported/d' -e '/Adobe/d' -e '/Library/d');
do
/usr/bin/ditto /tmp/USERCRAP /Users/$i
/usr/sbin/chown -R $i:staff /Users/$i
done
exit 0
Posted on 11-10-2011 05:24 PM
I forgot to provide credit for the above script...Tom Larkin and Steve Wood (and a few others on this list).
Don
Posted on 11-11-2011 08:26 AM
Ahhh...just noticed the Script button...let's see if this works:
#!/bin/sh
#
# Copy stuff to existing/future users, set ownership and permissions.
#
# Thanks to Tom Larkin and Steve Wood and the others at JAMF Nation.
# Copy to User Template and set root:wheel ownership
/usr/bin/ditto /tmp/USERCRAP /System/Library/User Template/English.lproj
/usr/sbin/chown -R root:wheel /System/Library/User Template/English.lproj
# Copy to existing user directories and set ownership and permissions.
for i in $(/bin/ls /Users | sed -e '/Shared/d' -e '/Deleted Users/d' -e '/.localized/d'
-e '/.DS_Store/d' -e '/.com.apple.timemachine.supported/d' -e '/Adobe/d' -e '/Library/d');
do
/usr/bin/ditto /tmp/USERCRAP /Users/$i
/usr/sbin/chown -R $i:staff /Users/$i
done
exit 0