Wednesday, April 20, 2011

Terminal input output logger / Teminal recording

Logging terminal input and output

After a lot of googling I found a tool that can log all input and output of terminal in Unix system

The tool is rootsh and its not only used for logging but also used for root login for normal users using sudo.

So that the command entered by the user will be logged in a file as well as on syslog

We can make rootsh as a shell , So that all the activity by that particular user will be logged

The tool is released under GNU Open source license

You can download the tool from

I made a modified copy of mine on

The tool will log username,commands and its output in a file -- But no client IP
The command can be started as a shell -But it will take the default shell

I made some modification on this and it's working perfectly on my Linux machine
The link here

The extra modules I added are here
username.c --->This will challenge the user to enter actual name of user and
purpose of login

readconf.c ----->This will read configuration file /etc/rootsh.conf
format of the file will be


do not add space on end of the line (need some code changes)

Keep an eye on here ..more to come like remote logging with TLS security on a separate file for a separate action


  1. I have a code which is user interactive, so i need to log just the input only so that i can create input file to the code later..


    1. Hi,
      You meant to say , you already have code that will record only input of user ?
      Would you like to share it ?
      you already incorporated in "rootsh" source code ?


LVM thin provisioning - file system usage and pool usage dosn't match

When I was demonstrating LVM thin provisioning to new batch of campus hires ; they pointed out an important mismatch between thin pool usag...