Posted on 11-12-2014 12:43 PM
Hello All,
I once again turn to the JAMF Nation for some more guidance.
So, on a mac when you hit command K, you can enter in the server address.
Here's my question... is there a way to make this a policy and roll this out to end users? So everyone in the company will have the same server addresses.
Thank You
Darwin
Posted on 11-12-2014 01:16 PM
The info is stored in:
~/Library/Preferences/com.apple.sidebarlists.plist
To read: defaults read com.apple.sidebarlists favoriteservers
To write: defaults write com.apple.sidebarlists favoriteservers
You could create one with the servers you want and then use a FUT to install in all User's ~/Library/Preferences/ folder.
Or I'm sure a smarter guy/gal will give you a better solution though.
Posted on 11-12-2014 01:26 PM
As its an array you will probably need plist buddy. I think this post is what you are looking for:
https://jamfnation.jamfsoftware.com/discussion.html?id=5010
Each new entry has three elements:
/usr/libexec/PlistBuddy -c "Add :favoriteservers:CustomListItems:0 dict" ~/Library/Preferences/com.apple.sidebarlists.plist
/usr/libexec/PlistBuddy -c "Add :favoriteservers:CustomListItems:0:Name string afp://server1.company.com" ~/Library/Preferences/com.apple.sidebarlists.plist
/usr/libexec/PlistBuddy -c "Add :favoriteservers:CustomListItems:0:URL string afp://server1.company.com" ~/Library/Preferences/com.apple.sidebarlists.plist
You will need to add a "killall cfprefsd" at the start otherwise preference caching will trample all over it.
Hope this helps!