Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We are going to be changing servers shortly and want to destroy the data on our old server before we give it back. We have 2 x 250GB configured in RAID
Would be useful if we could have:
A. A command we can use to shred the data one directory at a time.
B. A command to shred/wipe the complete drive.
Download Darin's boot and nuke. Do a DOD wipe on it, takes 7 passess writing straight 0's and 1's to the drive. THIS IS NOT A GUARANTEE! Data could in theory still be recovered but it would take the will of some super guru locked up in the NSA's basement.
However, this is very very standard. While working for one of the top level finance companies who held social security numbers, bank account numbers etc.. we would do a DoD wipe then physically shred the drives. Its the equivalent of taking a piece of paper that has writing on it and blacking it all out with a sharpie, you cant see it but the original stuff is still there, so then you take that blacked out piece of paper, light it on fire and bury the pieces at the four corners of the world. Well a little extreme but you get the idea.
If you've got any form of remote management (IPMI, iLO, DRAC or whatever else TLA or FLA in use) that allows you to boot an ISO or DVD load up DBAN (quick wipe with verification pass should prove to be "good enough" most of the times). Else load any other Live CD, bootable USB stick, or perform the 'dd if=/dev/zero of=/dev/whateverraiddevice' from within the system as that could be entertaining too ;-p *Note that for any device processed I do not consider the wiping process finished until verification is done (easier if you write a pattern or zeroes).
When I'm disposing of a drive that contains sensitive information, I physically disassemble it and smash the platters into a million pieces with a hammer.
If you do not have physical access to the drive then wouldn't it be safe to assume that you are not responsible for maintaining your hardware and that you are paying a company or someone to do so, if thats the case and it is pretty common, then data erasure and all that should be written into the statement of work or contract.
Without access to the drives or being able to boot from an iso you only have access to the linux utilities.
Now you could do unspawns suggestion of using /dev/zero and dd to write zeros to a device but if that device is teh one you are currently running the OS off of it will only get to a certain point before the OS becomes unusable and would not be an acutal wipe.
Hi,
A. A command we can use to shred the data one directory at a time.
How about just:
Code:
cd /path/to/
rm -rf folder
#Clear free space with
dd if=/dev/zero of=./file bs=16M
sync
rm file
For a drive: sudo dd if=/dev/zero (or random) of=/dev/sdX. It's not called Destroyer of Disks for nothing. This will probably work better if /dev/sdX is not the root drive. This may not be the ultimate way of wiping data but it would certainly make recovery somewhat expensive.
I don't use dd often but can you clarify your post a little here?
Wouldnt:
Code:
dd if=/dev/zero of=./file bs=16M
Continue to keep writing 16 Megabytes to the ./file until the drive ran out of space or the command was cancelled? I know that I get my dd options mixed up sometimes and the man page didnt help clarify it very much.
This is a remote server so I dont think any of your suggestions will be posible, we dont have physical access to the drive.
Then you should have stated so in your OP. Efficiency and all that.
Quote:
Originally Posted by tony00
I was looking for something more like a Linux command that could be run that would be a bit more secure than just rm
Remove the files then run 'dd' as propofol suggested (running 'shred' and then 'dd' gives you nothing extra). Again, verify (or have personnel verify) the disks content after the op. Without post-op verification any "secure deletion" makes no sense at all.
Stefan
Continue to keep writing 16 Megabytes to the ./file until the drive ran out of space or the command was cancelled? I know that I get my dd options mixed up sometimes and the man page didnt help clarify it very much.
The aim is to overwrite the free space where your files used to be with zero's or random numbers (/dev/random). With just a "rm -rf folder" only the reference to the file is removed. The "bs=16M" is just to speed things up - dd still writes until the drive is full even if the last block is not a full 16Mb.
What about backups? Were they under your control, or was the owner of the system making its own backups? If the latter, you need to ensure that those are destroyed as well.
The aim is to overwrite the free space where your files used to be with zero's or random numbers (/dev/random). With just a "rm -rf folder" only the reference to the file is removed. The "bs=16M" is just to speed things up - dd still writes until the drive is full even if the last block is not a full 16Mb.
Regards,
Stefan
If the drive you are writing to is apart of the root filesystem this would not work, it would hit a certain point where it would just fill up the filesystem, all of the data would still be recoverable if you pulled the drive and mounted it as asecondary drive on another system.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.