ypchfn: 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/ypchfn - from package: yp-tools

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

On Debian possible default full paths are:

/usr/bin/ypchfn - from package: nis

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