masktest: 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/masktest - from package: samba4-test

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

On Debian possible default full paths are:

/usr/bin/masktest - from package: samba-testsuite

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