PDA

View Full Version : [ubuntu] deleting user-directory



lemured
July 8th, 2011, 03:29 PM
ubuntu karmic

hello.

again a question to which the answer is probably too close to grasp...

i had a 2nd user, who now shan't have any access any longer.
i went to admin --> users & groups and deleted this user

unfortunately when trying to delete the directory [filesystem --> home --> username] i found that i wasn't able, as i'm not authorized to read it. i don't want to read, just delete.
to my overrated logic this means that i probably should have erased the directory before deleting the user.

anything i can do to convince the little orange workers in there to let me delete those directories?

thanks a lot and very much if anyone can tell me :)

TeoBigusGeekus
July 8th, 2011, 04:09 PM
Tru from command line

sudo rm -rf /home/username

lemured
July 8th, 2011, 04:21 PM
Tru from command line

sudo rm -rf /home/username

thanks, TeoBigusGeekus, but either my wits already end before
my nose or i'm not on the absolute beginner talk any more?

threw this in, the result being a few lines of the -

' usage: sudo -1[1] [-AhS] [- g groupname.....'

- sort, which i don't at all know what to do with. an effect did it not have, so what am i missing?

[i did replace 'username' with the username ;)]

TeoBigusGeekus
July 8th, 2011, 04:54 PM
Can you please post the exact command you used?

lemured
July 8th, 2011, 05:16 PM
Can you please post the exact command you used?


'sudo rm -rf /home/username '
as you suggested, the 'username' replaced by the deleted user's username.

i hope i don't appear too stupid...

TeoBigusGeekus
July 8th, 2011, 05:20 PM
The only thing I can suggest is booting from a live cd/usb and deleting it from there.
It could be a permissions thing...

lemured
July 8th, 2011, 05:29 PM
The only thing I can suggest is booting from a live cd/usb and deleting it from there.
It could be a permissions thing...

yes. it is. a permissions thing. which it states when i try. unfortunately the usb-idea won't result either.
but thank's in any case for your help :)

TeoBigusGeekus
July 8th, 2011, 05:31 PM
unfortunately the usb-idea won't result either.

Why not?

wojox
July 8th, 2011, 05:35 PM
sudo userdel -rf username

grahammechanical
July 8th, 2011, 06:38 PM
Go back to Users and Groups and this time check that sudo is listed as one of the Groups available on the system. It is under Manage Groups.

This is just a crazy though that I have had.

Regards.

Wild Man
July 9th, 2011, 12:32 AM
'sudo rm -rf /home/username '
as you suggested, the 'username' replaced by the deleted user's username.

i hope i don't appear too stupid...
Hi, it looks like to me that /home needs to have a space between it and rf. Also please note that you need to be very careful using this command if used wrong you could delete your system.

westie457
July 9th, 2011, 12:45 AM
Hi another way is in a terminal running
gksudo nautilus
This will open nautilus with root privileges.

WARNING Be very careful on what you delete here as there is no recovery option if you choose the wrong file. Also there is a security risk as your system is wide open, as soon as you have finished exit the terminal, log off and back in again to minimise any chance of interference from outside. If you are feeling paranoid about this the best thing to do then is shutdown and then restart not a plain reboot.

jerome1232
July 9th, 2011, 01:17 AM
Hi another way is in a terminal running
gksudo nautilus
This will open nautilus with root privileges.

WARNING Be very careful on what you delete here as there is no recovery option if you choose the wrong file. Also there is a security risk as your system is wide open, as soon as you have finished exit the terminal, log off and back in again to minimise any chance of interference from outside. If you are feeling paranoid about this the best thing to do then is shutdown and then restart not a plain reboot.

If you use this method, be sure to shift+del, otherwise it goes to your root users trash and hogs space secretly.

bodhi.zazen
July 9th, 2011, 03:26 AM
I suggest you use find, you will need to run it as root.


sudo -i

find / -user old_user

After reviewing those files, remove them with find again


find / -user old_user -exec rm -f '{}' \;

See man find for details ;)

lemured
July 13th, 2011, 01:07 PM
Go back to Users and Groups and this time check that sudo is listed as one of the Groups available on the system. It is under Manage Groups.

This is just a crazy though that I have had.

Regards.

Hello.
Yes, it is.
How to proceed from there?

lemured
July 13th, 2011, 01:45 PM
Hi another way is in a terminal running
gksudo nautilus
This will open nautilus with root privileges.

WARNING Be very careful on what you delete here as there is no recovery option if you choose the wrong file. Also there is a security risk as your system is wide open, as soon as you have finished exit the terminal, log off and back in again to minimise any chance of interference from outside. If you are feeling paranoid about this the best thing to do then is shutdown and then restart not a plain reboot.

Hi
thank you, also jerome1232

i'll try later and let you know how it went