Can't login, although password is correct
10,785
If you've been starting graphic applications from the terminal using sudo
, that's what probably caused your problem. Always use sudo -H
.
- boot to the GRUB menu
- choose Advanced Options
- choose Recovery mode
- choose Root access
- at the # prompt, type:
sudo mount -o remount,rw /
# remount the disk as rwcd /home/your_username
# change directoryls -al .*thority*
# list some files
You should see something like this...
-rw------- 1 your_username your_username 407910 Nov 2 08:56 .ICEauthority
-rw------- 1 your_username your_username 58 Jun 23 2017 .Xauthority
If it DOES NOT show -rw-------
then...
sudo chmod 600 .*thority*
# change file protection
If it DOES SHOW root root
then...
sudo chown your_username:your_username .*thority*
# change file ownershipreboot
# reboot the computer
Reboot and see if you can log in.
Related videos on Youtube
Author by
Itra
Updated on September 18, 2022Comments
-
Itra over 1 year
Here what's happening when I try to log in.
I'm entering the right password
It brings me back me to the login screen.
I tried to change password via another user but it didn't help.
-
guiverc over 5 yearsIf you have no space in your $HOME (/home/user/ directory), there will be no space for required working-files used by the gui, and login cannot proceed so you are returned to the login dialog. As Kulfy suggested I'd suggest switching to terminal (ctrl+alt+f4) and login, it'll prove your credentials are fine, and then you can
df -hl
to see if you have enough disk space free to enable gui to work; if not you can find some files to delete, increasing space allowing gui login.
-
-
jeremy_rutman about 3 yearsdidn't solve the identical problem in my case (ubuntu 20.04)
-
Boris Hamanov about 3 years@jeremy_rutman Please start a new question.