Skip to main content

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.

note

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.io for the public IP address and location

Sample Run​

Image1

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 Locked and 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 FieldScopeTypeDescription
cPVAL Mark System as StolenDeviceCheckboxMust be checked for the automation to run.
cPVAL System LockdownDeviceCheckboxLocks and shuts down the Mac when checked.
cPVAL Stolen System BitLocker PasswordDeviceSecureNew password of every locked user account. Required for lockdown.
cPVAL Stolen System BitLocker MessageDeviceTextMessage shown on the login window and the FileVault screen. Optional.
cPVAL Stolen System Mac Admin UserDeviceTextIT admin account that performs the lockdown and is never locked. Required for lockdown.
cPVAL Stolen System Mac Admin PasswordDeviceSecurePassword of the IT admin account. Required for lockdown.
cPVAL Current Location and IP DetailsDeviceMulti-lineReceives the FileVault status, Wi-Fi network name, public IP address, internet provider, location and network settings.
cPVAL Network NeighboursDeviceWYSIWYGReceives up to 30 nearby network devices.
cPVAL Lock StatusDeviceTextSet to Locked, or Partially Locked when some accounts couldn't be locked.

Dependencies​

Automation Setup/Import​

Automation Configuration

Output​

Changelog​

2026-11-12​

  • Initial version of the document