What should I do if I want to know the exact count of successful logins in the server
Взгляните наlast
(ниже из man last
моего выделения):
NAME last, lastb - show a listing of last logged in users SYNOPSIS last [options] [username...] [tty...] lastb [options] [username...] [tty...] DESCRIPTION last searches back through the /var/log/wtmp file (or the file desig‐ nated by the -f option) and displays a list of all users logged in (and out) since that file was created.
Команда last
(по крайней мере в Debian )по умолчанию показывает последние входы в систему для текущего месяца . Если вы хотите перехватить все логины, вы можете сделать что-то вроде:
for log in /var/log/wtmp*; do last -f "$log"; done
А затем проанализируйте вывод.