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:

  1. Install mailx and mailutils program (linux ubuntu)
  2. You login as you auth ( “amin” as example ) .
  3. After you get to your¬¨‚Ć home (“/home/amin/” as exsample) please edit .bashrc file.
  4. 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.
  5. 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… 😀

Author

Ahmad Aminudin

nama gw ahmad aminudin, biasa di panggil amin, sedangkan kalau di dunia maya di kenal sebagai turbin_ti . lahir di rangkasbitung, 03-09-1989. menyelesaikan pendidikan dasar di SDN Margamulya 1, Menamatkan sekolah menengah di SMPN 1 Menes, sekarang sedang menjalani pendidikan di SMKN 1 Rangkasbitung mengambil bidang keahlian TKJ (Teknik Komputer dan Jaringan). Berpengalaman sebagai webmaster di web komunitas belajar tentang Teknologi Informasi di http://infoteknologi.com. sangat menyukai semua hal yang berhubungan dengan Web Disain, Disain Grafis, Linux Administrator.

Comments (5)

  1. rudi
    June 26, 2008

    ya baru lihat nih mas punya web jadi maklum aja ya yang lagi cari teman tuk tukar info……..tahngs! ::neutral:

  2. zanoz
    July 5, 2008

    min di kebahasa indonesiain donk ga ngerti bahasa inggris 🙁

  3. Ahmad Aminudin
    July 6, 2008

    hehehehhe dah terlanjur ane jadiin bahasa inggris. yang bahasa indonya saya lupa dimana:D

  4. Sangbima
    July 25, 2008

    Iya nih, kok pake bahasa Inggris? Daku kan gak ngerti.

  5. Ahmad Aminudin
    July 27, 2008

    ya maaf mas 😀 mumpung dikit yaudah deh aku jadiin bahasa inggris 😀 kalau mau versi B.Indonya kirim e-mail aja ya 😀

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.