9

I had to reinstall recently. I installed normal Ubuntu 14.04. I then installed gnome/gnome shell/gdm. I then logged in my user to gnome. Since then I have been configuring my system.

Yesterday, unlock was working fine. Today, the automatic lock screen is not accepting my password as valid. It just takes the input like it's processing it, then takes me right back to the same password prompt. If I click the 'login as a new user' link, it takes me right back to the lock screen. Ctrl+Alt+F1, etc, does nothing.

I had to resort to a hard boot. I've tried this more then once. (first time was from automatic, idle time lock, second time was from my triggering the lock screen with the keyboard command).

I'm certain I have my password right, as I am able to get logged in after the cold boot.

  • Check your permissions on ~/.Xauthority sounds like root owns it now. You can simply delete it and you should be fine. One reason why you don't use sudo to open GUIs – ElefantPhace Aug 11 '14 at 15:30
  • @ElefantPhace You might want to post that (or something like it) as an answer. – Eliah Kagan Aug 11 '14 at 15:33
  • I will add just a little bit. Since I asked this question originally, I still have this problem happen on a regular basis. Usually about once a month. I have noticed, that for some reason, the most often (NOT EVERYTIME), this seems to happen on days where I've found myself booting more then once. I can not see how that would related to anything, but it's the only other piece of evidence I've gathered so far. – Cris Holdorph Mar 6 '15 at 23:43
7

Neither of the other two answers solved the problem for me, but some additional searching led to this bug report:

sudo chown root:shadow /sbin/unix_chkpwd
sudo chmod 2755 /sbin/unix_chkpwd

which solved the issue for me.

  • Solved my problem too on Ubuntu 16.04. – X09 Mar 9 '17 at 13:36
  • 1
    Worked for me ubuntu 16.04 LTS – Nimish Sep 8 '18 at 21:50
6

I could resolve this issue with the following permission changes:

sudo chown root:shadow /etc/gshadow
sudo chown root:shadow /etc/gshadow-
sudo chown root:shadow /etc/shadow
sudo chown root:shadow /etc/shadow-

Found here: http://ubuntuforums.org/showthread.php?t=1006366

Check also this question: Lock screen - password incorrect

1

Open a terminal and type ll | grep '.Xauthority' and make sure it is owned by you and not root.

You can chown it or just remove it, it'll come back! Now just log out and log back in.

This is one of the main reasons why you shouldn't use sudo to open GUIs, as root will take ownership of some of your files in your home directory.

  • the .Xauthority file is owned by my user. So, as much as I would love a simple fix like this. It is unfortunately not my problem. – Cris Holdorph Aug 11 '14 at 15:44
  • Check your .xsession-errors and see if you can find any clues there – ElefantPhace Aug 11 '14 at 15:48
  • No .xsession-errors file, but I haven't locked my screen since the most recent reboot. And if I did, I wouldn't be able to get back in, until I rebooted. So, if it's a file that persists across reboot/relogins/restarting x, then it's not present. – Cris Holdorph Aug 11 '14 at 15:53
0

I had an issue like this, my password was not getting accepted from the GUI login page. Then I logged through the recovery mode and did following:

su # followed by root password
mount -o remount,rw /  
mv .bashrc bashrc_old
mv .profile profile_old
reboot

Now logging in with password will work again.

0

I faced the same problem. As I found out, it was caused by setting the DISPLAY variable in my user's .bashrc (and .profile) to 'localhost:0.0'. After commenting this definition out, I was able to log in to GUI. Otherwise, only terminal login (ctrl-alt-F1 or ssh) was possible.

0

Neither of the 5 answers solved my problem, but this did on Ubuntu 18.04:

I remembered what language/keyboard layout I have used last before letting the screen locked, then I entered my password in that language, despite what language was shown in the lock-screen app.

There is a bug in the lock-screen app which doesn't change the keyboard layout despite it shows it was changed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.