Tag: scripting

  • Chrome mid-update versions and Munki

    Most of the time, if you want to patch Chrome using Munki, you just use add Chrome as a managed update or managed install to the relevant manifests in your Munki repo, and then have the AutoPkg Chrome.munki recipe import the new version of Chrome into your Munki repo from time to time (daily, weekly, […]

  • Scripting changing user icons: dsimport prompts for password in zsh

    2 June, 2021 Update Special shoutout to Armin Briegel for pointing out that the zsh version runs just fine if you use a different variable name from USERNAME. I’ve tried it with USERACCOUNT instead, and I’ve confirmed it works fine with zsh. Original Post Apple is moving toward making zsh the default shell instead of […]

  • Scripting SSH off/on without needing a PPPC/TCC profile

    You used to be able to use /usr/sbin/systemsetup -f -setremotelogin off or /usr/sbin/systemsetup -f -setremotelogin on to script disabling or enabling SSH on macOS. Now that macOS has Privacy Preferences Policy Control, which needs a profile delivered by a user-approved MDM, you may get this error: setremotelogin: Turning Remote Login on or off requires Full […]

  • Running commands as a user when scripting for Munki or Jamf

    Munki and Jamf run as root, so scripts they execute execute as root, not user. One great way around this is to use Outset‘s login scripts (login-once, login-every), but sometimes you may have occasion to actually run a script immediately as the logged-in user. Obviously, you’ll want to get the currently logged-in user into a […]

  • Scripting changing the user picture in macOS

    Sometimes, you may want to programmatically set a default user picture (with the option for the user to change it later to a picture of her own choice). You used to be able to delete the JPEGPhoto attribute and just add in a Picture attribute, but that seems to have broken somewhere between October 2018 […]