Lock Stolen System [Macintosh]
Overview
This automation tracks a Mac marked as stolen and saves its public IP address, internet provider, approximate location, Wi-Fi network name, FileVault status, network settings and nearby network devices to custom fields. When cPVAL System Lockdown is checked, it first locks the Mac: it sets the password in cPVAL Stolen System BitLocker Password on every local user account except the IT admin account, disables those accounts, signs out the current user and shows your message on the login window and the FileVault screen. The Mac then shuts down one minute after the automation finishes. Without lockdown, the Mac stays online so it can be tracked again.
The Lock Stolen Systems [Macintosh] compound condition runs this automation every 30 minutes on Macs marked as stolen, so you rarely need to run it yourself. It shows as failed when the Mac isn't marked as stolen, or when the lockdown can't finish, for example because the admin account fields are missing.
Requirements
- macOS, with FileVault turned on to protect the data on the disk
- Run As:
System - Shell script (bash)
- For lockdown, a local admin account with a Secure Token, set in the cPVAL Stolen System Mac Admin User and cPVAL Stolen System Mac Admin Password custom fields
- Internet access to
ipinfo.iofor the public IP address and location
Sample Run

Scenarios
- Track only: with cPVAL Mark System as Stolen checked and cPVAL System Lockdown unchecked, the automation updates the location and network details, and the Mac stays online.
- Track and lock down: with both checked and the lockdown password and admin account set, the automation locks every user account except the admin account, updates the details, sets cPVAL Lock Status to
Lockedand shuts the Mac down after one minute. - Some accounts couldn't be locked: cPVAL Lock Status shows
Partially Locked, the Mac still shuts down, and the activity details name the accounts that failed. - Lockdown settings missing or wrong: if the lockdown password, the admin account or its password is missing or wrong, or the admin account has no Secure Token, nothing is locked. The details are still updated, the Mac stays online, and the automation shows as failed.
- FileVault off: the automation still runs, and both the activity details and cPVAL Current Location and IP Details show that FileVault is off.
- Not marked as stolen: the automation makes no changes and shows as failed.
Custom Fields
| Custom Field | Scope | Type | Description |
|---|---|---|---|
| cPVAL Mark System as Stolen | Device | Checkbox | Must be checked for the automation to run. |
| cPVAL System Lockdown | Device | Checkbox | Locks and shuts down the Mac when checked. |
| cPVAL Stolen System BitLocker Password | Device | Secure | New password of every locked user account. Required for lockdown. |
| cPVAL Stolen System BitLocker Message | Device | Text | Message shown on the login window and the FileVault screen. Optional. |
| cPVAL Stolen System Mac Admin User | Device | Text | IT admin account that performs the lockdown and is never locked. Required for lockdown. |
| cPVAL Stolen System Mac Admin Password | Device | Secure | Password of the IT admin account. Required for lockdown. |
| cPVAL Current Location and IP Details | Device | Multi-line | Receives the FileVault status, Wi-Fi network name, public IP address, internet provider, location and network settings. |
| cPVAL Network Neighbours | Device | WYSIWYG | Receives up to 30 nearby network devices. |
| cPVAL Lock Status | Device | Text | Set to Locked, or Partially Locked when some accounts couldn't be locked. |
Dependencies
- Custom Field: cPVAL Mark System as Stolen
- Custom Field: cPVAL System Lockdown
- Custom Field: cPVAL Stolen System BitLocker Password
- Custom Field: cPVAL Stolen System BitLocker Message
- Custom Field: cPVAL Stolen System Mac Admin User
- Custom Field: cPVAL Stolen System Mac Admin Password
- Custom Field: cPVAL Current Location and IP Details
- Custom Field: cPVAL Network Neighbours
- Custom Field: cPVAL Lock Status
- Compound Condition: Lock Stolen Systems [Macintosh]
- Automation: Unlock Stolen System [Macintosh]
- Solution: Lock Stolen System
Automation Setup/Import
Output
- Activity Details
- Custom Field: cPVAL Current Location and IP Details
- Custom Field: cPVAL Network Neighbours
- Custom Field: cPVAL Lock Status
Changelog
2026-11-12
- Initial version of the document