Dock Items policy on new accounts

Jason
Contributor II

I have a Policy with the Dock Items payload. It's just set to remove a few of the defaults like Calendar and Mail since we use Outlook instead. We're seeing some strangeness when following this procedure:

1) Network booting and using Casper Imaging to re-image a new mac (used AutoDMG to start with a clean image). A local admin account is created with a package.
2) After the imaging process is complete, i can log into the local admin account that was created and the dock looks just fine.
3) If i create a new standard user, or if an AD user logs in for the first time, then the dock may only have 1-3 icons on it. Usually Finder, Maps, and iBooks.

That's strange because I'm not removing System Preferences, Launchpad, Safari, or many others with my Dock Icons payload. I'm also not touching "/System/Library/CoreServices/Dock.app/Contents/Resources/en.lproj/default.plist". "/Library/Preferences/com.apple.dock.plist" doesn't exist and neither does "/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist" which I'm not doing anything with either.

But, if i disable the Dock Items policy then everything works fine. Has anyone seen something like this?

I'm also thinking of ways to work around this if it is a bug. Does anyone know if Mavericks/Yosemite prefer either the default.plist in the dock.app or the com.apple.dock.plist in the User Template? Would it merge those settings if they're different?

13 REPLIES 13

RogerH
Contributor II

could be byHost prefs. Is your imaging workflow running fix byhost prefs?

itupshot
Contributor II

I use a com.apple.dock.plist file that I insert into the User Template folder. It works well to put all our default apps on the Dock. We have a couple of different default Docks depending on the target computer's department. For example, some computers get Adobe Creative Cloud apps, and others don't.

However, there is still some minor "cleanup" to do after you log in a user because it still loads "iBooks," "Maps," and "Notes." It also duplicates the "Downloads" folder. I've been trying to figure out a more definite way to really force only our Docks to load. No extra cruft.

I used to be able to set plists via Workgroup Manager, and an extended AD schema to target user groups. That method has been abandoned by Apple, and Configuration Profiles are much too strict. I only need a starter Dock and other prefs that the user can then customize. Config Profiles only offer always or never proposition, and I'd have a riot in my hands if people couldn't change their Docks.

Jason
Contributor II

@RogerUL I don't think i am. I just double checked and am not seeing any policy running that does the "Fix ByHost Files" maintenance task, and I haven't scripted something similar.

@itupshot Perhaps the default.plist file in dock.app is loading iBooks, Maps, Notes; and then com.apple.dock.plist is merging in your items. I've noticed a duplicate Downloads folder as well when i started playing around with them.

RobertHammen
Valued Contributor II

/System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist is your enemy.

Jason
Contributor II

@RobertHammen Thanks for that tip. Looking in that file i do see the add-app section that specifically adds Maps and iBooks. So is com.apple.dockfixup.plist the end all be all when it comes to setting up the Dock? I'm unsure why there are 3 files related to setting up the dock:

/System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist
/System/Library/CoreServices/Dock.app/Contents/Resources/en.lproj/default.plist
/System/Library/User Template/English.lproj/Library/Preferences/com.apple.dock.plist

When a new user account is created, how do these 3 interact? The Dock Items payload must be doing something that tells dockfixup to apply (3+2 items), since not running that payload causes the standard full dock (16+2 items) to apply

Poseiden951
Contributor

@RobertHammen

Would deleting <insert file> during a first run script set to 'Reboot', after imaging solve the issue of these apps appearing?

rm /System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist

RobertHammen
Valued Contributor II

Yes, however be aware that after some system updates (i.e. 10.10.2->10.10.3) Dock.app may be replaced and the dockfixup.plist added back, so keep that in mind.

johnnasset
Contributor

This one-liner will get rid of the additional apps added with dockfixup.plist

/usr/libexec/plistbuddy -c "delete:add-app" /Library/Preferences/com.apple.dockfixup.plist

RobertHammen
Valued Contributor II

I tried that with 10.10.2 and for whatever reason it didn't work. Only way I could was to delete the com.apple.dockfixup.plist itself, which obviously isn't desirable. Have not tested with 10.10.3 yet...

esantiago
New Contributor

+1

I'm struggling with this as well.

johnnasset
Contributor

Looks like that plist got moved in 10.10. Try this:

sudo /usr/libexec/plistbuddy -c "delete:add-app" /System/Library/CoreServices/Dock.app/Contents/Resources/com.apple.dockfixup.plist

RobertHammen
Valued Contributor II

This might be another tool to try... it's a web-based configuration profile generator, but pretty slick:

http://errorfreeit.com.au/blog/2015/4/28/dock-master4

martel
New Contributor III

So when is this called? We still need to remove Photos, Maps and iBooks.