After you have created users accounts, and let those users loose on your somputer, there are different commands you can use to keep track of how they are using your computer. There are commands for checking such things as who is logged into your system and getting general information about the users with accounts on your system. Here are some of these commands.
last #list the most recent successful logins
root@ubuntu-box:~# last -a smbuser pts/2 Fri Sep 25 06:37 still logged in windows-box jorge pts/1 Fri Sep 25 06:35 still logged in windows-box jorge pts/1 Fri Sep 25 06:34 - 06:35 (00:00) windows-box wtmp begins Fri Sep 25 06:34:52 2009
lastb #List the most recent unsuccessful logins
root@ubuntu-vbox:~# lastb smbuser ssh:notty windows-box Fri Sep 25 05:36 - 05:36 (00:00) jorge :0 Fri Sep 18 17:28 - 17:28 (00:00) jorge :0 Fri Sep 18 17:28 - 17:28 (00:00) jorge :0 Fri Sep 18 17:27 - 17:27 (00:00) jorge :0 Fri Sep 18 17:27 - 17:27 (00:00) jorge :0 Fri Sep 18 17:27 - 17:27 (00:00)
who -u #List who is currently logged in (long form)
root@ubuntu-box:~# who -u jorge tty7 2009-09-25 06:11 old 2678 (:0) jorge pts/0 2009-09-25 06:12 00:36 2997 (:0.0) jorge pts/1 2009-09-25 06:35 . 4521 (windows-box)
users #list who is currently logged in (short form)
root@ubuntu-box:~# users jorge jorge jorge smbuser
With the “last” command, you can see when each user logged in (or opened a new shell) or for how long they were logged in, or a note that they are still (logged in). The “tty” lines means users working from virtual terminals on the console. The “pts” lines means a person opening a shell from a remote computer or the local X display :0.
here are other commands that can give you even more information about those users:
who am i #Your identity (user, tty, login date, location)
root@ubuntu-box:~# who am i jorge pts/1 2009-09-25 06:35 (windows-box)
finger -s #user information short
root@ubuntu-box:~# finger -s smbuser Login Name Tty Idle Login Time Office Office Phone smbuser pts/2 7 Sep 25 06:37 (windows-box)