LinuxQuestions.org
Help answer threads with 0 replies.
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 12-04-2004, 01:05 AM   #1
wmcase
Member
 
Registered: Sep 2003
Location: Ottawa, Ontario, Canada
Distribution: Fedora 12
Posts: 57

Rep: Reputation: 15
Where did ex-users files go?


Hi ;

More a curiosity question than a deep cry for help, but I see how it could be.

I was fooling around creating users and groups, just to learn how.

I created a user. Logged in as the new user, created a couple of test files while trying out some programs and logged out.

Later without thinking it through, removed my new test user through the Fedora/Red Hat User Manger. His user space (is that the correct terminology) of course disappeared along with the test files. Where did the test files go? If I needed to recover them how would I go about doing that.
 
Old 12-04-2004, 03:26 AM   #2
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
There is this magical thing known as the "bit bucket" where all the bits go when they die.

lol

Seriously, unless you define a different behavior the default action on almost every system is to delete all the files. Most systems have a way to achive them as part of the removal process (although a few might require you to hack something together) but if you didn't get asked where to save the files then it didn't save them.

Good thing you learned this with test files and not real data. Check the docs for your distro to see if they have a way to archive removed user's data.
 
Old 12-04-2004, 05:09 AM   #3
dalek
Senior Member
 
Registered: Jul 2003
Location: Mississippi USA
Distribution: Gentoo
Posts: 2,058
Blog Entries: 2

Rep: Reputation: 65
I think frob23 is correct. In most distros when you delete the user the user directory, /home/<username>, gets deleted. If you don't have the user, why have the data that can only be accessed by him/her and root, of course?

Good luck. I think it is gone.

Later

 
Old 12-04-2004, 05:28 PM   #4
DavidPhillips
Guru
 
Registered: Jun 2001
Location: South Alabama
Distribution: Fedora / RedHat / SuSE
Posts: 7,155

Rep: Reputation: 56
One thing that you could do is leave the user in the system and disable login for that user by setting the /etc/passwd entry for that person's login shell to something like /bin/false.

That would preserve the users files, name, and user id. Otherwise just remove the user and their files are removed as well.
 
Old 12-05-2004, 03:55 AM   #5
frob23
Senior Member
 
Registered: Jan 2004
Location: Roughly 29.467N / 81.206W
Distribution: Ubuntu, FreeBSD, NetBSD
Posts: 1,449

Rep: Reputation: 47
Quote:
Originally posted by DavidPhillips
One thing that you could do is leave the user in the system and disable login for that user by setting the /etc/passwd entry for that person's login shell to something like /bin/false.

That would preserve the users files, name, and user id. Otherwise just remove the user and their files are removed as well.
While this is a good idea there are a few circumstances that might make it unfeasable. If you have a user that is causing problems they may have stuff sitting around still causing problems even if they can't log in.

After killing all their processes, it is wise to make sure they have no "cron" or "at" jobs. Then disable mail to their account. If you disable an account because they are running SETI or something on a machine and you don't allow that -- then you don't want their crontab to refire it up whenever you kill it.

It might be easier to just archive all their files with tar (you can even leave them on the disk if you want) and then delete the user. If the person needs their files you can give them the tarball. If you decide to let them back in, create the user and unpack the tarball again.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Different xorg.conf-files for users zorolowski Linux - General 2 08-21-2005 11:27 AM
Files sharing between users on same computer Artik Linux - Security 5 07-13-2005 03:23 PM
vsftpd: allow users to write and delete files me3 Linux - Software 4 03-04-2005 08:22 PM
What are core files in the users home directory draven Linux - Newbie 3 03-07-2004 10:56 PM
some domain users can not own local files foehlinger Linux - Networking 1 02-18-2003 07:56 AM


All times are GMT -5. The time now is 07:35 AM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration