Microsoft
Software
Hardware
Network
Question : 'script' session logging in Linux, have to exit twice, need to exit once
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
, 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.
Code Snippet:
1: 2: 3:
dte=`date +%Y_%m_%d_%H_%M` script -q /var/log/telnet/$dte-syslog01.$USER
Open in New Window
Select All
Answer : 'script' session logging in Linux, have to exit twice, need to exit once
You could do
script -q /var/log/telnet/$dte-syslo
g01.$USER && exit
Random Solutions
How can i change my Send from Address in Outlook ?
Encryption\Decryption in SQL SERVER 2005
How to convert string field to datetime in Reporting Services?
Date functions - this week and this month
NDR 550 5.1.4 in Exchange 2007
Problems loading Acer drivers
HELP! Cannot mount mail store after rebuild Exchange 2000 Server
Network home directory fail over
SQL Reporting Services - Runningvalue function in a graph
Windows TServer 2003 Logoff process