Skip to main content

How to lock someone out (account lock)

Overview

Account Lock stops one user account from signing in to a device, for example when an employee is leaving, or their device is lost. The device, and any other accounts on it, keep working.

To…

Use

Stop one user from signing in to a device

Account Lock, in this article

Lock the whole device

Manage > Lock. See Lock the whole device below.

Remove everything from the device


Lock an account

  1. In Swif, go to Devices > Inventory.

  2. Find the device, click ⋯, and select View Details.

  3. Open the Accounts tab, and click ⋯ next to the account you want to lock.

  4. Click Lock/Unlock.

  5. Click Lock account to confirm.

Unlock an account

Follow the same steps, and choose Unlock.


What locking does on each platform

Platform

Signing in at the device

sudo or admin rights

Remote sign-in with a password

SSH with a key

macOS

Blocked

Blocked

Blocked

Blocked

Windows

Blocked

Blocked

Blocked

Blocked

Linux

Blocked

Blocked

Blocked

Blocked

Swif turns off the whole account, so every way of signing in is blocked, including SSH sign-ins that use a key from ~/.ssh/authorized_keys. On Linux, Swif locks the account's password, and sets the account to expired. SSH then shows "Account expired".

Linux accounts locked before Nov 2026 can still sign in over SSH with a key. Before Nov 2026, Account Lock on Linux locked only the password, and SSH key sign-ins still worked. After the device updates, unlock the account and lock it again, to block SSH keys too.

Unlocking a Linux account removes both the password lock and the expiry.


Lock the whole device

To lock the whole device instead, open the device, and choose Manage > Lock.

To unlock a Mac afterward, see How to unlock a Mac computer after it is locked.


Troubleshooting

A locked Linux user can still connect over SSH

The account was probably locked before Nov 2026, when only the password was locked. Check that the device runs Nov 2026 or later, then unlock the account, and lock it again.

The user signed in again after I locked the account

  • Check that the lock was applied to the right account, in the device's Accounts tab.

  • Check that the device is online, and has received the command.


Related resources

Did this answer your question?