This Email alert are working when some user are getting into server or which we called login to server using SSH connection, then admin will know through his or her email. Example i have user with name “amin”, then my server will tell me ( as admin ) through email that user “amin” has logged with IP and the time he / she get connect.
This is not important actuallly, because we ussualy find it on /var/log/auth.log who are get connected. But for the sake miserable log file ..^^..we could documented it through email.
So to the point is:
- Install mailx and mailutils program (linux ubuntu)
- You login as you auth ( “amin” as example ) .
- After you get to your¬¨‚Ć home (“/home/amin/” as exsample) please edit .bashrc file.
- Add this on the bottom line
“echo ‘ALERT – User Shell Access (YourserverName) on:’ `date` `who` | mail -s “Alert: User Access from `who | cut -d”(” -f2 | cut -d”)” -f1`” you@yourdomain.com (without *”* thing )
Change yourservername with yours name server and you@yourdomain to your email address. - Try to save and re login again
After this you will get warn about who are getting connected with your “username” from your email. For the warning text you could be creative i think… 😀
rudi
June 26, 2008ya baru lihat nih mas punya web jadi maklum aja ya yang lagi cari teman tuk tukar info……..tahngs! ::neutral:
zanoz
July 5, 2008min di kebahasa indonesiain donk ga ngerti bahasa inggris 🙁
Ahmad Aminudin
July 6, 2008hehehehhe dah terlanjur ane jadiin bahasa inggris. yang bahasa indonya saya lupa dimana:D
Sangbima
July 25, 2008Iya nih, kok pake bahasa Inggris? Daku kan gak ngerti.
Ahmad Aminudin
July 27, 2008ya maaf mas 😀 mumpung dikit yaudah deh aku jadiin bahasa inggris 😀 kalau mau versi B.Indonya kirim e-mail aja ya 😀