Updating Safari Extensions



As blogged here, here & here I’ve had some fun deploying & creating Safari Extensions.

Recently I needed to update our deployed Extension Bar & like a daft person I didn’t follow Apple’s advised Extension update method..

However, past me was not that daft & had already discovered that all that is needed to “update” an existing Extension is to replace it. Which is pretty much what the below script does.

Many thanks to Peter Bukowinski & Erik Berglund for helping me with this in the #bash channel in the macadmins Slack.

Continue reading

How To: Get the currently logged in user, in a more Apple approved way


When running scripts via the JSS, you sometimes have a challenge to get the username of the currently logged in user.

If you’re running the script at login or via Self Service, then $3 can be used to grab the username. However, you’ll quickly find that at times you’ll want to find the username whilst running a policy at another time than at login or via Self Service.

A common method used is below & you’ll find it in a number of my scripts.

Continue reading

Check EFI Password State Extension Attribute


JAMF have a great article on deploying the binary needed to set a firmware password on 2010+ Macs via the Casper Suite, here.

I recently had a chance to play with it, but found that the below command (which is used by the following EA to check EFI Password status) often returns nothing or just 0 after running. Regardless if an EFI password is set or not.

So below is a different version of the before linked Extension Attribute, using “expect” & maybe a inelegant check.. but hey, if it works!

Continue reading

Mavericks & Preference Caching


Preference Caching is something that has been within OSX for some time, in Mountain Lion it was quite prominent with plists such as the Dock plist.

When Dockutil 1.1.4 was released it’s major change as noted in the release notes was to restart  this preference caching service called: cfprefsd, without which the settings written to the com.apple.dock.plist would later be overwritten.

So why am I mumbling along about this?

Well, recently i’ve been involved in discussions on this & wanted to post something to give others the heads up in case anyone else struggles with it.

Continue reading

Apple Software Update Server Updates Stuck Waiting


We cascade  Apple Software Update Server (read: ASUS), from a Master Server on our WAN as per the post here. So once an update is downloaded to the Master ASUS, the Replica’s should just replicate the updates.

This has worked great for a time, but we were missing some updates on a couple of servers. When looking in Server.app at the Software Update service it appeared that the missing updates status was “Waiting…”

ASUS Waiting


As mentioned, these updates should just download from the Master. After a little “what does the logs say,” it appeared that they said EXACTLY what the issue was:

Continue reading

How To Change The Apple Software Update Server Sync Interval


By default Apple Software Update Server’s (READ: ASUS) sync daily with Apple at 3am.

But this can be changed, & the below script can be ran to change the interval. You can change either the time of day the sync runs or change it to once a week.

NOTE: As the LaunchDaemon is located within the Server.app, you’ll need to run this after every update to Server.app.

Continue reading