MOKUTIL(1)

πŸ“¦
version 0.7.2 Β· 4 versions
, in alpine 3.24, arch rolling, debian trixie, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable, opensuse-leap 16.0, ubuntu questing, ubuntu resolute, ubuntu stonking

πŸ’– mokutil πŸ’–

okay bestie, meet mokutil 🧚 It's the General Commands Manual tool for manipulating machine owner keys, aka MOKs. πŸŽ€

✨ NAME ✨

mokutil β€” utility to manipulate machine owner keys πŸ”‘

🌸 SYNOPSIS 🌸

mokutil [--list-enrolled | -l]
        ([--mokx | -X])
mokutil [--list-new | -N]
        ([--mokx | -X])
mokutil [--list-delete | -D]
        ([--mokx | -X])
mokutil [--import keylist| -i keylist]
        ([--hash-file hashfile | -f hashfile] | [--root-pw | -P] |
         [--mokx | -X] | [--ca-check] | [--ignore-keyring])
mokutil [--delete keylist | -d keylist]
        ([--hash-file hashfile | -f hashfile] | [--root-pw | -P] |
         [--mokx |- X])
mokutil [--revoke-import]
        ([--mokx | -X])
mokutil [--revoke-delete]
        ([--mokx | -X])
mokutil [--export | -x]
mokutil [--password | -p]
        ([--hash-file hashfile | -f hashfile] | [--root-pw | -P])
mokutil [--clear-password | -c]
mokutil [--disable-validation]
mokutil [--enable-validation]
mokutil [--sb-state]
mokutil [--test-key keyfile | -t keyfile]
        ([--mokx | -X] | [--ca-check] | [--ignore-keyring])
mokutil [--reset]
        ([--hash-file hashfile | -f hashfile] | [--root-pw | -P] |
         [--mok | -X])
mokutil [--generate-hash=password | -gpassword]
mokutil [--ignore-db]
mokutil [--use-db]
mokutil [--import-hash hash]
        ([--hash-file hashfile | -f hashfile] | [--root-pw | -P] |
         [--mokx | -X])
mokutil [--delete-hash hash]
        ([--hash-file hashfile | -f hashfile] | [--root-pw | -P] |
         [--mokx | -X])
mokutil [--set-verbosity (true | false)]
mokutil [--set-fallback-verbosity (true | false)]
mokutil [--set-fallback-noreboot (true | false)]
mokutil [--pk]
mokutil [--kek]
mokutil [--db]
mokutil [--dbx]
mokutil [--list-sbat-revocations]
mokutil [--set-sbat-policy (latest | automatic | delete)]
mokutil [--timeout -1,0..0x7fff]
mokutil [--trust-mok]
mokutil [--untrust-mok]

πŸ¦‹ DESCRIPTION πŸ¦‹

So basically, mokutil is the tool you use to import or delete the machine owner keys (MOK) stored in the database of shim. It's giving key management energy. πŸ”‘βœ¨

πŸ’… OPTIONS πŸ’…

  • -l, --list-enrolled β€” show the keys that are already stored in the database πŸ“œ
  • -N, --list-new β€” list the keys that are waiting to be enrolled 🌱
  • -D, --list-delete β€” list the keys that are set to be deleted πŸ—‘οΈ
  • -i, --import β€” grab the files you list and build an enrolling request for shim. The files have to be in DER format, no exceptions πŸ“‚
  • -d, --delete β€” grab the files you list and build a deleting request for shim. These also have to be in DER format πŸ™…β€β™€οΈ
  • --revoke-import β€” cancel the current import request (MokNew) πŸ™ˆ
  • --revoke-delete β€” cancel the current delete request (MokDel) πŸ™ˆ
  • -x, --export β€” export the keys stored in MokListRT πŸ“€
  • -p, --password β€” set up the password for MokManager (MokPW) πŸ”
  • -c, --clear-password β€” clear the password for MokManager (MokPW) 🧹
  • --disable-validation β€” disable the validation process in shim πŸ™…β€β™€οΈ
  • --enable-validation β€” enable the validation process in shim βœ…
  • --sb-state β€” show the SecureBoot state πŸ‘€
  • -t, --test-key β€” check whether the key is enrolled or not πŸ”
  • --reset β€” reset the MOK list πŸ’«
  • --generate-hash β€” generate the password hash πŸ§‚
  • --hash-file β€” use the password hash from a specific file πŸ“
  • -P, --root-pw β€” use the root password hash from /etc/shadow πŸ‘‘
  • --ignore-db β€” tell shim to not use the keys in db to verify EFI images πŸ™ƒ
  • --use-db β€” tell shim to use the keys in db to verify EFI images (this is the default, bestie) πŸ’œ
  • -X, --mokx β€” work with the MOK blacklist (MOKX) instead of the MOK list 🚫
  • --import-hash β€” create an enrolling request for the hash of a key in DER format. Heads up, this is NOT the password hash! πŸ™…β€β™€οΈ
  • --delete-hash β€” create a deleting request for the hash of a key in DER format. Again, this is NOT the password hash! πŸ™…β€β™€οΈ
  • --set-verbosity β€” set the SHIM_VERBOSE so shim can be more or less chatty πŸ—£οΈ
  • --set-fallback-verbosity β€” set the FALLBACK_VERBOSE so fallback can be more or less chatty πŸ—£οΈ
  • --set-fallback-noreboot β€” set the FB_NO_REBOOT so fallback doesn't automatically reboot the system πŸ›‘
  • --pk β€” list the keys in the public Platform Key (PK) 🏰
  • --kek β€” list the keys in the Key Exchange Key Signature database (KEK) πŸ—οΈ
  • --db β€” list the keys in the secure boot signature store (db) ✍️
  • --dbx β€” list the keys in the secure boot blacklist signature store (dbx) 🚷
  • --list-sbat-revocations β€” list the entries in the Secure Boot Advanced Targeting store (SBAT) 🎯
  • --set-sbat-policy (latest | automatic) β€” set the SbatPolicy UEFI Variable so shim applies either the latest or the automatic SBAT revocations. If UEFI Secure Boot is disabled, shim will automatically delete the SBAT revocations 🧹
  • --set-ssp-policy (latest | automatic | delete) β€” set the SspPolicy UEFI Variable so shim applies either the latest or the automatic Windows SkuSiPolicy to manage bootmgr revocations. These are non-native revocations, so shim won't automatically delete them. If you need them gone, spp-policy can be set to delete when Secure Boot is disabled. The delete policy is non-persistent, so keep that in mind 🫢
  • --timeout β€” set the timeout for the MOK prompt ⏰
  • --ca-check β€” check whether the CA of the given key is already enrolled or blocked in the key databases πŸ•΅οΈβ€β™€οΈ
  • --ignore-keyring β€” skip the kernel builtin trusted keys keyring check when enrolling a key into MokList πŸ™ˆ
  • --trust-mok β€” trust MOK keys within the kernel keyring πŸ’–
  • --untrust-mok β€” don't trust MOK keys within the kernel keyring πŸ₯€

That's the whole manual, bestie! πŸŒˆπŸ’– Go be a main character with your keys. πŸ’…βœ¨