How to record all terminal sessions' activities into a file?

Hi All,

FreeBSD 9.1-RELEASE

We have ttyrec files available which records all user sessions and those can be viewed with ttyplay.
We need to have similar kind of terminal session recording in .txt or .log format to work on it daily for searching, monitoring etc.
It should run automatically for any terminal session as ttyrec does.
The "script" command doesnt do that as it is specific to the user logged in and it is activated by the user.

Is there any way to do that?
Additionaly I dont think the ttyrec files can be converted into .txt or .log format. If it was available, that would work too.

Thanks,
 
FreeBSD 9.1 has been EOL for years and is no longer supported. So to start you should really upgrade to a supported version, either 11.2 or 12.0 (though I wouldn't recommend 12 for production just yet because it just got out).
 
Just add the script on /etc/profile file. It will automatically start recording user terminal sessions activity whenever user logged in.
This only works if the user has a Bourne shell, /etc/profile isn't used with the C Shells.
 
This only works if the user has a Bourne shell, /etc/profile isn't used with the C Shells.
I didn’t realise. Thanks for clarification. Nevertheless it’s a starting point for the OP and eventually others how to implement such a function. Adapting the syntax to the C Shells [edit] and putting it in the appropiate system wide configuration file [/edit] shouldn't be a problem, not that I can do it without instructing myself into the subject.
 
Back
Top