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
Out of resources error when moving lots of files
Excel VBA Sum Contiguous Cells
Best method to import XML to a SQL DB - XML contains schema and data mixed
Users and groups in Windows XP Pro
Cannot enable "Server Certificate" under Secure Communications in IIS 5.0
Creating a Distribution List from Shared Contacts
TRANSPARENT BACKGROUND color at RMagick does not work properly
Link a Query to a From
DateDiff Minute GetDate Between C# vs SQL
need a step by step on how to setup Reverse DNS for Exchange mail server.