Is the policy running a script of any sort? Before, After, as part of a pkg install? The 'syntax error near unexpected token' line would seem to indicate its trying to run a script that has some syntax issues.
Hi MM,
I do not have a script running on this policy, all the policy is setup to do is add a dock item.
Its possible that something in the management framework is corrupted or damaged, like the jamf binary. You mentioned the same error comes up with other policies, and the error doesn't seem to be related to a bad install pkg, script or even a mismatched service account password, for example.
Adding a dock icon calls a /usr/sbin/jamf modifyDock command inside the jamf binary. so if something is messed up, I can see how you'd get some errors. I'm just taking a guess here. Your JAMF rep may have a better idea, so you might want to send this one their way.
But, you could try unenrolling the Mac with a sudo jamf removeFramework command. If you have ssh access into the affected Mac, you can do it remotely. Then re-add the Mac in by either deploying a QuickAdd.pkg to it, or some other method, like Recon.app network scan targeted to the Mac's IP, e.g. I'm pretty sure if you keep the inventory record in place, everything will pair up again as the JSS will see its the same Mac.
Hope that helps.
I sent jamf removeFramework as root via ARD without issue. Then I sent the quick add package as root via ARD to the same machine. The quick add package will not finish installing. There is something unique to this computer that Casper just doesn't like. It certainly seems to be related to recon talking to the JSS since the applications and/or dock items I install via policy work without issue. This computer, and only this computer, is not able to finish running recon.
Run a verbose recon on it to see if you can spot where its getting hung up:
sudo jamf recon -verbose
I've seen it get stuck no gathering package receipts, as an example.
Good idea MM,
I did not know about the -verbose flag, nice tip!
I am running verbose recon now, oddly enough Recon is hanging at locating Applications, it cannot get past Disk Utility. I will let it run to see if it finishes.
Update:
Recon will not finish, it is stuck on locating applications.
Strange. Probably the machine is foobar in some way. You can try doing some of the standard fix stuff, like verifying the disk, repairing permissions, etc. Some of that can be done remotely, but for some you may need to get your hands on the Mac.
Yeah,
The machine is over four years old and "dirty". I am lobbying to replace it. Thanks for all your help!