I know the
who command showing me all logged in users. But I want to somehow informed when someone but me loggs into my system. Any applet? Would also be nice if the applet shows the number of distinct users logged in, meaning having a login shell and established ssh connection.
I know the
For the part of notification when someone loggs in your system, you could try to put a little script in a
/etc/profile.d script. Using notify-send (part of the libnotify-bin package) you could try this :
notify-send -t 3000 "User logged in" `whoami`
and then, every time someone will log in your system you will be notified.
So, it doesn't work well :(
If you configured a mail server on your machine, you can use the mail command instead of
We do it by creating a file
/etc/profile.d/notify.sh with the following content:
#!/bin/sh sender="email@example.com" recepient="firstname.lastname@example.org" subject="Privileged Account logon used" message="`env`" echo "$message" | mail -s "$subject" -r "$sender" -Smtp=mail.example.com "$recepient"
Assuming mailx is installed.