Unfortunately nothing in there can be managed via config profiles. What are the chances if I put a bug report enhancement that Apple will make it so? LOL
So I'm trying to manage it in User Templates......I know I know...
I suppose I could create a launch agent to edit the values I need, but I'm afraid it may not take effect right away. Or perhaps a launchdaemon (which I know runs as root) that does it all for current users at each boot which would take effect at the login window (just need to make sure the file has the proper permissions afterwards).
But the easiest honestly would be to just do it through User Templates. Because I don't care to be a IT nazi over these particular settings. I've avoided using the User Template for such a long time so here's a simple question. If the file does not exist under /System/Library/User Template/*/Library/Preferences and I go ahead and create it will that file copy over on each new user account folder that gets created? I assume yes.
What am I trying to manage?
I want to remove the iCloud shortcut from the sidebar list.
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>favoriteitems</key> <dict> <key>Controller</key> <string>CustomListItems</string> <key>CustomListItems</key> <array> <dict> <key>CustomItemProperties</key> <dict> <key>kLSSharedFileListItemUserIsiCloud</key> <true/> </dict> <key>Name</key> <string>iCloud</string> <key>URL</key> <string>x-apple-finder:icloud</string> </dict> </array> </dict> </dict> </plist>
And then network browser settings:
<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> <plist version="1.0"> <dict> <key>networkbrowser</key> <dict> <key>Controller</key> <string>CustomListItems</string> <key>CustomListItems</key> <array/> <key>CustomListProperties</key> <dict> <key>com.apple.NetworkBrowser.backToMyMacEnabled</key> <false/> <key>com.apple.NetworkBrowser.bonjourEnabled</key> <false/> <key>com.apple.NetworkBrowser.connectedEnabled</key> <true/> </dict> </dict> </dict> </plist>
I would obviously combine the two entries above since it all goes into one plist anyways. Or just get the appropriate commands and script it out using PLISTBUDDY.
I'll be testing away but figured it might be worth a try to see what others have done and if User Template works as I remember.
Personal preference really. I'm not a fan of DMG installers in general. I like to do things as close to what Apple supports and to work in a situation where Casper is not available. Makes it for easier troubleshooting too. And it's simple enough to script it and create pkg and re-use that same script in other situations to be honest. It's a quirk of mine you could say.
Well you are right on that since they clearly make it difficult to manage these particular preferences, but Apple does support PKG installers and they can run postinstall scripts regardless of the management solution. They support DMG installers for drag and drop applications too. But what Casper does is "proprietary". That is, that DMG containing a plist file won't do much outside of Casper without some extra manual work. But the pkg will do what it needs to do regardless. Simple enough to replicate is all. But I'm getting side-tracked here....
But what Casper does is "proprietary". That is, that DMG containing a plist file won't do much outside of Casper without some extra manual work.
This is the main reason I don't build packages in DMG (unless there is a good reason to) In a word - Portability. If our management mandated tomorrow that we switch to another Mac management solution (it could happen!), we wouldn't need to scramble and convert all our packages to pkg format, since they mostly all already are! I wish JAMF would stop promoting the DMG format as "the way" to build packages. Been several years since I've been through a JumpStart, but based on this thread, it sounds like the Composer snapshot and build to DMG method is still what is being promoted and taught, which is kind of insane to me.
@bpavlov As to your problem, doesn't the script mentioned here help with your issue?
Or does it not work on the items you're looking to manage? I'm asking honestly as I haven't actually used it.
Talk about a long week. I think I recommended that to someone else not too recently! Or maybe it was the NCutil.py. Either way, I'll take a look at it. Thanks!
Just as a note it looks like whatever com.apple.sidebarlists.plist you do end up putting in the User Template needs to have everything you want to show up because otherwise it will leave many things empty such as all the favorites....
I'll check out that script you recommended and if nothing else look at perhaps tackling this with a launchdaemon.
I too must confess I've customized the default user template and I really like that method because for a lot of things it just works. It's rather a pain to create a package installer for the user template using Casper because even though I log into the GUI as root so I can open the target folder (/System/Library/User Template/English.lproj in my case) I find Casper is installing the data to the root of the target drive instead of the correct folder. Probably because Apple decreed this methodology should not be used and all the developer tools have now been updated to prevent us from using that path as a valid target, I don't know.)
Anyway, I solved the problem of how to create this package install, but I can't remember how I did it last time. I think I may have used Iceberg. Can someone share their solution for a custom user template PKG installer, please?
Cheers from 43 degrees North.
We've just had a Jump Start, and they were highly recommending making DMGs over packages. The reasons given were that they install quicker than a .pkg (block copy?), and you get to fill the user template.
Being new to all this, I've made a DMG in composer that copied the sidebar in the current environment and puts it in the user template. Seems to work!
I guess that editing the user template/current home folder is like managed preferences without MCX. Profiles are just for the things that Apple deems anyone should ever possibly want to manage....
Block copying would only apply when restoring a base OS DMG, although they are a little simpler than PKGs so may be a little quicker.
If an installer was block copied to a drive that had data on it, the existing data would get over-written.
Copying the sidebar plist using a DMG installer with the fill user template option has worked for us in the past, as long as there are only paths that all users can read like /Applications /Users/Shared etc. The difficult bit is the dynamic items like ~/Documents and ~/Movies.
The way the sidebar plist stores this info is really hostile. I normally use the change_sidebar_lists.py script mentioned above.
Generally speaking and IMHO, config profiles should be used whenever its a "normal" xml plist file in /Library or ~/Library. With each new OS it seems to be getting easier to manage with config profiles and harder to do it any other way and really appears to be Apple's preferred method. Just my view though!