LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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, 07: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, 08: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, 08:49 AM   #3
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,112

Rep: Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837Reputation: 7837
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 08: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 03:38 AM
How to autostart some script after launching an X Session? dreamtheater Linux - Software 2 10-13-2006 09:51 AM
how to have bash script check whether it's a x session? bkeeper Linux - Newbie 9 02-21-2006 06:31 AM
Cannot find or run the base session script buldir Fedora 1 06-04-2004 08:14 PM
How to create a session script? Dopeskills Mandriva 0 04-20-2004 08:25 PM

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

All times are GMT -5. The time now is 08:39 PM.

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
Open Source Consulting | Domain Registration