Home deleted by rm command, cannot login


Answer: 1

8 hours ago

I tried to use rm to format a pendrive but it also deleted everything inside my Home folder.

Now I can't even login anymore. Also, pressing shift on boot wont enter in recovery mode.

I have the ubuntu installer on a bootable pendrive, thought.

Edit: Now I can access recovery mode and login as root.

Edit 2: I don't really need to get my deleted files back, because I only had wallpapers on my account. I just want to be able to login again.

Added by: Eloise Shanahan

Answer: 2

13 hours ago

TestDisk and PhotoRec are good command line data recovery tools. Boot a live image in order to have a usable system to operate the recovery utilities from. Both tools are part of the testdisk package, they are in the Ubuntu repositories and can be installed with:

sudo apt-get install testdisk

More information about TestDisk, including tutorials and use cases, can be found here

Here is info covering PhotoRec, including step by step data recovery instructions.

If you're unable to repair your system you may use the live image to back up data on a separate disk or partition, reinstall the system, and then recover your data back to the fresh install.

Added by: Josefa Klein

Answer: 3

28 hours ago

If you can login to root, recreate the /home directory.

/home (owner: root, group: root, perms: 755)
/home/user1 (owner: user1, group: user1, perms: 755)
/home/user2 (owner: user2, group: user2, perms: 755)
/home/user3 (owner: user3, group: user3, perms: 755)


Added by: Will Cummings

Answer: 4

12 hours ago

Try to Install extundelete, Boot with a liveCD , and go to the terminal,

  1. sudo apt-get install extundelete
  2. Command to recover sudo extundelete --restore-directory /home/Documents/ /dev/sda1

From here the Info How to recover deleted files?

Please let me know, whats happen..

Answer: 5

28 hours ago

If you are looking for ability to continue working with the current system rather than restoring your home directory then try:

EDIT: If you can do the next it may help: Ctrl+alt+F1 to change to the console (CLI). You might be able to log in still, do it now. Then sudo mkdir /home/$USER sudo chown $USER: /home/$USER

Should all be done now, either press Ctrl+Alt+F7 to return do GDM or reboot.

UPDATE: If you previouslt enabled root by this : sudo passwd root you can create a user by:

1) login as root

2) useradd username

3) passwd username

Added by: Jasper Ward V

Popular Search

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z 1 2 3 4 5 6 7 8 9