Usenet comp.unix.tru64 (2000-2013)
 help / color / mirror / Atom feed
From: Martyn <mpattKNICKERS@bigfoot.com>
Subject: Re: History of commands in shells
Date: Tue, 29 Jan 2002 09:57:44 +0000	[thread overview]
Message-ID: <3C567218.8070006@bigfoot.com> (raw)
In-Reply-To: a354vj$3eq$1@news.hk.linkage.net

Matthieu wrote:

>Hello,
>
>In my company we use Alpha stations running on Tru64.
>
>Some files were delete without any authorisation, and I would like to know
>how can I investigate when and who has send the commands?
>
>Also I know the "at" command how can I be sure there is not an "at
>xx-xx-2005 rm *" hidden in my machine ?
>
>Thanks a lot, and sorry for such stupid questions!!!
>
>Matthieu
>
>
>
The at commands (and crontabs - also worth looking at) are recorded in 
files which you can find in:

/var/spool/cron/atjobs/USERNAME.JOBNUMBER
and
/var/spool/cron/crontabs/USERNAME

if you cat any of these files you'll see who's got jobs waiting to run 
and what those jobs are going to do.


The command history is kept in the users home directory in a file called 
.history so if you do something like:

find / -name .history -exec grep rm {} \;

it'll search for all the .history files and then grep for any "rm" 
commands, this may or may not be usefull as there are likely to be many 
legitimate rm commands and in order to work out if a particular "rm *" 
command caused your problem you'd have to work out from previous 
commands if the user had been working in a temporary/private directory 
when they issued the command, also they might not have removed the file, 
they could have moved it, e.g "mv * /tmp/tmp.file". Also if anyone was 
trying to be malicious and then cover their tracks they would remove the 
.history file after issuing the destructive commands in order to 
eliminate the evidence.



Best of luck.

-- 
Remove KNICKERS before replying by Email ;-)




  reply	other threads:[~2002-01-29  9:57 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-29  3:26 History of commands in shells Matthieu
2002-01-29  9:57 ` Martyn [this message]
2002-01-29 14:06   ` Martyn
2002-01-29 14:31   ` Quarter Horseman
2002-01-29 10:09 ` Emmanuel Choquet
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox