Skip to main content
Actions

Disable user account

How this action disables a local user account on the device, what that changes and when the step fails.

Use this action to disable a local operating-system account on the device so nobody can sign in with it anymore. The device must be online.

Configuration fields

FieldTypeRequiredDefaultDescription
Account nametextYes—Name of the local account you want to disable. Variables ${{ … }} are allowed.

Platform support

PlatformSupported
WindowsYes
LinuxYes
macOSYes
PlatformWhat "disabled" means
WindowsThe local account is disabled.
LinuxThe password is locked and the login shell is set to nologin (or /bin/false if nologin isn't available).
macOSThe account is marked as disabled in the local directory, and its login shell is set to /usr/bin/false.

Outputs

OutputDescription
successSucceeded: true when the device disabled the account, false when it reported a failure.
userNameAccount name: the account name after variables were resolved.

Result behaviour

SituationResult
Account currently signed inSucceeded. Existing sessions keep running; only new sign-ins are blocked.
Account is root, daemon or nobodyFailed, because the account is protected.
Account doesn't exist, or the device can't disable itFailed. The device's error appears in the step details.
Account name empty after variables were resolvedFailed with The account name is empty.
Device doesn't answer in timeTimed out. The outcome is unknown, so check the account on the device.
Device offline when the step startsDevice offline. Depending on If device is offline, the run ends with this status or the step is skipped.

The step doesn't delete the account, its files or its group memberships. To enable the account again, use Enable user in the Local Users section of the device page.

See also: Create an automation · Create user account · User Account Audit