I accidently sent the user folder to /usr/local/sbin, trying to move a script file from the user to the sbin folder.
When I send the script, I did not run it or anything, I just sent it with
sudo mv
Suddenly, I couldn't open any folder in desktop in GUI, and
This folder may not exist or it was deleted
was shown to me. I opened the terminal and it was changed: I was in the terminal as root.
I restarted my pc, and every time I inserted my password, the screen just refreshed and nothing was happening, and I was asked again and again to insert my pass.
I found this thread ubuntu does no let me log in to my user, how can I fix it? and I tried to solve the problem by installing lightdm, but before doing that, I changed again the permissions in root, since I thought that was the problem, with sudo chmod u-w root
. (I changed the permissions for a different reason, this morning)
I typed the following commands:
sudo apt-get purge lightdm
sudo apt-get update
sudo apt-get install lightdm
But I forgot the next command, which was
dpkg-reconfigure lightdm
So I restarted my pc to go to windows to see the command again. Then I restarted again, to boot Linux, and I couldn't: the mint logo was just refreshing and refreshing. I tried to go in recovery mode to run as root the
dpkg-reconfigure lightdm
command. I did, but after restarting again, nothing was solver. The mint logo was refreshing again. So now I can't even go to the login page.
EDIT: I managed to move the user folder back to home, in the recovery mode, but the problem still remains.
/home
directory are still set correctly? – Time4Tea Mar 18 '20 at 19:27