lastlog: 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/lastlog - from package: shadow-utils

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

On Debian possible default full paths are:

/usr/bin/lastlog - from package: login

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