gdm: 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/sbin/gdm - from package: gdm

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