Posted on 07-09-2014 11:24 AM
Prey Project Mass Deploy Issues - i have made a package of the prey software using the following information in composer on a 10.9.4 MBP. I am having issue with the deployment -
Below is the prey project general info. I made a snap shot and modified .dmg in composer of the install - it worked on the end unit but could not get to work via JSS. Any ideas - i made a dmg package with the info below, not sure if it need to be a .pkg or and additional script.
To install Prey in batch mode on a Mac environment, you'll need to use OS X's installer command using the meta package (MPKG) instead of the regular DMG installer.
Download the latest MPKG package (prey-X.X.X-mac-batch.mpkg.zip) from our release archive Run the following command on a terminal: API_KEY="YOUR_API_KEY" sudo -E installer -pkg PATH_TO_MPKG_FILE.mpkg -target /
Where YOUR_API_KEY is your account's API key (you can get your API key from your account's profile page). To install version 0.6.2 using an API key abcdef123456 you'll need to run in a terminal:
API_KEY="abcdef123456" sudo -E installer -pkg prey-0.6.2-mac.mpkg -target /
The installer will validate the API key and make sure that the account has available slots to add that device. If conditions are met, then Prey will be set up and the device will automatically appear in the Devices section of your Prey account.
https://help.preyproject.com/articles/63-how-to-mass-deploy-prey-for-mac-os-x
Posted on 08-17-2015 04:08 PM
I figured this out. Still interested?
Posted on 01-29-2016 09:50 AM
I am interested on how you did it..
Posted on 02-02-2016 02:49 PM
I can get the command line working in terminal...API_KEY=foobar123 sudo -E installer -pkg prey-mac-1.X.X-x86.pkg -target /
How would we then translate that into something casper can deploy?
thanks.
Posted on 03-10-2016 02:12 PM
dyyuan did you get an answer how to deploy via casper? Like you the command actually installs prey but I have not worked out how to package it for deployment via casper...
Posted on 03-10-2016 02:28 PM
Using one policy, we set to the package to cache/stage in a custom location, just using composer
and thereafter ran install command
!#/bin/bash
sleep 100 && API_KEY=ABC123 sudo -E installer -pkg '/Library/Application Support/YourCO/preymac.pkg' -target /
exit 0
Posted on 03-10-2016 02:32 PM
I recently needed to deploy Prey to a laptop that was stolen. I used an FTP site to stage the installer on and then used a script to download and install:
#!/bin/bash
# Name: deployPrey.sh
# Date: 12 Feb 2016
# Author: Steve Wood (swood@integer.com)
# Purpose: to utilize curl to deploy Prey on a stolen laptop and have it check in to the Prey Project servers
ftpSrv='ftp.mycompany.com'
ftpUser='ftpuser'
ftpPass='ftppass'
preyFile='prey-mac-1.5.0-x86.pkg'
apiKey='yourpreyapikey'
# first grab the installer from the FTP server using curl
curl ftp://$ftpUser:$ftpPass@$ftpSrv/$preyFile > /tmp/prey-mac-1.5.0-x86.pkg
# install using Prey's instructions
API_KEY=$apiKey installer -pkg /tmp/prey-mac-1.5.0-x86.pkg -target /
Posted on 03-10-2017 02:26 PM
@stevewood I'm not great at scripting - how would I alter your script for tftp? I tried to just substitute but then got cert errors and curl -k did not work either. Any help appreciated.
Posted on 03-11-2017 07:47 PM
@bfrench I have not tried to use TFTP to do this, but it should be as easy as switching out ftp for tftp, at least that is what the curl spec says. The -k option should do the trick, but if it didn't in your testing, then it must be something else. I would check the certs on the tftp server you are trying to download from.
If your distribution point is public facing and is an HTTPS share, you could switch to just using the https URL:
curl https://your.jss.com/<sharename>/preypackage.pkg
I just switched my script above to use HTTPS instead of FTP.
Posted on 03-11-2017 10:23 PM
you could also just deploy the package to a temporary location, including cache, such as Waiting Room and install from there?
API_KEY=XOXOXOXO sudo -E installer -pkg '/Library/Application Support/YOUR_CO/preymac.pkg' -target /
Posted on 03-14-2017 11:09 AM
@stevewood I finally got it to work on my test device - turned out my test device - that had not been used in a while - had the wrong date/time. Once that was correct the script installed. Now waiting for the missing device to check back in.....
Thanks for your help.