From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: fa528,bbe0a6e18eef08f5 X-Google-Attributes: gidfa528,public X-Google-Thread: 1012a6,bbe0a6e18eef08f5 X-Google-Attributes: gid1012a6,public X-Google-Thread: 1006bb,bbe0a6e18eef08f5 X-Google-Attributes: gid1006bb,public X-Google-ArrivalTime: 2002-01-29 02:00:10 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!cyclone.bc.net!newsswitch.lcs.mit.edu!newsfeed.mathworks.com!btnet-peer0!btnet!news5-gui.server.ntli.net!ntli.net!news6-win.server.ntlworld.com.POSTED!not-for-mail Message-ID: <3C567218.8070006@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: Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Date: Tue, 29 Jan 2002 09:57:44 +0000 NNTP-Posting-Host: 80.1.185.200 X-Complaints-To: abuse@ntlworld.com X-Trace: news6-win.server.ntlworld.com 1012298104 80.1.185.200 (Tue, 29 Jan 2002 09:55:04 GMT) NNTP-Posting-Date: Tue, 29 Jan 2002 09:55:04 GMT Organization: ntlworld News Service Xref: archiver1.google.com comp.unix.shell:25973 comp.unix.tru64:6593 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 ;-)