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

Re: email notifications when users login



Morgan Walker wrote:
Hey guys,

Hi,

I was just wondering if there was a package/script out there that could be used to notify the sys. admin every time a user logged into a debian system.

A very simple script to notify me when users log on:

$ cat /etc/ssh/sshrc
#!/bin/bash

IFS="
"
nail -s "Login to <put Servername here> by $USER" root < .
$


where 'root' is the user this Mail is being mailed to. Nail is a mailer like mail and expects a dot to commit EOM.

This also works even when the user has another shell, e.g. scponly.


Ciao!
Marco



Reply to: