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


--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to