RE: How to ignore Shared re: PKG vs DMG [CORRECTED TYPOS]

SeanA
Contributor III

Yes, what Bob said. I should have made myself clearer. In this fashion, you
can exclude whatever User directories you wish (for example, we have some
support User directories that I would not want to modify so I would exclude
them in that string).

Sean

1 REPLY 1

donmontalvo
Esteemed Contributor III

Awesome, thanks Sean and Bob!

Here's the script, tested in our LAB:

  1. Install /tmp/usercrap
  2. Run script (I added /Users/Adobe and /Users/Library because the engineers at Adobe continue to dump stuff there as if nobody gives a hoot):

-------------start FEU/FUT script---------------
#!/bin/sh
#
# Copies payload from /tmp/usercrap to existing and future users.
# 20101230

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/usercrap
/usr/sbin/chown -R $i:staff /Users/$i/usercrap
done
exit 0
-------------end FEU/FUT script---------------

Don

--
https://donmontalvo.com