I'm tryig to display all successful logins in to server last 24 hours from /var/log/secure
file
The task is Display information from the log, who was authorized(logged) on the server in the last 24 hours?
Any possible ways to it?
command last not acceptable
/var/log/secure --output
Sep 23 11:11:02 vm_0 sshd[2351152]: Received disconnect from 134.209.149.246 port 59164:11: Bye Bye [preauth]
Sep 23 11:11:02 vm_0 sshd[2351152]: Disconnected from invalid user deployer 134.209.149.246 port 59164 [preauth]
Sep 23 11:11:03 vm_0 sshd[2351174]: Failed password for invalid user oms from 65.190.102.226 port 37166 ssh2
Sep 23 11:11:03 vm_0 sshd[2351174]: Received disconnect from 65.190.102.226 port 37166:11: Bye Bye [preauth]
Sep 23 11:11:03 vm_0 sshd[2351174]: Disconnected from invalid user oms 65.190.102.226 port 37166 [preauth]
Sep 23 11:11:18 vm_0 sudo[2351291]: student : TTY=pts/0 ; PWD=/home/student ; USER=root ; COMMAND=/bin/cat /var/log/secure
Sep 23 11:11:18 vm_0 sudo[2351291]: pam_systemd(sudo:session): Cannot create session: Already running in a session or user slice
Sep 23 11:11:18 vm_0 sudo[2351291]: pam_unix(sudo:session): session opened for user root by student(uid=0)
Sep 23 11:11:19 vm_0 sshd[2351283]: Invalid user dh from 45.181.32.43 port 57754
Sep 23 11:11:19 vm_0 sshd[2351283]: pam_unix(sshd:auth): check pass; user unknown