LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices


Reply
  Search this Thread
Old 02-10-2011, 06:37 PM   #1
j0eh4x
Member
 
Registered: Dec 2005
Distribution: Ubuntu Lucid Lynx, BT5
Posts: 84

Rep: Reputation: 2
Shredding user account?


I'm running linux mint and I would like to switch to root, shred my main user account/home folder and then create a new account... is this possible? or do I need to do a full reinstall? if it is possible if someone could provide the steps that'd be great
 
Old 02-10-2011, 07:40 PM   #2
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Why not just create a new user account first?

# man useradd

No full re-install is needed.
 
Old 02-10-2011, 08:02 PM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
You would want to do just as mjmwired suggested. Use the admin tools to create a new user. Pay attention to the group membership of the first user, which is the administrator allowed to use "sudo" and the administrator tools. Test the new user's capabilities before deleting the first user.

If it is only the username you want to change, you can edit /etc/passwd and rename the home directory and save yourself a lot of work.
 
Old 02-11-2011, 10:37 AM   #4
j0eh4x
Member
 
Registered: Dec 2005
Distribution: Ubuntu Lucid Lynx, BT5
Posts: 84

Original Poster
Rep: Reputation: 2
actually I was looking to do a secure delete of all files under that account, i know just adding a new user and then erasing the old one isnt that
 
Old 02-11-2011, 10:40 AM   #5
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
Quote:
I was looking to do a secure delete of all files under that account,
Create the new account, delete the old account, delete the old /home/user directory.
If you really have things to hide, reinstall, and reformat the partition.

Kind regards

Last edited by repo; 02-11-2011 at 10:42 AM.
 
Old 02-11-2011, 12:14 PM   #6
Noway2
Senior Member
 
Registered: Jul 2007
Distribution: Gentoo
Posts: 2,125

Rep: Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781Reputation: 781
There is a secure delete package with a tool called SRM (secure remove) (link). There has been debate over time regarding its effectiveness and whether or not there is a need for this level of "shredding" with current file systems. I personally use it when I want to take extra caution to get rid of something. It works by over-writing the sectors with random and specially patterned garbage to make recovery extra difficult.
 
Old 02-14-2011, 10:54 PM   #7
anomie
Senior Member
 
Registered: Nov 2004
Location: Texas
Distribution: RHEL, Scientific Linux, Debian, Fedora
Posts: 3,935
Blog Entries: 5

Rep: Reputation: Disabled
SRM is probably easiest (especially if it handles recursion for you). Other options include some carefully crafted find(1) + shred(1) or dd(1) commands, e.g.:

Code:
# find /home/baduser -type f -exec shred {} \;
# rm -r /home/baduser
Be careful with that. Don't run it unless you want to irretrievably blow everything away under /home/baduser.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
root account or user account arodlinux SUSE / openSUSE 3 12-23-2008 08:59 PM
Prevent user account from logging in but allow su to account DejaCpp Linux - General 4 07-26-2006 11:44 AM
User Account to Access Another Account benfaust Linux - General 2 06-28-2006 12:26 PM
system account or user account??? yenonn Linux - Newbie 6 05-10-2006 07:49 PM
is it legitimate and allowed and can be done to make another user account set uid and gid to null 0 to make another root account with different name and possibly not damage the debian system creating and using that new account BenJoBoy Linux - Newbie 12 01-29-2006 10:02 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 04:00 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration