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

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

On Debian possible default full paths are:

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

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