Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
RE: HOW do i..
- X-seq: zsh-users 3576
- From: "Andrej Borsenkow" <Andrej.Borsenkow@xxxxxxxxxxxxxx>
- To: "Vlad" <tmd@xxxxxxxxx>, <zsh-users@xxxxxxxxxxxxxx>
- Subject: RE: HOW do i..
- Date: Wed, 27 Dec 2000 10:31:46 +0300
- Importance: Normal
- In-reply-to: <Pine.BSF.4.21.0012261832580.18605-100000@xxxxxxxxx>
- Mailing-list: contact zsh-users-help@xxxxxxxxxxxxxx; run by ezmlm
[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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author