What is the secure token?
The secure token is a security identifier generated by macOS and linked to a local user account. It applies to macOS 10.13 and later on APFS volumes. It enables data encryption and decryption through FileVault. A user with a secure token is considered “authorized” to perform sensitive system actions such as:- Enabling or disabling FileVault
- Changing another local user’s password (if the user has a secure token)
- Creating a new local user
- Granting a secure token to another account
- Deleting a local user account
An account without a secure token still works as a regular administrator once the disk is unlocked:
sudo, app installs, and settings unrelated to FileVault or startup security. MDM commands such as Lock and Wipe don’t go through this account and work either way.Why the secure token matters
Primo relies on the secure token to manage macOS users securely. When you reset a password or create a new user from the cockpit, macOS requires an account that holds a secure token to run the action. If no account on the device has one, the action fails.Check the secure token status from the cockpit
The cockpit displays the secure token status under the Users tab of the relevant device. Use it to verify whether the macOS administrator account used by Primo holds an active secure token.To ensure proper user management, make sure the administrator account linked to the device has a secure token.
Grant a secure token to the Primo admin account
Accounts created by the Admin Management control have no secure token until they log in once. Do this once per Mac.1
Check the bootstrap token
On the Mac, run:The output must show
Bootstrap Token escrowed to server: YES. If it shows NO, escrow the bootstrap token first.2
Get the admin password
In the device panel, open the Users tab. On the admin account card, click Actions > Display password and copy it.
3
Log in at the login window
Log in as the admin account from the Mac’s login window and type the password. SSH sessions, scripts run through Primo,
su and sudo don’t grant a token.4
Check the result
Grant or revoke a secure token
Both commands run locally on the device. To grant a secure token to an account:- makes sysadminctl prompt for each password, so they don’t end up in your shell history. Never paste these passwords into a ticket or a chat.
In both cases you need the password of the account concerned and the password of an administrator account that already holds a secure token. This is an Apple requirement: changing the secure token status of a user with sysadminctl always requires the user name and password of an existing secure token-enabled administrator. There is no way to do it remotely without these passwords.
If no account with a secure token is left, only the FileVault recovery key can unlock the disk. Find it in the device panel, under Information > Host information > Recovery key.
sysadminctl and System Settings prevent the deletion of the last administrator or secure token-enabled user.
The cockpit can take up to 24 hours to update the local account status on the device’s users tab.
Bootstrap token and volume ownership
The bootstrap token is the mechanism that lets macOS grant a secure token at first login, without anyone entering credentials manually. Apple documents the following behavior:- On macOS 11 and later, setting the initial password for the very first user on the device results in that user being granted a secure token.
- On macOS 11 and later, if macOS doesn’t grant a secure token at creation, and if a bootstrap token is available from the device management service, it grants a secure token to the local user when they log in.
- On macOS 10.15.4 and later, macOS generates and escrows a bootstrap token to the device management service on the first login by any secure token-enabled user, if the service supports the feature.
- The user that first claimed the device by configuring it for their use is granted a secure token and becomes the first volume owner.
- When a bootstrap token is available and in use, it also becomes a volume owner, and it grants volume ownership status to additional accounts as it grants them secure tokens.
listUsers returns volume owners by GUID. To map a GUID back to an account, search for its GeneratedUID:
Escrow a missing bootstrap token
Ifprofiles status returns escrowed to server: NO, run this on the Mac with the credentials of an account that already holds a secure token, usually the device’s main user:
profiles status -type bootstraptoken again to confirm.
Secure token behaviors (macOS only)
[¹] Without an escrowed bootstrap token, the first login doesn’t grant a token. See Escrow a missing bootstrap token.
In the Users tab, accounts created by the Admin management control show Source: MDM Control. Other accounts show no source.