Posted on 02-10-2016 01:08 PM
I've noticed that if I create a policy to add or remove dock items, it only effects current user accounts.
I created a policy to remove a bunch of dock items (mail, contacts,itunes,app store,maps,ibooks etc...).
If a new user logs in, AFTER THE POLICY ALREADY RAN, they are given the default dock with all the items. is this how it is supposed to work ?
Solved! Go to Solution.
Posted on 02-10-2016 01:15 PM
The policy you created isn't going to change the User Template, which is why you're seeing the default dock on new users. What you could do is change your trigger to Once per user per computer, which should make the change for any user on that computer.
Posted on 02-10-2016 01:15 PM
The policy you created isn't going to change the User Template, which is why you're seeing the default dock on new users. What you could do is change your trigger to Once per user per computer, which should make the change for any user on that computer.
Posted on 02-10-2016 01:17 PM
i just change the execution frequency from
ONCE PER COMPUTER to ONCE PER USER PER COMPUTER
let me see now how this policy behaves.
Has anyone ever used ONCE PER USER PER COMPUTER ??
Posted on 02-10-2016 01:21 PM
@dferrara wow, thanks for the response, you clarify what i was thinking.
I didn't see your response until i already made the change in the JSS and posted my comment.
does this also apply for policies that ADD to the DOCK ?
Posted on 02-10-2016 01:28 PM
Has anyone actually had any success making the JAMF supplied Dock items work reliably?
I gave up some time ago and went with Dock Util, which once you get around how it works does a really great job.
Posted on 02-10-2016 01:29 PM
@tcandela No problem! Yes it should work for adding to the dock as well. If you need more flexibility than what the JSS offers, a lot of us are using dockutil. It requires more work, but once you have the package installed, you can make changes in Terminal and use Casper to run dock scripts instead.
Posted on 02-10-2016 02:08 PM
Adding to Dock works for me.
Remember it was not working last time I wanted to use it, tested it an hour ago with some new software distribution policy working on now, and was gladly surprised to find it working as well. Got new icon to the Dock. Seems to be fixed in 9.82
Thanks, JAMF!
Posted on 02-10-2016 02:56 PM
What is the best TRIGGER to use when implementing ONCE PER USER PER COMPUTER?
I have my Dock policy set at Recurring check in. Should it be changed to 'Login' as the trigger ?
Posted on 02-11-2016 09:39 AM
i'm on 9.81,as per the policy logs, looks to be working for me when removing/adding dock items when implementing ONCE PER USER PER COMPUTER at LOGOUT.
Posted on 02-11-2016 09:44 AM
@tcandela I haven't tried Logout, that's good to know. I usually use the Login trigger.
Posted on 02-12-2016 07:41 AM
I set my DOCK policy to remove items at LOGIN, looks to be acting weird, some of the dock items I have setup to be removed from the Dock still show up (MAPS,PHOTOS,IBOOKS), and a couple i do not want removed are gone (NOTES,SYSTEMPREFERENCES).
It might be that 9.82 fixed this possible issue that @mhasman mentioned above.
Posted on 02-19-2016 01:17 PM
@ Logout, works as expected. @ login does not work correctly,
i'll check out this dockutil
Posted on 02-19-2016 01:26 PM
@tcandela It has worked wonders for me, I have it in production now. I couldn't find a single guide on how to use it and set it up, so be prepared for some research. Also, if you are deploying with El Capitan, some of that space is protected now. I have mine installed here:
/usr/local/bin/dockutil
After that, it's just a matter of getting your commands to the dockutil binary right.
Posted on 02-19-2016 01:32 PM
I would also have a look at DockUtil it works great and can do everything you want it to check the dockutil github code here, place the python script on the users machine and then write your script in Management Settings to do what you want it to do, run it at login, you should be all good to go.
I do mine at imaging and have it as a ongoing self service script if user's want to get back to their default as such, obviously you can adapt and change it around for your needs:
#!/bin/bash
/path/to/dockutil.py --add /Applications/Self Service.app --position 2 --allhomes
/path/to/dockutil.py --move 'App Store' --position 3 --allhomes
/path/to/dockutil.py --add /Applications/Google Chrome.app --position 4 --allhomes
/path/to/dockutil.py --remove 'Safari' --allhomes
/path/to/dockutil.py --remove 'Mail' --allhomes
/path/to/dockutil.py --remove 'Contacts' --allhomes
/path/to/dockutil.py --remove 'Calendar' --allhomes
/path/to/dockutil.py --remove 'Notes' --allhomes
/path/to/dockutil.py --remove 'Reminders' --allhomes
/path/to/dockutil.py --remove 'Photos' --allhomes
/path/to/dockutil.py --remove 'Messages' --allhomes
/path/to/dockutil.py --remove 'FaceTime' --allhomes
/path/to/dockutil.py --remove 'iTunes' --allhomes
/path/to/dockutil.py --remove 'iBooks' --allhomes
/path/to/dockutil.py --remove 'Maps' --allhomes
Posted on 02-19-2016 01:44 PM
I'd rather have JSS dock item policy work @ login, but it acts weird, items i want removed stay, items i want to stay are gone. @ logout works though.
I took a brief look at dockutil on github, so I have to just place a file (python script) on each enrolled mac (/usr/local/bin/dockutil), and then i can issue commands to manipulate the dock ?
Posted on 02-19-2016 01:48 PM
@tcandela Yes, exactly. There's also a Feature Request to integrate dockutil into Casper here:
https://jamfnation.jamfsoftware.com/featureRequest.html?id=1982
Posted on 02-19-2016 02:02 PM
Posted on 02-19-2016 02:42 PM
@Sachin_Parmar just so i understand correctly your lost post;
are you saying i create a script to do what i want to the dock (parts of your script below), create a policy to run the script , and that function --allhomes -- will set that dock for all current and future users home folders ?
/path/to/dockutil.py --add /Applications/Self Service.app --position 2 --allhomes
/path/to/dockutil.py --move 'App Store' --position 3 --allhomes
/path/to/dockutil.py --add /Applications/Google Chrome.app --position 4 --allhomes
/path/to/dockutil.py --remove 'Safari' --allhomes
/path/to/dockutil.py --remove 'Mail' --allhomes
/path/to/dockutil.py --remove 'Contacts' --allhomes
/path/to/dockutil.py --remove 'Calendar' --allhomes
/path/to/dockutil.py --remove 'Notes' --allhomes
Posted on 02-19-2016 04:31 PM
dock-master also works well if you want to go the profile route
Posted on 02-20-2016 04:39 AM
@tcandela Yes that's correct, it adds it to all current user's of the Mac not future users but you can make a casper policy that effectively run's the dock script as the user either as an ongoing script or "Once per user per computer" execution frequency at Login for future users.
Here's the extract from the --allhomes flag from the dockutil code attempts to locate all home directories and perform the operation on each of them Source
Posted on 02-20-2016 12:17 PM
@mhasman what trigger and frequency are you using ? are you both adding/removing dock items ?
Posted on 02-22-2016 08:55 AM
@tcandela Trigger? I do not use DockUtil but settings in policy on JSS:
Posted on 02-22-2016 04:37 PM
@mhasman yeah I know your using the JSS policy for your dock items. I just upgraded my test machine to 9.82, so I'll see if @ login trigger behaves correctly unlike in 9.81
what trigger (logout, login ?? etc.. ) and frequency (once per computer, once per user per computer.. ?) are you using for the policy ? are you both adding/removing dock items ?
Posted on 02-23-2016 12:04 AM
Has anyone got dockutil working correctly on Yosemite?
We are not fully upgraded to El Capitan yet and I have tried to add/remove documents from the dock without success. Loggin states items have been added/removed but the result is not correctly visible in the dock. Even after restart/logout/login.
I did run the script in my test while user was logged in (and the script restarted the dock)
Will try to run at logout to see if this gives better results.
With a policy on the JSS as @mhasman is using is also not giving me the results I want..
Posted on 02-23-2016 06:15 AM
@rblaas We are on El Cap but have you tried adding the sleep 30
command before your script runs? Without that command my script usually fails. Also here's an example line:
sudo -u $3 /usr/local/bin/dockutil --remove 'Numbers' --no-restart
Each line has --no-restart
except for the last line.
Posted on 02-23-2016 06:33 AM
@dferrara No I have not and will definitely try that.
thanks for the tip
Posted on 02-23-2016 10:54 AM
@dferrara @rblaas to get the python script on your client macs, did you create a pkg to place the file on each computer in one of the $PATH locations ?
I'm still testing the JSS policy using DOCK payload with now 9.82 instead of 9.81.
9.81 policy works good on LOGOUT but I want it to work on LOGIN. So if 9.82 does not work on LOGIN, then i'll try dockutil
Posted on 02-24-2016 12:32 AM
@tcandela I distribute the python script via pkg and install in in /usr/local/bin.
Posted on 02-24-2016 09:29 AM
with El Capitan, looks like Apple has also defined some exceptions to SIP’s protection in the rootless.conf file, and one of those exemptions is /usr/local
Posted on 02-27-2016 12:22 PM
is anyone having problems using dockutil with El Capitan ?