gnome-name-service: 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/gnome-name-service - from package: gnome-libs

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