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
    
1
  • 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 4, 2014 at 10:51

1 Answer 1

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

2
  • Azker Mohamed its worked for me thank you very much Feb 6, 2014 at 3:44
  • @user237793 I'm glad it helped you. And, please accept it as answer if it helped you. This will also reduce the question queue. :)
    – AzkerM
    Feb 6, 2014 at 5:32

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .