> ## Documentation Index
> Fetch the complete documentation index at: https://docs.getprimo.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Locking devices

> Remotely lock a managed Mac, Windows, Linux, iOS, iPadOS, or Android device from the cockpit to prevent unauthorized access when a device is lost or an employee is offboarded.

Remote lock immediately prevents access to a managed device without erasing its data. Use it when a device is temporarily lost or misplaced, or as a first step before deciding whether to wipe.

## Platform compatibility

| macOS | Windows | Linux | iOS / iPadOS | Android |
| - | - | - | - | - |
| ✅ | ✅ | ✅ | ✅ | ✅ |

## Lock a device

**1. Go to Devices and open the device details page**

**2. Click Actions > Lock**

**3. Confirm the action**

> [tab] macOS
>
> On macOS, the Mac shows a lock screen that asks for a **6-digit PIN**. The PIN appears in the cockpit, never on the device. Once the Mac has received the command, the lock holds even if it goes offline.
>
> **To unlock the device:**
>
> * Go to **Devices**, open the device details page, and click **Actions > Unlock** to display the PIN.
> * Enter the **6-digit PIN** on the Mac.
> * Once unlocked, the device returns to normal operation — no data is lost.

> [tab] Windows
>
> On Windows, remote lock signs out every session, disables all local accounts (administrators included), and blocks cached domain and Microsoft Entra ID sign-ins. The device then shuts down after 15 seconds. No one can sign in on the device, and there is no PIN.
>
> Remote lock on Windows runs as a script, so scripts must be enabled on the device.
>
> **To unlock the device:**
>
> * Go to **Devices**, open the device details page, and click **Actions > Unlock**.
> * The device must be online, with scripts enabled, to receive the unlock. Its accounts are then re-enabled — no data is lost.

> [tab] Linux
>
> On Linux, remote lock ends all user sessions, locks every user account, and blocks new logins with a "Locked by administrator" message. On Ubuntu with GDM, the device restarts. There is no PIN.
>
> Remote lock on Linux runs as a script, so scripts must be enabled on the device.
>
> **To unlock the device:**
>
> * Go to **Devices**, open the device details page, and click **Actions > Unlock**.
> * The device must be online, with scripts enabled, to receive the unlock. Its accounts are then unlocked and the device restarts — no data is lost.

> [tab] iOS / iPadOS
>
> On iOS and iPadOS, locking a device enables **Lost Mode**. The device displays a custom message and phone number on the lock screen, and its location is tracked.
>
> Lost Mode is available on supervised devices with MDM turned on.
>
> **To unlock the device:**
>
> * Go to **Devices**, open the device details page, and click **Actions > Unlock**.
> * The device exits Lost Mode and returns to normal operation.

> [tab] Android
>
> On Android, remote lock immediately locks the screen. The employee is prompted for their existing passcode, PIN, or pattern before regaining access. No data is erased.
>
> Remote lock works on both **company-owned** and **personally-owned (BYOD)** Android devices enrolled with Primo.
>
> **To unlock the device:**
>
> * The employee enters their existing device passcode, PIN, or pattern.
> * If the employee has forgotten their passcode, use [Clear passcode](https://docs.getprimo.com/mdm/guides/clear-passcode.md) to remove it so they can set a new one.

## Related articles

* [Wiping devices](https://docs.getprimo.com/mdm/guides/wiping-devices.md)
* [Clear passcode](https://docs.getprimo.com/mdm/guides/clear-passcode.md)
* [Activation Lock bypass](https://docs.getprimo.com/mdm/guides/activation-lock-bypass.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.