Starting "Script" when user logs on.

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-newbie" in
the body of a message to majordomo [at] vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.linux-learn.org/faqs
Md Shanto [ Mi, 03 August 2005 12:34 ] [ ID #905944 ]
Linux » gmane.linux.newbie » Starting "Script" when user logs on.

Vorheriges Thema: Running script on 2.6 fails
Nächstes Thema: Re: Unable to mount the SD card formatted using the DIGITAL CAMREAon Linux box