Roll out ssg with Jamf Pro
Use a Jamf Pro policy to install ssg on your Macs and enroll them in your Fleet org. Fleet makes the script. You add it to Jamf Pro.
Third-party product
Jamf Pro is a product of another company. SigmaShake does not partner with Jamf and does not claim a certification with Jamf. These steps use only the standard Jamf Pro script and policy features.
Before you start
- You are an
org_adminof your Fleet org. - You can add scripts and policies in Jamf Pro.
- You have a small test group of Macs.
Step 1: Make an enrollment profile
- Open the Fleet console. Go to Enrollment.
- Choose Roll out with Jamf Pro.
- Make an enrollment profile. Set a name and an expiry. The default expiry is 7 days. You can set a maximum number of enrollments.
- Copy the enrollment token. The console shows the token one time only. Keep it in a safe place.
Step 2: Download the Jamf script
- In the Fleet console, choose Download Jamf script.
- Save the file
ssg-jamf-<org-slug>.sh.
The script does not hold the token. The token comes from a Jamf script parameter. You can also get the file from the API: GET /api/v1/orgs/:org_id/enrollment-profiles/:profile_id/mdm/jamf. It needs an org_admin session. It answers 404 when the profile is not in your org. It answers 410 when the profile is expired or revoked.
Step 3: Add the script in Jamf Pro
- In Jamf Pro, go to Settings > Computer management > Scripts.
- Add a new script. Paste the file content.
- On the Options tab, set the parameter labels:
- Parameter 4:
SigmaShake Fleet enrollment token - Parameter 5:
Host label (optional)
- Parameter 4:
Step 4: Make the policy
- Make a new policy.
- Add a Scripts payload. Choose the script.
- Set parameter 4 to the enrollment token.
- Set parameter 5 to a host label, or leave it empty. A label can use letters, digits, dot, underscore and hyphen. It can be 64 characters long. With no label, the script uses the computer name.
- Set the triggers to Enrollment Complete and Recurring Check-in.
- Set the execution frequency to Once per computer.
- Scope the policy to your test group first.
What the script does
- It runs as root. Jamf runs policies as root.
- It works on macOS only. On another system it exits with code
2. - It reads the token from parameter 4. The token must be 32 hexadecimal characters. Upper or lower case is accepted. If not, the script exits with code
3. - It installs
ssgwith no prompt in the folder/usr/local/sigmashake/bin. The script makes/usr/local/sigmashakeand itsbinfolder owned byroot:wheelwith mode755. - It refuses to continue (exit code
4) if a user other than root can write to thessgbinary or to its folder. - It adds a link
/usr/local/bin/ssgonly when/usr/local/binis owned by root and no group or other user can write to it. If Homebrew owns that folder, the script adds no link. Run/usr/local/sigmashake/bin/ssginstead. - It sends the token to
ssg fleet enrollon stdin. The token is not in a command argument and is not printed. If the installedssghas no stdin option, the script uses a positional argument as a fallback. - It installs a LaunchDaemon in
/Library/LaunchDaemonsthat runs/usr/local/sigmashake/bin/ssg(ownerroot:wheel, mode644) and loads it withlaunchctl. - It is safe to run again. On a Mac that is already enrolled, it prints
already enrolledwith the org id and exits with code0. It does not restart the daemon when nothing changed.
| Exit code | Meaning |
|---|---|
0 | Done, or the Mac is already enrolled |
2 | The system is not macOS |
3 | Parameter 4 does not hold a valid token |
4 | The install failed, a non-root user can write to ssg or its folder, or the script does not run as root |
5 | The enroll step failed |
Step 5: Check the result
- Wait for the first Mac to check in. Fleet updates the list of hosts as Macs connect.
- Open the Fleet console home page (the health console). Each host shows its checks. A check with no data shows
unknown. Fleet showspassonly when it has evidence. - If a Mac does not show up, see the Jamf policy log for the exit code. Use the table above.
- When the test group is good, widen the scope of the policy.
Safety notes
- Treat the token as a secret. Do not put it in chat, in a ticket, or in the script.
- Set a short expiry. Revoke the profile when the rollout is done.
- You can ask your AI agent to guide you. See Connect your AI agent to Fleet.