Using jamf quick add pkg with macdeploystick

Wonder what is best way to enroll client into jamf using macdeploystick?

The standard quick add pkg built though the recon.app is not working in MDS workflow list of packages.

Anyone have a working method?

Thanks!

Figured it out. Delivered jamfQA pkg to /Users/Shared/… using munkipkg and included a postflight script that executed the jamfQA pkg

1 Like

thanks for sharing the results!

tim

Could you please explain how you did this?

“Figured it out. Delivered jamfQA pkg to /Users/Shared/… using munkipkg and included a postflight script that executed the jamfQA pkg”

I see from here:

Looks like you should use a profile. I’ll investigate and post a kbase and sample script.

tim

Hello Ozzy

I use the jamf Recon app to build a standard QuickAdd package. This pkg needs to run after the system is installed (forget specifics at the moment). So using munkipkg I simply nested the jamf QA.pkg inside another pkg. This new pkg deposits the jamf QA.pkg to /Users/Shared and then runs a postflight script to install and then remove the jamf QA.pkg. Make sense?

Here is postinstall script:

#!/bin/sh
#jamfQA_postinstall.sh

#concept stolen from gmarnin’s bootstrap naming script and rtrouton’s 1st boot package install setup
#Modified by tcaldana on 03-08-19

#This postinstall script executes the jamfQA_v1090.pkg placed script in /Users/Shared
#so it can run after system installation

#Macintosh HD volume name is hard coded because new Macs have shipped with that since forever
#adjust as needed

/usr/sbin/installer -pkg /Volumes/Macintosh\ HD/Users/Shared/jamfQA_v1090.pkg -target /
#change pkg name and path as needed

/bin/sleep 5

#Clean up #change pkg name and path as needed
/bin/rm /Volumes/Macintosh\ HD/Users/Shared/jamfQA_v1090.pkg
exit 0

I welcome any suggestions to improve this script. I am having an issue which I will submit as another post.

Thanks Tim. Curious what you can come up with. We use a jamf QA package for zero touch enroll on lab/classroom computers.

removed previous post

Hi Tony, that make sense. Thanks for that!
But when i’ll try it with munkipkg it wil fail…
So i’ll set the QA in /payload/Users/Shared/ than edited your script a little bit (name-wise) and saved
this “pico postinstall” in /scripts after this I’ll run the munipkg to make a pkg.
If i inspect this pkg there are 5files and 1 script.

Am I missing something?

Hello Ozzy,
How is your pkg failing? sounds like munkipkg is making a pkg, correct?
Did you edit the build-info.plist before making your pkg?

Tony

Hello, MDS respons with the message “installation failed…” Couldn’t install.
Yes that’s correct. Did not edit the build-info.plist should I? Or what changes does it need?
Do you have an output of that?

Ozzy

Attaching screenshot of my directory tree
jamfQA

(forum system says I can only post one image at a time so see next reply)

Tony

Here is an example of my plist file.


You can change the Identifier string to suit your needs or leave it.
The install_location likely needs to be set.

I’ve updated my postflight script as well. I will edit my previous post to this thread to reflect the changes.

Let me know how it goes for you.
Tony

For me still no succes… Keeps telling me “Couldn’t install …”
I’ve copied you’re postinstall script, did some name adjustments,
I’ve the same structure as you showing the munkipkg img
I’ve set the executable bit for “postinstall”
I’ve edited the “build-info.plist” same

macOS 10.14.3
MDS 1.3 8443
JAMF 10.10.1

Try editing the install_location value in your build-info.plist to just: /Users/
remove the “Shared/”

If that doesn’t work two possibilities:

  1. did you test your JSSDEV-QuickAdd_V2.pkg manually? Put it in Shared folder and verify it runs and removes itself.
  2. It could be the jamfQA… we are running jamf 10.9 (about to upgrade). They’ve broken the QA pkg before.

Let me know how it goes.

Tried that also… But I’ve a solution, don’t know if it’s pretty but it’s working for me:

Both the QA installer and script are deposit in /Users/Shared/ than a LaunchDaemon is set to work.
This works for me, we have also a class/lab environment.

Glad that is working for you.

Launch agent/daemon is good idea. When using Bootstrappr I was using Rich Trouton’s 1st boot package install setup to get jamfQA to work – it works using same concept.

If in the slim chance going to jamf 10.10.1 breaks my setup I will certainly try your approach.

Not sure if worth mentioning but one other difference I noticed is that I did edit my postflight script to use full path:

/usr/sbin/installer -pkg /Volumes/Macintosh\ HD/Users/Shared/jamfQA_v1090.pkg -target /

I also removed sudo as not needed. Script was working for me before this change so may or may not help in your setup.

ciao,
Tony

1 Like