table of contents
- Tumbleweed 0.7.3-1.1
- Leap-16.0
- Leap-15.6
| MOKUTIL(1) | mokutil Manual | MOKUTIL(1) |
NAME¶
mokutil - utility to manipulate Machine Owner Keys (MOK)
SYNOPSIS¶
mokutil [options]
mokutil [--list-enrolled | -l] [--mok | -m
| --mokx | -X] [--short] [--all | -a]
mokutil [--list-new | -N] [--mok | -m |
--mokx | -X] [--short]
mokutil [--list-delete | -D] [--mok | -m |
--mokx | -X] [--short]
mokutil [--import | -i] keylist
([--mok | -m | --mokx | -X] | [--hash-file
| -f hashfile | --root-pw | -P] |
[--ca-check] | [--ignore-keyring])
mokutil [--delete | -d] keylist
([--mok | -m | --mokx | -X] | [--hash-file
| -f hashfile | --root-pw | -P])
mokutil [--revoke-import] [--mok | -m |
--mokx | -X]
mokutil [--revoke-delete] [--mok | -m |
--mokx | -X]
mokutil [--export | -x] [--mok | -m |
--mokx | -X | --pk | --kek | --db |
--dbx]
mokutil [--password | -p] ([--hash-file |
-f hashfile] | [--root-pw | -P])
mokutil [--clear-password | -c]
mokutil [--disable-validation]
mokutil [--enable-validation]
mokutil [--sb-state]
mokutil [--is-sb-enabled]
mokutil [--test-key | -t] keyfile
([--mok | -m | --mokx | -X] | [--ca-check]
| [--ignore-keyring])
mokutil [--reset]
([--mok | -m | --mokx | -X] | [--hash-file
| -f hashfile | --root-pw | -P])
mokutil [--generate-hash[=password] |
-g[password]]
mokutil [--ignore-db]
mokutil [--use-db]
mokutil [--import-hash hash]
([--mok | -m | --mokx | -X] | [--hash-file
| -f hashfile | --root-pw | -P])
mokutil [--delete-hash hash]
([--mok | -m | --mokx | -X] | [--hash-file
| -f hashfile | --root-pw | -P])
mokutil [--set-verbosity (true | false)]
mokutil [--set-fallback-verbosity (true | false)]
mokutil [--set-fallback-noreboot (true | false)]
mokutil [--pk] [--short]
mokutil [--kek] [--short]
mokutil [--db] [--short]
mokutil [--dbx] [--short]
mokutil [--list-sbat-revocations | --sbat]
mokutil [--set-sbat-policy (latest | automatic)]
mokutil [--set-ssp-policy (latest | automatic |
delete)]
mokutil [--timeout -1,0..0x7fff]
mokutil [--trust-mok]
mokutil [--untrust-mok]
mokutil [--help | -h]
mokutil [--version | -v]
DESCRIPTION¶
mokutil is a utility to import, delete, and manage Machine Owner Keys (MOK) stored in the database of the shim EFI bootloader.
UEFI Secure Boot uses built-in firmware key databases (like db and dbx) to verify the integrity of loaded EFI binaries. Machine Owner Keys (MOK) extend this trust chain by allowing system owners to manage their own list of trusted certificates (MokList) and forbidden certificates (MokListX) independently of the system's firmware.
When an import or delete request is initiated using mokutil, the tool creates a pending request by writing UEFI variables in NVRAM (such as MokNew or MokDel). Upon the subsequent system reboot, the shim bootloader detects these variables and launches MokManager. MokManager runs within the pre-boot environment, prompting the physical operator to confirm the request and enter the configured MOK password, ensuring that key updates are authorized by a local user.
OPTIONS¶
Primary Commands¶
- -l, --list-enrolled
- List the certificates currently enrolled in the trusted database (MokListRT). If --mokx or -X is specified, list the certificates in the forbidden database (MokListXRT) instead. This list contains public keys and hashes used to validate or deny loading of bootloaders or kernels.
- -N, --list-new
- List the keys queued in the pending enrollment request database (MokNew, or MokXNew if --mokx is active). These keys are waiting for approval by the system owner in MokManager on the next reboot.
- -D, --list-delete
- List the keys queued in the pending deletion request database (MokDel, or MokXDel if --mokx is active). These keys are waiting to be removed by the system owner in MokManager on the next reboot.
- -i, --import keylist
- Form an enrollment request to import one or more certificates specified in keylist. The keys must be provided as files in DER format. The action creates a pending MokNew (or MokXNew) variable and requires configuring a MOK password for verification on reboot.
- -d, --delete keylist
- Form a deletion request to remove one or more certificates specified in keylist. The keys must be provided as files in DER format. This creates a pending MokDel (or MokXDel) variable and requires configuring a MOK password for verification on reboot.
- --import-hash hash
- Form an enrollment request for hash, given as a hexadecimal string on the command line. SHA-224, SHA-256, SHA-384, and SHA-512 digests are recognized by their string length. Note that this is the hash of a key or binary, not the password hash.
- --delete-hash hash
- Form a deletion request for hash, given as a hexadecimal string on the command line. The same digest algorithms as --import-hash are accepted.
- --revoke-import
- Revoke/cancel the current pending import request (MokNew or MokXNew).
- --revoke-delete
- Revoke/cancel the current pending delete request (MokDel or MokXDel).
- -x, --export
- Export the certificates stored in the targeted database to files in DER format in the current directory. The default targets MokListRT. This can also target other databases if combined with options like --mokx, --pk, --kek, --db, or --dbx.
- -t, --test-key keyfile
- Test whether the specified DER-format key is already enrolled or blocked in the target databases, or already present in a pending request. Exits with status 0 if the key was found, and with status 1 if the key is not enrolled, so the result can be tested from a script.
- --reset
- Issue a request to completely reset the target database (MokList, or MokListX if --mokx is specified). This operation wipes all user-enrolled keys on the next reboot following user confirmation in MokManager.
Targeted Database & List Selection¶
- -m, --mok
- Direct the command to target or manipulate the MOK list (MokListRT). This is the default target list.
- -X, --mokx
- Direct the command to target or manipulate the MOK blacklist (MokListXRT) instead of the MOK list.
Certificate Filtering & Formatting¶
Password Options¶
- -p, --password
- Setup the password (MokPW) that MokManager will require to authorize the pending changes. If neither --hash-file nor --root-pw is provided, the tool prompts interactively for the password.
- -c, --clear-password
- Clear the password for MokManager (MokPW).
- -g[password], --generate-hash[=password]
- Generate and display a SHA-512 crypt password hash. If password is provided directly on the command line, it generates the hash for it. If password is omitted, the utility prompts interactively for the password.
- -f, --hash-file hashfile
- Specify a file containing a pre-computed password hash. mokutil will use this hash instead of prompting. This option is mutually exclusive with --root-pw.
- -P, --root-pw
- Instruct mokutil to use the root password hash from /etc/shadow. This option is mutually exclusive with --hash-file.
Platform Verification Databases¶
- --pk
- List the public keys or certificates enrolled in the Platform Key (PK) database. The PK establishes the platform owner and controls access to the KEK database.
- --kek
- List the keys enrolled in the Key Exchange Key (KEK) signature database. Keys in KEK are used to write and authorize updates to the db and dbx databases.
- --db
- List the keys in the secure boot signature database (db). The db contains certificates, keys, or hashes trusted to run in the Secure Boot environment.
- --dbx
- List the keys in the secure boot forbidden signature database (dbx). The dbx blacklist contains forbidden or compromised signatures that are explicitly denied execution.
Verification and Bypass Controls¶
- --ca-check
- Check whether the Certificate Authority (CA) of the specified key is already enrolled or blocked in the targeted databases.
- --ignore-keyring
- By default, mokutil checks if a key is already enrolled in the kernel's built-in trusted keys keyring. Use this option to bypass the kernel keyring check and force enrollment into the MOK database.
- --disable-validation
- Form a request to turn off the signature validation in shim, so that shim loads EFI images without verifying their signatures. The request is stored in the MokSB variable and has to be confirmed by the physical operator in MokManager on the next reboot. mokutil prompts for the Secure Boot validation toggle password described in NOTES.
- --enable-validation
- Form a request to turn the signature validation in shim back on. This uses the same MokSB variable, password prompt and MokManager confirmation as --disable-validation.
- --ignore-db
- Tell shim not to use the keys in the system's firmware db database to verify EFI images.
- --use-db
- Tell shim to use the keys in the system's firmware db database to verify EFI images. This is the default.
Secure Boot Advanced Targeting (SBAT)¶
- --list-sbat-revocations, --sbat
- List the current revocations active in the Secure Boot Advanced Targeting (SBAT) store (SbatLevelRT). SBAT provides metadata-based generation numbers for bootloader components to quickly revoke vulnerable binaries.
- --set-sbat-policy (latest | automatic)
- Set the SbatPolicy UEFI variable. This variable tells shim how to apply SBAT revocations:
- latest: Enforce the latest SBAT revocations.
- automatic: Enforce the previous generation of SBAT revocations (automatic).
- If UEFI Secure Boot is disabled, shim automatically deletes the SBAT revocations.
- --set-ssp-policy (latest | automatic | delete)
- Set the SSPPolicy UEFI variable. This tells shim how to manage non-native Windows SkuSiPolicy revocations for managing bootmgr revocations.
- latest: Enforce the latest Windows SkuSiPolicy.
- automatic: Enforce the previous Windows SkuSiPolicy (automatic).
- delete: Delete non-native revocations. This is non-persistent and allowed only when Secure Boot is disabled.
Shim and Fallback Environment Controls¶
- --sb-state
- Display detailed Secure Boot status information on the system, showing whether Secure Boot is enabled or disabled.
- --is-sb-enabled
- Check whether Secure Boot is currently enabled. This prints the same status information as --sb-state; the difference is the exit status, which is 0 when Secure Boot is enabled and 1 when it is disabled or the platform is in Setup Mode, so the state can be tested from a script.
- --set-verbosity (true | false)
- Configure the SHIM_VERBOSE variable to make the shim bootloader verbose or quiet.
- --set-fallback-verbosity (true | false)
- Configure the FALLBACK_VERBOSE variable to make the fallback EFI application verbose or quiet.
- --set-fallback-noreboot (true | false)
- Configure the FB_NO_REBOOT variable. Setting this to true prevents the fallback application from automatically rebooting the system.
- --timeout seconds
- Set the countdown timeout for the MOK prompt inside MokManager on reboot. Accepts values between 0 and 0x7fff (in seconds), or -1 to wait indefinitely. Out-of-range values are clamped rather than rejected: a value greater than 0x7fff is stored as 0x7fff, and any negative value is stored as -1. Setting the timeout to 10 deletes MokTimeout instead of storing it, since 10 seconds is already the built-in default of shim.
- --trust-mok
- Tell the kernel to trust keys within the MOK list in the kernel keyring.
- --untrust-mok
- Tell the kernel not to trust MOK list keys in the kernel keyring.
Information & Help¶
- -h, --help
- Display a summary of usage, primary options, and supplementary options, and exit.
- -v, --version
- Display the program version and exit.
EXIT STATUS¶
- 0
- Success.
- 1
- EFI variables are not supported on the system. This status is also returned by --is-sb-enabled when Secure Boot is disabled or the platform is in Setup Mode, and by --test-key when the key is not enrolled in the target database.
- 255
- A command failed. For example, the system does not support Secure Boot, the given key file could not be read, or an EFI variable could not be read or written.
NOTES¶
mokutil uses two distinct passwords:
- MOK password
- Used to authorize key enrollment and deletion requests (--import, --delete, --reset, --password). The password is stored as a crypt(3) hash (MokPW). Allowed length: 1 to 256 characters.
- Secure Boot validation toggle password
- Used to authorize --disable-validation and
--enable-validation requests. The password is stored in plaintext
in NVRAM. MokManager will pick a few characters as the security prompt.
Allowed length: 8 to 16 characters.
Pending enrollment or deletion requests can only be handled on the next system reboot before any operating system is booted. The operator must have physical access to the system to complete the actions via MokManager.
| November 3, 2026 | 0.7.3 |