From: urgrue Subject: Re: Starting "Script" when user logs on. Date: Wed, 03 Aug 2005 12:48:01 +0000 Message-ID: <1123073281l.23049l.0l@hyttynen> References: Mime-Version: 1.0 Content-Transfer-Encoding: 8BIT Return-path: In-Reply-To: (from shanto76@gmail.com on Wed Aug 3 13:38:10 2005) Content-Disposition: inline Sender: linux-admin-owner@vger.kernel.org List-Id: Content-Type: text/plain; charset="us-ascii"; delsp="Yes"; format="Flowed" To: Md Shanto Cc: linux-admin@vger.kernel.org I don't think script will help you, as even if you get it working, your users can just Ctrl-D out of it. Unless you trust your users. Once upon a time I used ttysnoop: http://freshmeat.net/projects/ttysnoop/ On 08/03/2005 01:38:10 PM, Md Shanto wrote: > Hi all, > > I am trying to force "script" for logging all text I/O activities at > the moment user logs in. Most of the users are running bash at this > moment. > > Initially I tired with "ttyrec" a tty recorder and failed, as it says > "Out of pty's - Terminated". Now, I tried something like below: > > ------------------ > #!/bin/bash -l > USER=`whoami` > LOGTIME=`date +%Y-%m-%d-%H:%M:%S` > /usr/bin/script -q /var/log/commlog/$USER-$LOGTIME > ------------------ > > and assigning this script in /etc/passws. This script will log > scripts > with time stamp in /var/log/commlog/. > > what happen is: when user logs in the process becomes a loop and I > see > lot of script instances are running. > > Any idea. > > -Refayet > - > To unsubscribe from this list: send the line "unsubscribe linux- > admin" > in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >