JAMF v9.81 Binary & DeployStudio

mbinkley
New Contributor

Good afternoon,

We utilize both the Casper Suite and DeployStudio for imaging our computers. After JAMF moved the binary to provide compatibility with OS X 10.11, we are finding that our previous working setup is now broken.

Allow me to elaborate on how our setup works...

Our base image, computer naming, and OS-level patches are installed using DeployStudio. The last step of that workflow installs a in-house written script containing jamf command line statements.

For those of you unfamiliar with DeployStudio there are two steps with the workflow. The first step is the actual copying of the image down to the client, which is completed while the machine is connected to our DeployStudio NetBoot server. Once this finishes, the client machine reboots into to the second step which is a first-boot script known as ds_finalize.sh. That script first installs the JSS QuickAdd.pkg, we created from Recon, then calls the in-house script we wrote that has command line statements for JSS policies.

For example, to install Creative Cloud we would use a command similar to this:

jamf policy -trigger -id 999

[Since the ds_finalize script is being executed by launchd, there is no need to prefix the command with sudo.]

Prior to JSS v9.8 this worked perfectly. After the upgrade, we are getting an error that the command jamf is not recognized. I can verify that the target computer is enrolled in the JSS. I also can verify that there are not any errors in the jamf.log file on that computer that would prevent this from being executed.

Some additional troubleshooting we performed was running the command "type jamf" on both a working computer and a computer during the ds_finalize.sh script on first-boot. On the normal computer it returns "jamf is /usr/local/bin/jamf" whereas on the machine completing the first-boot script it says "type: jamf: not found."

It appears as if the jamf binary is not being recognized as installed even after verifying that the QuickAdd.pkg was installed successfully and that the computer is communicating with the JSS. Running any jamf or sudo jamf command after that machine exits the finalize script works fine. The only place it isn't working is during the ds_finalize.sh first-boot script.

I apologize for the lengthy post but does anyone have any ideas as to why this is happening or have any idea on how to fix it? Again this worked fine prior to v9.8 of the JSS.

Thanks in advance for any help you can provide!
Michael

2 ACCEPTED SOLUTIONS

mm2270
Legendary Contributor III

Its been reported on other threads that launchd jobs may not be aware of the PATH environment variables, or that it uses a different set itself, so it can't resolve 'jamf' into '/usr/local/jamf/bin/jamf' The suggestion then would be to make sure the script calling any' jamf policy' commands is using the full path to the binary and not relying on it being able to resolve it on its own.

Hope that helps.

View solution in original post

rtrouton
Release Candidate Programs Tester

I've got a post on how the PATH environment variables work with regards to Casper 9.8. It's available from here, along with a possible fix for the problem you're describing:

https://derflounder.wordpress.com/2015/09/24/path-environment-variables-and-casper-9-8/

View solution in original post

3 REPLIES 3

mm2270
Legendary Contributor III

Its been reported on other threads that launchd jobs may not be aware of the PATH environment variables, or that it uses a different set itself, so it can't resolve 'jamf' into '/usr/local/jamf/bin/jamf' The suggestion then would be to make sure the script calling any' jamf policy' commands is using the full path to the binary and not relying on it being able to resolve it on its own.

Hope that helps.

rtrouton
Release Candidate Programs Tester

I've got a post on how the PATH environment variables work with regards to Casper 9.8. It's available from here, along with a possible fix for the problem you're describing:

https://derflounder.wordpress.com/2015/09/24/path-environment-variables-and-casper-9-8/

mbinkley
New Contributor

The PATH environment variables were exactly what was wrong. Thank you for your help!