Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: tlug: monitoring user logins



>>>>> "Jim" == Jim Schweizer <schweiz@example.com> writes:

Jim> Hi all, Here's a newbie sysadmin question for you:

Jim> What's the best method of monitoring logins on a system?

Jim> tail -f /var/log/messages

Jim> takes over the terminal. Is there some way to be notified of a
Jim> login (ie a program that will write to the terminal and exit when
Jim> a login happens?)

zsh users can put the following into one of the profiles of zsh:

LOGCHECK=10            # seconds between checks for login/logout activity
WATCH=notme            # "all": all login/logout, "notme": except $USERNAME

(I have it in .zshenv). When a login happens you will see messages like

    mike@example.com ~$ 
    mfa has logged on p7 from laputa.
    mike@example.com ~$ 
    mfa has logged off p7 from laputa.
    mike@example.com ~$ 

the next time you hit the return key in your zsh.

Mike
-------------------------------------------------------------------
Next Technical Meeting: February 13 (Sat), 12:30 place: Temple Univ.
** presentation: XEmacs, by Steven Baur and Martin Buchholz
Next Nomikai: March 19 (Fri), 19:30   Tengu TokyoEkiMae 03-3275-3691
-------------------------------------------------------------------
more info: http://tlug.linux.or.jp                     Sponsor: PHT


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links