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
Macro For 2002 Word Insert Header in all documents in a folder
Windows file ID
restored old Exchange mailbox from tape, message body missing, but sender and subject show, BackupExec 12 on SBS 2003
Run VBA code for each record in a tabular Access form (Dynaset)
SQL Server 2000 Backup File Size is Excessive
SQL Server 2005 Logins Auditing
Exchange 2007 error when sending meeting request to specific user
missing asms file
Voltage Sensor [CPU VRM Voltage] detected a failure
File Replication Solution for an Offsite File Server