nisdomainname: 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:

/bin/nisdomainname - from package: net-tools

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

On Debian possible default full paths are:

/bin/nisdomainname - from package: hostname

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