This issue has been well documented on other sites/forums but thought I would share this issue I had with a different distribution but should still work for you if it ever happens to one of your installs.
The ‘de facto’ solution usually is to boot into advanced | recovery mode then from the recovery memory launch ‘root’ (terminal) then enter:
mount -n -o remount,rw /
then press Enter.
then enter new password, shutdown and reboot.
If this does not work, and if you have Timeshift installed then boot from live DVD/memory stick and point to where the snapshots are held and see if that works. If it doesn’t try one of the following 3 options (acknowledgements to https://www.linuxslaves.com/2016/05/3-w … -loop.html? )
Method #1 Fix Ubuntu login screen loop
The first is quite simple. The file is located under the current user’s home directory. All you will have to do is change the owner of .Xauthority file.
At login time, use Ctrl+Alt+F3 to switch and access the command line interface mode.
Login into the shell using your username and your password. In this case, username will be your username you set when you installed Ubuntu.
Once logged in, now run
ls -lahto view list directory contents. Look for the line that ends with .Xauthority
# ls -lah-rw------- 1 root root 53 Nov 29 10:19 .Xauthority
You need to do
chown. Type and run the following command :
['sudo' if not currently 'root'] chown username:username .Xauthority
Now reboot and see if you can log in - if not:
If it does not work, try renaming.
mv .Xauthority .Xauthority.bak
Now reboot and try re-logging in.
Method #2 How to Fix Ubuntu login screen loop
Run ls -ld /tmp. Check for the first 10 letters in the left: they should read exactly so: drwxrwxrwt
# ls -ld /tmpdrwxrwxrwt 15 root root 4096 Nov 30 04:17 /tmp
You may need to changing permission. Run the command below :
sudo chmod a+wt /tmp
Method #3 How to Fix Ubuntu login screen loop
If even both did not work for you, try the last one! Please make sure you are connected to active internet. Check this out!
Uninstall and reinstall Ubuntu lightdm. Run the following :
sudo apt-get purge lightdmsudo apt-get install lightdmdpkg-reconfigure lightdm
Once reconfigured, now reboot.
[I have modified the instructions as it is not clear at which point you become ‘root’ using the ‘sudo’ command - if the last element of a terminal prompt is ‘#’ then you are in the terminal as ‘root’ with elevated privileges. If the last element of the command prompt is ‘$’ you are a standard user, and not ‘root’. I have written this tutorial experiencing just this and used Method 1 which solved the issue for me in another GNU/Linux OS.