Post

Automated Device Enrollment and Setup Your Mac version 1.8.1

IMPORTANT: Please follow the latest update in this series by using this link: https://techitout.xyz/ade-sym/

Screenshot

Setup Your Mac is a fantastic project that gives end-users a great dialog to let them know what is going on with their Mac as organizational apps are being installed. This dialog added onto Automated Device Enrollment is an awesome replacement to a legacy DEPNotify onboarding workflow.

Recently, SYM has had some amazing features added, including the option to have multiple arrays of policy triggers so the end-user can choose which configuration best works for them. The latest SYM script can be found at: https://github.com/dan-snelson/Setup-Your-Mac

The postinstall script has been updated so there is no need to package swiftDialog with the prestage package. The script will fetch the latest version of swiftDialog and install on the computer to be utilized with the Setup Your Mac script. The script will also create a Launch Daemon and two scripts on the computer.

Important note: You will need to create an additional policy in Jamf Pro to run the clean up script that is created on the Mac. The cleanup script is located in: ${tempUtilitiesPath}/${organizationIdentifier}.sym-prestarter-uninstaller.zsh

In this guide, we will walk through what needs to be done to bring the Setup Your Mac workflow into your Automated Device Enrollments with Jamf Pro.

Requirements:

  1. A certificate used for signing your Prestage pkg. If you’d like to learn more on how this is done, you can use the following link: https://techitout.xyz/2023/03/08/guide-creating-a-signed-certificate/
  2. The Payload Free Package Creator: https://github.com/rtrouton/Payload-Free-Package-Creator/releases
  3. The postinstall script for your pkg: https://raw.githubusercontent.com/robjschroeder/SetupYourMac/main/postinstall-SYM.zsh
  4. The Setup Your Mac script configured with your policy arrays in Jamf Pro

Getting Started:

  1. Download the Payload Free Package Creator to your Mac computer and install.
  2. Download the latest postinstall-SYM.zsh script to your computer.
  3. Feel free to make any modifications on this script to fit your organizational needs. As is, the script is configured to call a Jamf Pro policy with a custom trigger of ‘symStart'
  4. When opening the Payload Free Creator app, you will see prompt letting you that you will need to select the script you would like to package, select the postinstall-SYM.zsh script.

Screenshot

Screenshot

  1. Enter a name for your package and click OK

Screenshot

  1. Enter a package identifier and click OK

Screenshot

  1. Finally, enter a version number for your package, and click OK. You will be asked to enter your username and password before the package is created.

Screenshot

  1. The package will be created at /private/tmp/nameOfPackage
  2. Next we will need to sign our newly created package. Open the Terminal app and run the following commands:
1
2
3
4
5
6
7
8
# Create temp folder
sudo mkdir -pv /private/tmp/NameOfPackage/out
# Build Package
sudo productbuild --package /private/tmp/NameOfPackage/NameOfPackage.pkg /private/tmp/NameOfPackage/out/NameOfPackage.pkg
# Sign Package
productsign --sign "CN Name Of Signing Certificate" /private/tmp/NameOfPackage/out/NameOfPackage.pkg ~/Desktop/NameOfPackage.pkg
# Verify Signature On Package
pkgutil --check-signature ~/Desktop/NameOfPackage.pkg
  1. The signed version of the package will be located on your desktop. This package can now be uploaded to Jamf Pro and added to your PreStage for deployment.

For the configuration of your Jamf Pro policy and Setup Your Mac script, I would recommend checking out Dan’s blog post: https://snelson.us/sym

If you wanted to see the original post on this subject, free free to go to: https://techitout.xyz/2023/01/16/setup-your-mac-and-automated-device-enrollment/

Thanks for checking it out!

This post is licensed under CC BY 4.0 by the author.