MrBingham917 ccaBadge
3

Comments

Plist injection from network source

Posted 3/9/12 at 4:14 PM by MrBingham917

I have a feeling that I am going about this ALL wrong, but I have isolated a plist file for some custom settings for a networked device. I currently have the Plist on a thumb drive, and I don't know how to go about getting it from my thumbdrive up to the JSS so it can be copied and forced into the ~/Library/Preferences folder for all users.

I was going to try doing a .pkg, but apparently we don't have the developer goodies here.

If anyone would be so kind as to help out with this, it would be immensely appreciated.

Hope everyone has a good weekend!
Robert.

JSS 8.34
OS 10.6.8
Clients 10.6.8

3

Comments

donmontalvo ccaBadge cugBadge
Posted 3/9/12 at 7:15 PM by donmontalvo
Solved Solved

Here's the postflight script we use in a PKG package, to deploy to existing users plus the User Template (future users):

#!/bin/sh
#
# Copy stuff to existing/future users, set ownership and permissions.
#
# Example used here is USERCRAP which represents top level of user directory
# (change name to make relevant to package being deployed!). We are pushing
# user resources to /tmp/USERCRAP directory. Items in this folder will be
# merged with existing directories, and any existing resources will be
# overwritten.
#
# Bits and pieces stolen...er...borrowed from JAMF Nation list members. :)

# 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

MrBingham917 ccaBadge
Posted 3/12/12 at 11:24 AM by MrBingham917

Thanks for the script example, this seems pretty straight forward, though there is one thing that is confusing me a bit @donmontalvo. The backslash after the.localized/d' section of the script, is that a typo or what does that slash mean? Thanks again.

Robert