Kali Linux login boot loop
I've been playing around with Kali Linux lately and trying some of the basic tools for pen testing. Not for anything in particular other than my own curiosity and several times i found that when I connected to the VM Console or attempted to VNC to the server, I would enter my credentials and it would appear to login, but then simply present me the login screen again. No matter how many times i tried, I was not able to actually log in to the server. The first few times I stupidly did a hard reboot in VMWare and each time that seemed to completely kill the Kali server and I would have to rebuild it. I will say so far my experience with Kali hasn't been a great one. I can see why people use this solely for pen testing and then delete the VM.
Yesterday on my Kali server that had only been build 48 hours prior, decided to have the same problem. I could still SSH in and login with the same credentials, but the X Windows login screens would just loop. I tried alt+shift+f1, logging in and rebooting but that didn't work either. So once again, I started googling. I'd tried a number of "fixes" that I'd found on various forums but I found that a lot of the time, when it comes to Kali, if you have an issue or a question, don't bother asking because the general response is "if you don't know how to fix this then you shouldn't be using Kali". Thanks guys for the useless comments.
Anyway, after some time spent googleing yet again, I finally found the fix so thought I'd post it here, just in case it helps someone else. If you're having this same problem, either SSH into the server or on the login screen use alt+shift+F1 to get to the CLI and then run the following commands.
sudo mv ~/.Xauthority ~/.Xauthority.backup
sudo chmod 700 ~
sudo chown -R kali:kali ### (your username should go here)
sudo service lightdm restart
Once I did that, I was able to log into X Windows again with no issues.
Add new comment