Skip to main content
Jamf Nation, hosted by Jamf, is the largest Apple IT management community in the world. Dialog with your fellow IT professionals, gain insight about Apple device deployments, share best practices and bounce ideas off each other. Join the conversation.
CCA Badge

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

CCA Badge CCE Badge CMA Badge CUG Badge

SOLVED Posted: 3/9/12 at 7:15 PM by donmontalvo

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

# 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 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 '/' -e '/Adobe/d' -e '/Library/d');


/usr/bin/ditto /tmp/USERCRAP /Users/$i
/usr/sbin/chown -R $i:staff /Users/$i


exit 0
CCA Badge

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.


Posted: 3/12/12 at 11:53 AM by rockpapergoat

it escapes the newline: