Evening Jamshed,
How about .bash_logout if the root's login
shell
<snip> .bash_logout is for bash shell. .login is for csh & tcsh shell.
So over all this is dependent on shell based.
I need to run a script everytime there is a
SSH logout of user
<snip> If u write a daemon for monitoring /var/log/secure and utmp source. U can have ssh proper trace.
Problem which can arise from these, sometime source data get damage, which gives wrong info for the other command / services. check redhat bugzilla for further details.
I just showed an example. You can just replace that `w | mail... ` part with your script may be followed by & also to put that in background.
<snip> I read ur script. but assume ssh gets uninterruptible sleep (usually IO) or into defunct ("zombie") process.
Infact source for system utility like top uses utmp data and secure is the log stamping file for sshd service.
Regards, Animesh.
__________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com