*nix Thread, tracking logins and logouts in Technical; Is it possible in U9.10, to send an email to root everytime a user logs in and logs out?...
20th February 2010, 04:41 PM #1
tracking logins and logouts
Is it possible in U9.10, to send an email to root everytime a user logs in and logs out?
20th February 2010, 05:41 PM #2
- Rep Power
Few thoughts come to mind...
I'm afraid I'm not too familiar with Ubuntu, but if you're logging in via SSH you could probably pop something in the /etc/ssh/sshrc file to email you each time at least for login (pipe some text through mail or write a small script in your favorite language).
Otherwise monitoring whatever log file is generated on login (and logout?) would be an option (the log on FreeBSD is /var/log/auth.log, not sure for Ubuntu). You could have a cron job keeping an eye on it.
Another option might be global shell rc scripts... I think there are user .bash_logout and .logout scripts that run on logout, I expect there are global versions of these... have a look at the man pages for the shells.
Thanks to Chillibear from:
Gatt (20th February 2010)
20th February 2010, 07:09 PM #3
Cheers will look at sshrc and auth.log
Its only myself that logs into the server, but jsut found all our website files gzipped - so wondering if its a faulty script (though they have been running fine all week!) or if someone is getting in!
By kaphc in forum East Midlands Broadband Consortium (EMBC)
Last Post: 13th January 2010, 12:09 PM
By dyoung5 in forum MIS Systems
Last Post: 20th May 2009, 12:20 PM
By Jiser in forum Windows
Last Post: 15th October 2008, 11:53 AM
By FAA in forum Windows Vista
Last Post: 8th September 2008, 10:48 AM
By Nij.UK in forum Windows
Last Post: 28th September 2006, 07:39 PM
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)