0

I am unable to login through GUI as a user but I am able to login via terminal.

This occurred after I installed 2 steps authenticator of Google using apt-get install command. I followed these steps:

  1. sudo apt-get install libpam-google-authenticator

  2. Edited /etc/pam.d/sshd and add the following line to the file:

    auth required pam_google_authenticator.so
    
  3. Edited /etc/ssh/sshd_config and changed ChallengeResponseAuthentication to yes

  4. I restarted the ssh service.

    root@george:~# ls -l /home/george/.Xauthority  
    -rw------- 1 root root 125 Jan 31 19:35 /home/george/.Xauthority
    
user.dz
  • 48,105
George Ulahannan
  • 89
  • 1
  • 7
  • 17
  • log-in via terminal & type ls -l /home/user/.Xauthority.. change it to your username instead of user. Please post the output of that line by editing your question. – AzkerM Feb 04 '14 at 10:51

1 Answers1

3

Well, by the look of your output for ls -l /home/user/.Xauthority shows that the file is owned by root where it is supposed to be user. In your case, it should be george. Moving the file or giving permission to its origin user would fix if I'm not mistaken. Anyhow, please follow below steps by logging in via terminal;

  • Log in as the user (as goerge) & change to the user's home directory
cd /home/user                 # in your case, its /home/george

or even a single cd ~ command will take you directly to the home folder of the user.

  • I do not recommend deleting or changing ownership at first, so let us move it by backing-up
sudo mv .Xauthority .XauthorityBak
  • And then reboot your system.
sudo reboot

P.S.: There are instance where this may work to get your problem fixed or may not. Since you're not deleting the original .Xauthority file it won't be a harm.

Source: Lost gui after ending xorg process

AzkerM
  • 10,270
  • 6
  • 32
  • 51