Skip to main content

Resetting Account Lock After Failed Login Attempts on macOS

Overview

When a Mac user enters the wrong password too many times, macOS can temporarily lock their account. Swif's Lock Reset action clears the lockout from the Swif console, so the user can try their password again without waiting for the lockout to expire.

Important: Lock Reset doesn't change the password. It only removes the lockout. If the user has forgotten their password, see How to Reset a Device Password by admin or Reset a FileVault Password When a Mac Is Offline.

Note for iOS & iPadOS: Lock Reset applies exclusively to macOS accounts. For locked out company-owned iPhones or iPads, use Clear Passcode instead.

Requirements

Item

Details

Platform

macOS

Device status

Enrolled in Swif and online

Permissions

Admin access in Swif

The number of failed attempts allowed and the length of the lockout depend on your Apple Password Policy.

Signs of a locked account

  • The Mac takes much longer than usual at the login screen.

  • The user's correct password no longer works after a restart.

Check failed login attempts in Swif

  1. In Swif, go to Device Management > Devices and open the Mac.

  2. Go to the Accounts tab.

  3. Check Failed Login Attempts for the user's account.

Clear the lockout

  1. On the Accounts tab, find the locked account.

  2. Click the ⋯ menu and select Lock Reset.

  3. Wait for the command to complete.

  4. Have the user log in with their correct password.

If the password still doesn't work, the user may have forgotten it. Reset the password instead if the device is online. See How to Reset a Device Password by admin.

Check failed login attempts on the Mac

You can also check the lockout state on the Mac with Terminal. This requires administrator privileges.

  1. Open Terminal.

  2. Run the following command, replacing <username> with the affected user account:

    sudo dscl . -read /Users/<username> accountPolicyData
  3. Review these values in the output:

    • failedLoginCount: the number of consecutive failed login attempts

    • failedLoginTimestamp: the time of the most recent failed attempt

Example:

<key>failedLoginCount</key>
<integer>5</integer>
<key>failedLoginTimestamp</key>
<date>2026-01-01T10:00:00Z</date>

If failedLoginCount is above your password policy's limit, the account is locked. The lock clears on its own after the lockout period, or right away with Lock Reset.

iPhone and iPad: Passcode Lockouts

When an iOS or iPadOS user repeatedly enters an incorrect passcode, the device displays iPhone Unavailable or Security Lockout and temporarily locks.

Unlike macOS, iOS/iPadOS does not use account-level lock reset commands. Instead, admins can clear the lockout on managed devices using Clear Passcode:

  1. In Swif, go to Device Management → Devices and select the iPhone or iPad.

  2. In the left navigation, click Manage.

  3. Under the Device section, click Clear Passcode.

  4. Confirm the warning prompt. The command removes the passcode lock immediately without wiping device data, allowing the user to unlock the device and set a new passcode.

  5. If the device is offline, the command will remain Queued / Pending and execute automatically once the device reconnects to Wi-Fi or cellular data.

Exceptions: Clear Passcode is not supported on Shared iPads, BYOD (User Enrollment) devices, or older enrollments missing an unlock token. In those cases, the device must be erased or unlocked using previous passcode recovery (if changed within 72 hours). For complete details, see How to clear the passcode on a managed iPhone or iPad.

Preventive measures

  • Set sensible lockout limits. Choose the number of allowed failed attempts and the lockout period in the Apple Password Policy.

  • Use strong passwords that users can remember. Very complex passwords lead to more typing mistakes and lockouts.

  • Monitor failed login attempts on the Mac's Accounts tab to spot unusual activity.


Troubleshooting

The password still doesn't work after Lock Reset

Lock Reset clears the lockout but doesn't change the password. If the user has forgotten it, reset the password. See How to Reset a Device Password.

The Mac is stuck at the FileVault screen

Lock Reset can't reach a Mac that hasn't started up. Use the FileVault recovery key. See Reset a FileVault Password When a Mac Is Offline.

The Lock Reset command doesn't complete

The Mac is probably offline. Make sure it's turned on and connected to the internet, then try again.

The account locks again right away

The user may be entering an old password, or an app or service may be signing in with a saved, outdated password. Have the user confirm their current password. If the problem continues, check failed login attempts again to see how quickly they increase.


Related resources

If you need more help, contact Swif support through Intercom or email support@swif.ai.

Did this answer your question?