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.
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.
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)
etc.
12 hours ago
Try to Install extundelete, Boot with a liveCD , and go to the terminal,
From here the Info How to recover deleted files?
Please let me know, whats happen..
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
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:
sudo passwd root
1) login as root
2) useradd username
3) passwd username