From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1012a6,bbe0a6e18eef08f5 X-Google-Attributes: gid1012a6,public X-Google-Thread: fa528,bbe0a6e18eef08f5 X-Google-Attributes: gidfa528,public X-Google-Thread: 1006bb,bbe0a6e18eef08f5 X-Google-Attributes: gid1006bb,public X-Google-ArrivalTime: 2002-01-29 06:08:23 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!dispose.news.demon.net!demon!btnet-peer0!btnet-peer!btnet!newspeer.clara.net!news.clara.net!news5-gui.server.ntli.net!ntli.net!news11-gui.server.ntli.net.POSTED!not-for-mail Message-ID: <3C56AC49.4090908@bigfoot.com> From: Martyn Reply-To: mpattKNICKERS@bigfoot.com User-Agent: Mozilla/5.0 (Windows; U; Win98; en-GB; rv:0.9.4) Gecko/20011019 Netscape6/6.2 X-Accept-Language: en-gb MIME-Version: 1.0 Newsgroups: comp.unix.shell,comp.unix.shells,comp.unix.tru64 Subject: Re: History of commands in shells References: <3C567218.8070006@bigfoot.com> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 29 Jan 2002 14:06:01 +0000 NNTP-Posting-Host: 80.1.184.227 X-Complaints-To: abuse@ntlworld.com X-Trace: news11-gui.server.ntli.net 1012312998 80.1.184.227 (Tue, 29 Jan 2002 14:03:18 GMT) NNTP-Posting-Date: Tue, 29 Jan 2002 14:03:18 GMT Organization: ntlworld News Service Xref: archiver1.google.com comp.unix.shell:25985 comp.unix.tru64:6598 Martyn wrote: > 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. > In actual fact the name of the command history file depends on which shell they're using, nevertheless it should be obvious which is which. -- Remove KNICKERS before replying by Email ;-)