zsh-users
 help / color / mirror / code / Atom feed
From: "Andrej Borsenkow" <Andrej.Borsenkow@mow.siemens.ru>
To: "Vlad" <tmd@tmd.df.ru>, <zsh-users@sunsite.auc.dk>
Subject: RE: HOW do i..
Date: Wed, 27 Dec 2000 10:31:46 +0300	[thread overview]
Message-ID: <000001c06fd7$1134f930$21c9ca95@mow.siemens.ru> (raw)
In-Reply-To: <Pine.BSF.4.21.0012261832580.18605-100000@tmd.df.ru>

[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


       reply	other threads:[~2000-12-27  7:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <Pine.BSF.4.21.0012261832580.18605-100000@tmd.df.ru>
2000-12-27  7:31 ` Andrej Borsenkow [this message]
2000-12-27 16:01   ` Vlad
2000-12-27 16:08     ` Thomas Köhler
2000-12-28 11:27     ` Andrej Borsenkow
2000-12-27 22:32   ` Steve Reid

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='000001c06fd7$1134f930$21c9ca95@mow.siemens.ru' \
    --to=andrej.borsenkow@mow.siemens.ru \
    --cc=tmd@tmd.df.ru \
    --cc=zsh-users@sunsite.auc.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).