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

http://sourceforge.net/projects/rootsh/

I made a modified copy of mine on
https://sites.google.com/site/ansilh/rootsh

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

https://sites.google.com/site/ansilh/rootsh/rootsh-1.5.3-final.tar.gz

The extra modules I added are here
username.c --->This will challenge the user to enter actual name of user and
purpose of login
https://sites.google.com/site/ansilh/rootsh/username.c

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

:
e.g
ansil:/bin/bash

do not add space on end of the line (need some code changes)
https://sites.google.com/site/ansilh/rootsh/readconf.c

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

2 comments:

  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..

    thanks

    ReplyDelete
    Replies
    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 ?

      Delete

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...