Hey everyone,
I am trying to write a program that will show me how many times users are SUing to root on my server. I would like to be able to parse /var/log/sulog which looks like this:
SU 02/08 16:44 + pts/0 brian-root
SU 02/09 09:02 + pts/0 ben-root
SU 02/11 20:59 - pts/1 ben-root
SU 02/11 20:59 + pts/1 ben-root
SU 02/15 14:21 - pts/0 ben-root
SU 02/15 14:21 + pts/0 ben-root
SU 02/16 10:00 + pts/0 ben-root
SU 02/16 10:05 - pts/1 ben-root
SU 02/16 10:06 + pts/1 ben-root
SU 02/18 16:30 - pts/0 ben-root
SU 02/18 16:30 - pts/0 ben-root
SU 02/18 16:30 + pts/0 ben-root
SU 02/21 13:54 - pts/0 ben-root
SU 02/21 13:54 + pts/0 ben-root
Can anyone tell me how I would make a program that would give statistics like
Ben: 12 logins
Brian: 1 Login
...
thanks for all your help,
Ben