3

Today after regular system updates on my 12.04 LTS system, I cannot login anymore. On a greeter password is said to be invalid immediately (without the usual delay). And on tty the same result, just delay is present

This is what I already tried:

  1. Checking Caps lock, Keyboard layout and similar things.
  2. Going into recovery mode root shell, remounting filesystem passwd`ing
  3. updating system from apt-get and root shell
  4. chroot`ing into my system from liveUSB, and executing passwd

A little more about passwd, I wanted to change/update my password with passwd on root shell (recovery mode), and from chroot`ed environment (from liveUSB). But I could not do so, because I always got an error:

my-computer-name# passwd myUserName
passwd: Authentication token manipulation error
passwd: Password unchanged

The filesystem has been remounted to rw correctly, (I tried to create/edit/save some files with vim).

In the file /var/log/auth.log I can see one strange message emitted from lightdm, that seems to be related to this issue:

pam_winbind(lightdm:auth): request wbcLogonUser failed: WBC_ERR_AUTH_ERROR, PAM error: PAM_USER_UNKNOWN (10), NTSTATUS:NT_STATUS_NO_SUCH_USER, Error message was: No such user
pam_succeed_if(lightdm:auth): requirement "user indgroup nopasswdlogin" not met by user "rytis"

These are the packets, that has been updated by update:

    base-files
    bind9-host
    dns-utils
    libdns
    libpam-ck-connector
    libisccc
    lib-ck-connector0
    liblwres80
    libbind9-80
    libisccfg82
    libisc83
    consolekit
    language-pack-gnome-en-base
    language-pack-gnome-en
    google-chrome-stable
    flashplugin-installer
    language-pack-en-base
    language-pack-en

Note:

Long time ago I set root password for my computer, and while I cannot log into root with that password while booting normaly, I can, however, while booting into recovery.

  • Booting from a live CD/DVD/USB and resetting your password from a chroot may work. So this might be a duplicate of How do I reset a lost password (using recovery mode requires me to type the password)? even though the point of failure is different. I recommend trying that, then if it doesn't work, editing your question to explain what happened. (Even if this is closed, your edit will prompt it automatically to be considered for reopening.) Does login on a virtual console work? – Eliah Kagan Jan 15 '14 at 09:31
  • Unfortunately, no luck... I tried chroot`ing from live system, and passwd gave the same error as in recovery terminal – Rytis Karpuška Jan 15 '14 at 10:18
  • What if you manually change the hash in the shadow password file? I recommend backing up the shadow file before editing it with nano (or whatever other editor you prefer). One way to back it up, once you're in a root shell, is cp /etc/shadow /etc/shadow.old. – Eliah Kagan Jan 15 '14 at 10:42
  • mmm... still no luck... In the /etc/shadow password I copied password (hash part) of user root (and its password works while in recovery mode), to my user password hash part, but passwd is still not working, and I still cannot login into my system... :( I`m continuing to look for solution – Rytis Karpuška Jan 15 '14 at 11:00
  • @user207934 "I copied password (hash part) of user root (and its password works while in recovery mode)" What do you mean when you say the root's password works in recovery? Did you set a password for root? (Ubuntu normally have no password for root) And how do you know it works in recovery? When you boot up recovery you gain root access without typing any password. – falconer Jan 15 '14 at 11:51
  • Yes, I have set root password long time ago, and right now it does not work on normally booted system, but it does work on recovery system. Right now I thought that this is important so I edited my question, and added a note for this. – Rytis Karpuška Jan 15 '14 at 11:59
  • @user207934 Okay, but then you say that you cannot login now even with root, so likely the hash for root is also wrong. So copying it to your user won't help. Did I get it right? On the recovery booting the root's password is not used, it is just booted into a root shell. That's why I ask if you tested somehow the root's password in the recovery. – falconer Jan 15 '14 at 12:28
  • hmmm, actually then entering the recovery root terminal, I am prompted to enter the password. And if I enter the password incorrectly, I am just prompted to enter it again, if I enter it correctly, I get to the recovery terminal. That shuold mean, that root password hash in the /etc/shadow is correct. Or I am mistaken here... – Rytis Karpuška Jan 15 '14 at 14:45
  • @user207934 hmhm. Looks like it was a long long time ago I visited the recovery console. Just tried it on 13.10 lubuntu and I can drop to a root shell without password, maybe if you set up a root password the behaviour is different. I have no clue then why it is accepting it in recovery but not in normal mode. – falconer Jan 15 '14 at 14:54

1 Answers1

2

Ok Finally I got it solved:

I just reinstalled all the packages which was related to the PAM, I do not know which one exactly was causing the problems:

sudo apt-get install --reinstall libpam-cap libpam-ck-connector libpam-cracklib libpam-gnome-keyring libpam-modules libpam-modules-bin libpam-winbind libpam0g