USA Linux Users Group Forum Index
Log in Register FAQ Memberlist Search USA Linux Users Group Forum Index Album

Secure file removal

 
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » System Administration and Security
View previous topic :: View next topic  
Author Message
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Fri Apr 04, 2024 9:35 am    Post subject: Secure file removal Reply with quote

I need a way for me to securely remove all traces of files from a 4 gig USB key.

The reason is I need to give Nicola's ex-husband the key so that she can have copies of some files that he has found on his PC. However I don't trust the guy and want to give him a "blank" key to use. I did want to give him a blank DVD but he has said that his writer is on the blink so that jas ruled that one out so the only way to do it is by USB key. If I was using Windows I had plenty of ways to do this but I have never really looked at Linux alternatives till now.



_________________
Windows Vista / Ubuntu 8.10
Back to top
View user's profile Send private message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2024
Posts: 12452
Location: Planet Earth

PostPosted: Fri Apr 04, 2024 10:35 am    Post subject: Reply with quote

Code:
dd if=/dev/urandom of=/dev/sda1


Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough.



_________________
Laptop: Mandriva 2024 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2024 Free - kernel 2.6.33.2-1mib
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Fri Apr 04, 2024 1:42 pm    Post subject: Reply with quote

Germ wrote:
Code:
dd if=/dev/urandom of=/dev/sda1


Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough.


Thanks Germ. The drive didn't have anything too critical on it in the past but he fancies himself as a bit of a computer genius even though he cannot install Windows XP properly and all he does is play World of Warcraft all day long.



_________________
Windows Vista / Ubuntu 8.10
Back to top
View user's profile Send private message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2024
Posts: 12452
Location: Planet Earth

PostPosted: Fri Apr 04, 2024 1:57 pm    Post subject: Reply with quote

Sounds like a real winner...



_________________
Laptop: Mandriva 2024 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2024 Free - kernel 2.6.33.2-1mib
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Fri Apr 04, 2024 2:26 pm    Post subject: Reply with quote

Well I have run that 3 times now as I was bored so there should be nothing for him to try and find on the drive. Now all he needs to to do is pull himself away for World of Warcraft long enough to copy the files over. That will be the hard part part as he plays 12 -18 hrs a day EVERY day. He even takes his laptop with him to the bathroom so it doesn't interrupt his playing.



_________________
Windows Vista / Ubuntu 8.10
Back to top
View user's profile Send private message
Rootboy
Sr. Member


Joined: 11 Aug 2024
Posts: 1947
Location: Lewisburg, Tennessee

PostPosted: Fri Apr 04, 2024 11:30 pm    Post subject: Reply with quote

Germ wrote:
Code:
dd if=/dev/urandom of=/dev/sda1


Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough.


Refresh my memory please. Once you do this, does the drive need to be re-fdisked and formatted?


Back to top
View user's profile Send private message
JP
Linux Guru


Joined: 07 Jul 2024
Posts: 6670
Location: Central Montana

PostPosted: Sat Apr 05, 2024 12:15 am    Post subject: Reply with quote

richard wrote:
That will be the hard part part as he plays 12 -18 hrs a day EVERY day. He even takes his laptop with him to the bathroom so it doesn't interrupt his playing.


Now that's REALLY a winner Rolling Eyes Rolling Eyes



_________________
Dell Box - Arch Linux
Dell Lappy - DreamLinux 3.5 - Default OS
Mepis 8.0 - Backup
Back to top
View user's profile Send private message Visit poster's website
Rootboy
Sr. Member


Joined: 11 Aug 2024
Posts: 1947
Location: Lewisburg, Tennessee

PostPosted: Sat Apr 05, 2024 1:33 am    Post subject: Reply with quote

JP wrote:
richard wrote:
That will be the hard part part as he plays 12 -18 hrs a day EVERY day. He even takes his laptop with him to the bathroom so it doesn't interrupt his playing.


Now that's REALLY a winner Rolling Eyes Rolling Eyes


In the loo, wouldn't that be more like "World of WarCr*p"?


Back to top
View user's profile Send private message
VHockey86
Advanced Member


Joined: 12 Dec 2024
Posts: 988
Location: Rochester

PostPosted: Sat Apr 05, 2024 5:01 am    Post subject: Reply with quote

Rootboy wrote:
Germ wrote:
Code:
dd if=/dev/urandom of=/dev/sda1


Replace sda1 with the correct device. You can run that a couple of times if you want but once should really be enough.


Refresh my memory please. Once you do this, does the drive need to be re-fdisked and formatted?


sda1 is the first partition on the sda device so you wouldn't need to repartition.

if you did...

Code:

dd if=/dev/zero of=/dev/sda


then yes, you would have to repartition+reformat.


Back to top
View user's profile Send private message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2024
Posts: 12452
Location: Planet Earth

PostPosted: Sat Apr 05, 2024 9:50 am    Post subject: Reply with quote

yea, since it was a USB key I was assuming he only had one partition.



_________________
Laptop: Mandriva 2024 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2024 Free - kernel 2.6.33.2-1mib
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
mr_ed
Site Admin


Joined: 28 Aug 2024
Posts: 3819
Location: 42 miles north of Ogdensburg, NY

PostPosted: Mon Apr 07, 2024 1:26 pm    Post subject: Reply with quote

Ideally you should run that more than once.

There is also GNU Shred. It's probably already installed on your system.



_________________
Desktop: Ubuntu 7.10 "Gutsy Gibbon"
Laptop: Ubuntu 7.04 "Feisty Fawn"
Back to top
View user's profile Send private message Visit poster's website
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Mon Apr 07, 2024 2:54 pm    Post subject: Reply with quote

Well it worked like a charm. Nicola gave him the "empty" drive and when he gave it back to her with the files on it that she wanted he commented that the drive had been over written with rubbish that he could make on sense of. How is that for stupid, He admitted that he had tried to recover whatever was on the drive whilst he had it in his possession.



_________________
Windows Vista / Ubuntu 8.10
Back to top
View user's profile Send private message
Germ
Keeper of the BIG STICK


Joined: 30 Apr 2024
Posts: 12452
Location: Planet Earth

PostPosted: Mon Apr 07, 2024 4:28 pm    Post subject: Reply with quote

wow... rather odd behavior.



_________________
Laptop: Mandriva 2024 PowerPack - 2.6.33.5-0.2mnb
Desktop: Mandriva 2024 Free - kernel 2.6.33.2-1mib
Back to top
View user's profile Send private message Send e-mail Yahoo Messenger
richard
Ultimate Member


Joined: 13 Apr 2024
Posts: 2730
Location: Kent, United Kingdom

PostPosted: Mon Apr 07, 2024 9:19 pm    Post subject: Reply with quote

Germ wrote:
wow... rather odd behavior.


Its normal behaviour for him Surprised



_________________
Windows Vista / Ubuntu 8.10
Back to top
View user's profile Send private message
Rootboy
Sr. Member


Joined: 11 Aug 2024
Posts: 1947
Location: Lewisburg, Tennessee

PostPosted: Mon Apr 07, 2024 9:41 pm    Post subject: Reply with quote

VHockey86 wrote:
sda1 is the first partition on the sda device so you wouldn't need to repartition.

if you did...

Code:

dd if=/dev/zero of=/dev/sda


then yes, you would have to repartition+reformat.


Duh, I didn't even notice the sda1...


Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic   printer-friendly view    USA Linux Users Group Forum Index » System Administration and Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All content © 2024-2009 - Usa Linux Users Group
This forum is powered by phpBB. © 2024-2009 phpBB Group
Theme created by phpBBStyles.com and modified by Crouse