tpmtoken_setpasswd command not found

In this troubleshooting guide we learn how to fix tpmtoken_setpasswd command not found error message

Introduction

When you run more command in linux terminal / console, you get the following error message

tpmtoken_setpasswd: command not found

or when using sudo you get the following error message

sudo: tpmtoken_setpasswd: command not found

Solutions to tpmtoken_setpasswd: command not found

How To Fix tpmtoken_setpasswd: command not found in Ubuntu / Debian / Kali Linux / Raspbian

In Ubuntu tpmtoken_setpasswd is provided by tpm-tools-pkcs11 package.

tpm-tools-pkcs11 is:

tpm-tools is a group of tools to manage and utilize the Trusted Computing Group’s TPM hardware. TPM hardware can create, store and use RSA keys securely (without ever being exposed in memory), verify a platform’s software state using cryptographic hashes and more.

This package contains commands to utilize some of the capabilities available in the TPM PKCS#11 interface implemented in the openCryptoki project.

To fix this problem, we can install more using the command below.

sudo apt-get -y install tpm-tools-pkcs11

This command might take some time to finish depending on your machine internet connection.

You can also use apt command to install tpm-tools-pkcs11.

sudo apt -y install tpm-tools-pkcs11

Or if you have aptitude installed you can use the following command.

sudo aptitude install tpm-tools-pkcs11

Summary

In this tutorial we learn how to fix tpmtoken_setpasswd command not found error in Ubuntu / Debian / Kali Linux or Raspbian distribution.