LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   Need Track if any user close the windows of shell prompt (https://www.linuxquestions.org/questions/linux-server-73/need-track-if-any-user-close-the-windows-of-shell-prompt-870221/)

sahworld 03-22-2011 09:01 AM

Need Track if any user close the windows of shell prompt
 
I have implemented a Central authentication and tracking system for managing login & track record of different systems.
I have one central authentication system running Centos 5.3, and have many systems running AIX5.3, AIX 5.2, AIX 6.1, RHEL 5.0, SOLARIS 10 and etc using ssh service (central server & different systems handshaking mechanism is “ssh without password”) where many people’s can login by central server using specific user ID of central server.
When any guys login into the central system by specific user id like “ahsan1919” then he will get a Menu (Prepared by Unix-Script) where put different systems Login ID with IP, just type 1a or 2a then automatically login into that server (like AIX 5.3) and then he worked many jobs and then exit from the server, that’s fine and working. My central system can track login & logout time in Central server (prepared by unix-script)
But when any guys login into any server through central server, and work many tasks and then closes the window (not type exit or logout command) or any application running on his shell, at this moments he close the window, then I didn’t get any log information.
So I need help.
Actually When any guys close the window then my central server not getting any information like login_logout_history information.
I attached sample snapsheets… Please anybody help me…
Menu example
1. FINACLE: CSIS (10.20.2.21
2. 1a. root
Unix Script sample
echo "$USER has logged-in into $CSISDR as oracle on `date`" >> $HOME/$USER.log
ssh oracle@drcsis
ssh oracle@drcsis "cat ~/.history/.sh_hist" > $HOME/.temp.log
sed '1,146d' $HOME/.temp.log >> $HOME/$USER.log
echo "$USER has logged-out into $CSISDR as oracle on `date`" >> $HOME/$USER.log

Please anybody help me…

smoker 03-22-2011 01:06 PM

You need to have the central server polling the output of
Code:

who
on each remote server. You can see who is connected remotely and keep a track of who's missing. That means keeping a central log of who went where - when, of course.

Alternatively, you could have the remote machines tell you when people log out. Write a script that mails the central server with the relevant details, and gets run automatically on the remote machine when the user closes their login shell.

Read through this thread.


All times are GMT -5. The time now is 01:22 AM.