mkpasswd: command not found

Have You tried accessing the binary with the full path?

Maybe Your $PATH variable doesn't contain the default paths? echo $PATH should give something like:

[root@server ~]# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin

If it's empty, You may set the PATH variable with this command

export PATH="/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/root/bin"

On CentOS possible default full paths are:

/usr/bin/mkpasswd - from package: expect

You may install the required package with command yum install {package}

On Debian possible default full paths are:

/usr/bin/mkpasswd - from package: whois

You may install the required package with command apt-get install {package}
Error in other languages:
mkpasswd: bevel nie gevind nie
mkpasswd: comandă negăsită
mkpasswd: comando não encontrado
mkpasswd: commande introuvable
mkpasswd: command not found
mkpasswd: käsku ei ole
mkpasswd: không tìm thấy lệnh
mkpasswd: komanda nerasta
mkpasswd: Kommando nicht gefunden.
mkpasswd: kommandot finns inte
mkpasswd: komut yok
mkpasswd: nie znaleziono polecenia
mkpasswd: níor aimsíodh an t-ordú
mkpasswd: no se encontró la orden
mkpasswd: no s'ha trobat l'ordre
mkpasswd: opdracht niet gevonden
mkpasswd: parancs nem található
mkpasswd: perintah tidak ditemukan
mkpasswd: príkaz nenájdený
mkpasswd: příkaz nenalezen
mkpasswd: команда не найдена
mkpasswd: командата не е открита
mkpasswd: 命令找不到
mkpasswd: コマンドが見つかりません