LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2009, 08:08 AM   #1
nagavinodh
Member
 
Registered: Aug 2009
Posts: 118

Rep: Reputation: 15
script at each session


hi,
whenever the user login into shell through terminal.i would like to monitor their activity by script command and save the file into /tmp directory.
and also when they leave from the session automatically send to my mail id.
is it possible?
 
Old 12-01-2009, 09:41 AM   #2
indiajoe
Member
 
Registered: Jan 2009
Location: India
Distribution: Porteus atma
Posts: 84

Rep: Reputation: 21
Do you need only the commands they typed?
If so -> it is as simple as copying out their .bash_history file at each exit from the terminal. You can do that from .bash_logout.
You can even put the mail command also in their .bash_logout file which is executed each time they exit terminal.
-Cheers
indiajoe
 
Old 12-01-2009, 09:49 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 19,322

Rep: Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470Reputation: 4470
Quote:
Originally Posted by nagavinodh View Post
hi,
whenever the user login into shell through terminal.i would like to monitor their activity by script command and save the file into /tmp directory.
and also when they leave from the session automatically send to my mail id.
is it possible?
Yep, it's STILL possible....the same way it was the last time you asked this question, and got answers. Please look at any of your previous threads, where you ask questions very much like this one...there are answers in them.

Last edited by TB0ne; 12-01-2009 at 09:51 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ssh session within a bash script Tamaros Programming 1 05-11-2008 04:38 AM
How to autostart some script after launching an X Session? dreamtheater Linux - Software 2 10-13-2006 10:51 AM
how to have bash script check whether it's a x session? bkeeper Linux - Newbie 9 02-21-2006 07:31 AM
Cannot find or run the base session script buldir Fedora 1 06-04-2004 09:14 PM
How to create a session script? Dopeskills Mandriva 0 04-20-2004 09:25 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration