Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm thinking of way to protect data from stealing. Is there any way to start auto disk formatting when someone enters wrong password on login? Or when enters specific password which would trigger disk formatting?

share|improve this question
This is a dangerous strategy, there are others methods to protect your data like encryption, have you considered any of these? – stephenmyall Apr 26 '12 at 14:59
There is similar package called suicide linux It erased my important datas :(, So dodnt touch similar packages, And this is really bad idea ,Because you are a human being and you may forget your password ,predict its result :p – Tachyons Apr 26 '12 at 15:04
Also look at this question on deleting files in a secure manner. By just formatting your files are all still there. – Takkat Apr 26 '12 at 15:12
what about specific word? imagine the scenario when someone steals your laptop and you intentionally write the keyword somewhere on laptop. Thief thinks that's it and kaboom, all gets deleted. – user1079002 Apr 26 '12 at 15:23
But why? Anyone with physical access to your laptop and enough motivation can just open it up physically, rip out the internal HD, jam it into an enclosure, and plug it to his own computer. Then, he'll browse through your files for as long as he wishes. Encryption prevents this scenario, and your partition's data would be inaccessible without your password. – SirCharlo Apr 26 '12 at 15:46
up vote 7 down vote accepted

I'm not sure that automatically reformatting your Ubuntu partitions when a bad password is entered is a very viable means of protecting your data. What happens if you try to log in with Caps-Lock enabled by accident?

Try something along the lines of encrypting your home partition instead.

Instructions on how to encrypt your home partition after Ubuntu is installed (if you didn't opt to do so during installation) can be found here.

share|improve this answer
I'm also interested in encrypting deleted files that can be recovered. Does this work for that? Where do deleted files go? because if u only encrypt home folder, what about the rest of the disk? – user1079002 Apr 27 '12 at 1:28
We're talking about encrypting your home partition here. This implies that your home folder is stored on a separate partition. Deleted files are stored in your home folder, under a folder named .Trash, if my memory serves me right.. – SirCharlo Apr 27 '12 at 3:47
yes, you're right about the partition, but I didn't think of deleted files, I think of permanently deleted files, ones that can be recovered with scalpel. So, they're not "transfered" to another partition? – user1079002 Apr 28 '12 at 0:17

Best way to securely delete files is to use for example shred or the secure-delete tool to overwrite the files content and Inode info a few times. Then the data really is gone and cant be recovered.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.