From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29390 invoked from network); 27 Dec 2000 07:32:10 -0000 Received: from sunsite.dk (HELO sunsite.auc.dk) (130.225.51.30) by ns1.primenet.com.au with SMTP; 27 Dec 2000 07:32:10 -0000 Received: (qmail 18399 invoked by alias); 27 Dec 2000 07:31:52 -0000 Mailing-List: contact zsh-users-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 3576 Received: (qmail 18392 invoked from network); 27 Dec 2000 07:31:51 -0000 X-Envelope-Sender-Is: Andrej.Borsenkow@mow.siemens.ru (at relayer david.siemens.de) From: "Andrej Borsenkow" To: "Vlad" , Subject: RE: HOW do i.. Date: Wed, 27 Dec 2000 10:31:46 +0300 Message-ID: <000001c06fd7$1134f930$21c9ca95@mow.siemens.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2911.0) In-Reply-To: Importance: Normal X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 [moved to zsh-users] > > ..do the following: > > 1. i want root to be the owner of users's history file. > 2. everytime the user exits the system, i want his history file to be > mailed to whatever e-mail address specified. how do i execute a command > upon exiting? i always use TRAPEXIT, however, i can't make zsh to > read/write with root permissions. > I suspect, you want - get log of all user activity - prevent user from modifying this log This can't be done, sorry. To save history entries in a file, this file should be user-writable. It does not matter, whom this file belongs to. History file is written (if at all) after every command. It means, user can edit it at any time and remove any entries. This applies to any logging. The most you can do is to use fc command to write *current* entries (up to HISTSIZE) to some file at logout. But, how can you prevent user from modifying .logout, TRAPEXIT ot whatever? -andrej