Doesn't seem to work with multiple users logged in on the same machine. I might have to try seeing who did the most recent command (besides nobody or (unknown)) instead of just the first name.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Now it uses output from the who command. Haven't tested with two users logged in on the same machine.
Doesn't seem to work with multiple users logged in on the same machine. I might have to try seeing who did the most recent command (besides nobody or (unknown)) instead of just the first name.