LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-21-2005, 12:51 PM   #1
davethegenius
LQ Newbie
 
Registered: Oct 2004
Distribution: Ubuntu Warthog
Posts: 18

Rep: Reputation: 0
Permission problems when removing user's home directory.


Hello, I use Ubuntu Warty and cannot remove past user's home directories from the /home folder. I remove the user's account but their directory stays. I've been able to delete everything within the folders via chown
to my username (dave) but I'm unable to remove the main (now empty) home directories. Now the directory is clearly empty and root sees nothing in there but I get this error while in BASH. Here's my code:

root@ubuntu:/home # rmdir camp2005/
rmdir: `camp2005/': Directory not empty

Any help would be great. Thanks alot.
 
Old 07-21-2005, 01:16 PM   #2
darkleaf
Senior Member
 
Registered: Jun 2004
Location: the Netherlands
Distribution: debian SID
Posts: 2,170

Rep: Reputation: 45
If you're completely sure it's empty (invisible config files, check "ls .*" or "ls -a") or don't want to keep anything:

"rm -rf camp2005/"

Be careful with it you want to make sure that you're really removing the intended folder as there's no way back
 
Old 07-21-2005, 01:16 PM   #3
perfect_circle
Senior Member
 
Registered: Oct 2004
Location: Athens, Greece
Distribution: Slackware, arch
Posts: 1,783

Rep: Reputation: 52
this folder is probably not empty.
There may be some hidden files (files starting with .) left there.
USE
Code:
ls -la /home/<username>
To find it out.
You may also use
Code:
rm -r <directory>
to remove a non empty directory and all its content
or
Code:
tm -fr <directory>
to force the removal without displaying any messages.
How did you remove the user?
If you used userdel the -r option would have removed the homedirectory of the user:
Quote:
NAME
userdel - Delete a user account and related files

SYNOPSIS
userdel [-r] login

DESCRIPTION
The userdel command modifies the system account files, deleting all
entries that refer to login. The named user must exist. The options
which apply to the userdel command are:

-r Files in the user's home directory will be removed along with the
home directory itself and the user's mail spool. Files located in
other file systems will have to be searched for and deleted manu-
ally.


Last edited by perfect_circle; 07-21-2005 at 01:19 PM.
 
Old 08-11-2005, 04:01 PM   #4
tripwire45
Member
 
Registered: Aug 2004
Distribution: Ubuntu 11.10
Posts: 59

Rep: Reputation: 15
I tried this out on my Debian box and discovered that I had to type "rm -R dirname" to remove a defunct user's home directory.
 
  


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
Not able to go to other user's home directory biswajit_dey Linux - Software 6 07-21-2005 08:14 AM
Reading other user's home directory with Samba zupidupi Linux - Networking 7 04-14-2005 01:53 AM
Changing user's home directory? HOW barton Debian 10 04-04-2005 02:27 AM
finding user's home directory within a daemon kurienmathew Programming 1 12-19-2003 03:22 AM
how to change a user's Home directory n1wil Linux - General 8 08-24-2002 03:22 PM


All times are GMT -5. The time now is 05:31 PM.

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