Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Security and Privacy
FedoraForum Search

Forgot Password? Join Us!

Security and Privacy Sadly, malware, spyware, hackers and privacy threats abound in today's world. Let's be paranoid and secure our penguins, and slam the doors on privacy exploits.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 6th February 2009, 05:03 PM
newhelpeeps Offline
Registered User
 
Join Date: Jan 2009
Posts: 34
Nice script to email you when someone logs in

I found this script the other day, unfortunately I am not sure who the original author was to give credit, but it emails (obviously you want it to go to remote mailserver not on the same machine) you whenever someone logs in. I put this in .bashrc so that anytime someone logs in as me or superuser I get an email. Here's the script as I found it:

echo 'ALERT - Shell Access on:' `date` `who` | mail -s "Alert: (whatever shell name) Account Access from `who | awk '{print
$6}'`" PutYourEmail@ADDRESShere

Note: If you run SECTOOL it will generate a response from path and alias which will be emailed to you.

Last edited by newhelpeeps; 8th February 2009 at 07:15 AM.
Reply With Quote
  #2  
Old 6th February 2009, 05:13 PM
shipshape Offline
Registered User
 
Join Date: Jan 2009
Posts: 40
Is there a way to add further information to be included in email. Like user IP address.

Fedora

Last edited by shipshape; 13th February 2009 at 02:47 PM.
Reply With Quote
  #3  
Old 6th February 2009, 05:25 PM
Knudsen's Avatar
Knudsen Offline
Registered User
 
Join Date: May 2005
Posts: 7
I like that. No one should be logging on my Linuix boxes but me, and I do need to place them in harms way from time to time. Thanks for posting the juicy tidbit.
Reply With Quote
Reply

Tags
email, logs, nice, script

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Can someone provide me a nice iptables script? boy.pt Servers & Networking 2 1st March 2008 03:43 AM
Syslog-Ng How to Email Logs Eduardain Servers & Networking 0 25th October 2006 06:27 PM
Email gathering script mh10190 Programming & Packaging 2 14th March 2006 12:44 PM
email script ieuuk Using Fedora 1 20th June 2005 01:42 AM


Current GMT-time: 04:51 (Thursday, 20-06-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat