Copying files locally off server for install

New Contributor II


I am new to being the JAMF admin on our team and I can troubleshoot macs and use them but scripting and automation are not my thing by any means. I am trying to learn but it's a big big world and I need help.

I have been tasked by security to deploy SecureAuth Login to the macs in our environment for 2FA. Per the website for SecureAuth (and my tests to confirm it) The Installer "SecureAuth.pkg" and a "config.json" file both need to be in the same location local on the machine in order for the pkg installer to work correctly.

Thanks all!

What I need help with is how to make this happen. I need to build out a script to copy the "SA.pkg" and "config.json" files to a local location on the MAC from our network server/host, and then run the pkg file.


Contributor III

You should be able to use composer to accomplish what you are looking to do I believe. If you place the pkg and the json in the location they are supposed to go into, and then drag those into composer, you can have composer create a .dmg file that will drop those files in the correct location.

You can then utilize a policy that runs the command:
installer -pkg /PATH/TO/PKG -target /
to install the .pkg that you dropped on the computer

Valued Contributor

On a test machine:
1. Install the Jamf Pro Tools
2. Run this command in terminal mkdir -p /tmp/SecureAuth
2. Drag the SecureAuth.pkg and config.json files to /tmp/SecureAuth
3. Open composer, and drag the SecureAuth folder you created into the left side of Composer
4. Add a postinstall script in Composer with the following command: installer -pkg /tmp/SecureAuth/SecureAuth.pkg -target /
5. Get your company to pay for the Jamf 200 and 300 courses for you, you'll both benefit from it