pam_tally2: 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:

/sbin/pam_tally2 - from package: pam

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

On Debian possible default full paths are:

/sbin/pam_tally2 - from package: libpam-modules-bin

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