Scripting changing user icons: dsimport prompts for password in zsh

Apple is moving toward making zsh the default shell instead of bash, and it may even eventually remove bash completely from being preinstalled on macOS. So lots of Mac admins are working to revise scripts from bash to zsh. Last year, I blogged about Scripting changing the user picture in macOS and referenced this script… Continue reading Scripting changing user icons: dsimport prompts for password in zsh

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… Continue reading Running commands as a user when scripting for Munki or Jamf