ldapwhoami: 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/ldapwhoami - from package: openldap-clients

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

On Debian possible default full paths are:

/usr/bin/ldapwhoami - from package: ldap-utils

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