testparm: 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/testparm - from package: samba4-common
/usr/bin/testparm - from package: samba-common

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

On Debian possible default full paths are:

/usr/bin/testparm - from package: samba-common-bin

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