troubleshooting Question

'script' session logging in Linux, have to exit twice, need to exit once

Avatar of goede
goedeFlag for United States of America asked on
LinuxShell Scripting
2 Comments1 Solution641 ViewsLast Modified:
I am using "script" to capture sessions on my Linux hosts.  I added the following lines to /etc/profile and it works fine, but when the user types <exit>, it only stops the script session, and they are still logged in and essentially can do anything without session logging.   I need to figure out how to end the script session and kill their ssh session at the same time.
dte=`date +%Y_%m_%d_%H_%M`
script -q  /var/log/telnet/$dte-syslog01.$USER
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 2 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 2 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros