logname: 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/logname - from package: coreutils

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

On Debian possible default full paths are:

/usr/bin/logname - from package: coreutils

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