10

I am using Ubuntu 14.04.2 LTS, and after a power failure, I cannot login.
The computer has been working fine for a few months before this suddenly happened.

Symptoms are:

  • After an login attempt, screen blacks out for about 15 seconds, and returns to the login screen.
  • I can log in as a guest without a problem
  • I can log in as myself through tty1~tty6

I tried/checked the following with no success:

  1. Changing .Xauthority ownership didn't work
    chown username:username .Xauthority

  2. Changing the user directory rights didn't work
    sudo chmod -R u+w /home/[username]

  3. I tried meddling with lightdm
    dpkg-reconfigure lightdm

  4. sudo mv ~/.Xauthority ~/.Xauthority.backup
    sudo service lightdm restart

  5. There was nothing in .xsession-errors

  6. Tried gdm instead of lightdm, but it had the exact same issue

  7. Uninstalled lightdm and reinstalled

  8. /tmp directory does show drwxrwxrwt

None of these solutions I found on-line worked. Can anyone please help?

Edit 1):
When I typed sudo tail /var/log/lightdm/lightdm.log, there are 10 lines showing. (All starting with DEBUG:):

Activating VT 7  
Activating login1 session c3  
Session pid=8697: Greeter connected version=1.10.4  
Session pid=8697: Greeter start authentication for [username]  
Session pid=8769: Started with service 'lightdm', username [username]  
Session pid=8769: Got 1 message from PAM  
Session pid=8697: Propmpt greeter with 1 message  
User /org/freedesktop/Accounts/User 1000 changed (repeated 3 times) 

Also, when I type ls /usr/share/xsessions/, it shows

gnome.desktop    ubuntu.desktop 

Edit 2):

sudo grep 'lightdm:' /var/log/auth.log | tail gives the following, all starting with lightdm::

pam_ck_connector(lightdm:session): nox11 mode, ignoring PAM_TTY :0  
pam_unix(lighdm:session): session closed for user [username]  
PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory  
PAM adding faulty module: pam_kwallet.so  
pam_unix(lightdm-greeter:session): session opened for user lightdm by (uid=0)
pam_ck_connector(lightdm-greeter:session): nox11 mode, ignoring PAM_TTY :0  
PAM unable to dlopen(pam_kwallet.so): /lib/security/pam_kwallet.so: cannot open shared object file: No such file or directory  
PAM adding faulty module: pam_kwallet.so  
pam_succeed_if(lightdm:auth): requirement "user ingroup nopasswdlogin" not met by user [username]"  
(this one starts with sudo: instead of lightdm:) [username] : TTY=tty1 ; PWD=/home/[username] ; USER=root ; COMMAND=/bin/grep lightdm: /var/log/auth.log  
Videonauth
  • 33,815

3 Answers3

4

For me, the solution was simply running this command from tty1:

sudo rm .Xauthority
2

I know it's been a while, but in case the problem persists, her's what I'd do. This looks a lot like a "user" specific problem, especially after the reinstall.

First of all, try to create a new user (sudo adduser "username") and see if that works. If it does, you have the confirmation that something in your local configuration is wrong.

Try to start with a new, fresh configuration with the following commands (after logging in with your problematic username from a tty)

mkdir ~/cfg-backups
mv ~/.config ~/cfg-backup
mv ~/.dconf ~/cfg-backup

And check if you're back in business. You can than restore any configs from the backups that you should require.

Stunts
  • 2,262
2

In my case the following method solved the trouble

First login into tty by pressing CtrlAltF1.

Reinstall Ubuntu Desktop (i.e Unity)

sudo apt-get install --reinstall ubuntu-desktop

Some other tips are available here : ubuntu 14.04 login loop problem