3

My company purchased an Ubuntu computer we are returning due to hardware issues.

How can I erase my account? I was going to erase the user will this be sufficient.

These guys are honest businessmen I just have logs and other sensitive data on here.

1
  • Do you want to erase all user data or the full system?
    – Pilot6
    Aug 22, 2015 at 19:15

2 Answers 2

1

Erasing of the user is sufficient, but the deleted files can be restored.

I suggest shredding the user home directory /home/user and then removing the user.

To shred the directory run

find /home/$USER -exec shred {} \;

and then remove the user.

That will overwrite all user data.

1
  • You probably also need to overwrite empty space too. Conceivably, sensitive files might have been previously deleted. Also, I'm not sure if there might be sensitive data in the system logs that need deleting? Finally, will this work if you are logged in as the user you are trying to erase, or should you use a Live DVD?
    – Sparhawk
    Aug 22, 2015 at 23:06
0

To to a few passes over the data to prevent recovery:

mount -a
apt-get install secure-delete
srm -rvz /

Just a full wipe:

mount -a
rm -rf /

Make sure that no other storage device is plugged in and that no remote filesystems are mounted.

If you would only like to erase user data, substitute the / for ~

5
  • -n 3 is default. And why shred /? I suggest to shred only user data and keep the system.
    – Pilot6
    Aug 22, 2015 at 19:14
  • i fixed it sorry Aug 22, 2015 at 19:17
  • It will not overwrite files recursively in directories.
    – Pilot6
    Aug 22, 2015 at 19:45
  • @Pilot6 I wondered why there was no recursive option in the man page Aug 22, 2015 at 20:32
  • Because there is not recursive option in shred. I made it recursive with find.
    – Pilot6
    Aug 22, 2015 at 20:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .