Wither DMG...here is a loop script for PKG

donmontalvo
Esteemed Contributor III

!/bin/sh

#
# 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

--
https://donmontalvo.com
2 REPLIES 2

donmontalvo
Esteemed Contributor III

I forgot to provide credit for the above script...Tom Larkin and Steve Wood (and a few others on this list).

Don

--
https://donmontalvo.com

donmontalvo
Esteemed Contributor III

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
--
https://donmontalvo.com