Linux: View what users are / were logged on a system
Posted in Linux
There are several simple commands to show what users are logged a Linux systems. | ![]() |
The following commands are standard in all distributions (as of date)
w
who
who –a
who and users show who are currently logged on. You can also use last:
last
Another possibility is to get the users-information from the systems logs:
grep sshd /var/log/messages
grep-out Failed login attempts
grep sshd /var/log/messages | grep -i "Failed" | awk ‘{print $NF}’ | sort|uniq -c|sort -n
see access thru httpd
cat /var/log/httpd/access_log