Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I stumbled on a login problem that I'm assuming must be consequence of something getting broken on my ubuntu install. I simply can't get my login password recognized anywhere (and I haven't forgotten it), nor in shell, nor in the gnome welcome screen, nor in the unlock window after the screensaver. Thinking that resetting the password would solve this, I restarted, went into recovery console, opened the root shell, ran 'passwd myuser', entered a new simple password and it seems like a success but if I immediately run 'login myuser' or if I restart and go to the welcome screen, then it says incorrect password again. If I do 'sudo -i -u myuser' on the root shell I can do 'passwd myuser' and then when it asks me my previous password is the only time I've found where my pass gets recognized (I can set a new password then but like before I never get a login to recognize it).

The only way I found to make the machine useful again was starting gnome from the root shell and configuring in users and groups that myuser should not be asked for passwords at start. Still I cannot run anything that requires me to do sudo because I get password incorrect.

What can I do to make authentication work again?

my PAM is most probably changed as it is a tweaked distro that meets the corporate policy. In the auth.log the following error keeps appearing when I try to login:

PAM unable to dlopen(/lib/security/new_authtok_reqd=2): /lib/security/new_authtok_reqd=2: cannot open shared object file: No such file or directory

PAM adding faulty module: /lib/security/new_authtok_reqd=2

PAM unable to dlopen(/lib/security/default=ignore]): /lib/security/default=ignore]: cannot open shared object file: No such file or directory

PAM adding faulty module: /lib/security/default=ignore]

share|improve this question
    
Are any other accounts having this problem? Have you tried deleting and recreating the account? –  bryan Aug 12 '10 at 15:48
    
Is it possible that the root account is using a different keyboard layout from the user you are trying to login as? –  DaveParillo Aug 12 '10 at 15:55
    
I created another account and it suffered the same problems –  ilcavero Aug 12 '10 at 16:00
    
I checked the keyboard layout as my password had special characters, but it wasn't an issue –  ilcavero Aug 12 '10 at 16:01

1 Answer 1

up vote 1 down vote accepted

Here's some generic advice. @ilcavero, if you add information to your question and I have more specific suggestions, I'll edit my answer.

  • A common cause of having your password not recognized is that the keyboard layout at the password prompt is not what you expect. But if you've tried doing login myuser in the same environment as passwd myuser, that's not your problem.

  • "Login denied" messages are always terse, so as not to give too much information to an attacker. There may be more useful information in log files, which are only visible to the system administrator (but on a default Ubuntu installation, you can read these files without sudo if you're an “administrator” user). Check what appears in /var/log/auth.log when you try to log in.

  • Login permissions are controlled through PAM, which is configured via files in /etc/pam.d. In particular, /etc/pam.d/common-auth is used by most login methods. Has this file changed from its default contents?

  • Do you remember installing or reconfiguring anything that might be relevant (e.g. a password strength checker)?

  • If the problem just with your user or with all of them? If you create a test user, can he log in?

  • If the file /etc/nologin exists, remove it. (Not your problem, I think, because this file would apply even for passwordless logins but not to sudo.)

share|improve this answer
    
thx for the tip, I added to the question an error I got logged in auth.log and my common-auth, I'm trying to get a common-auth from a working machine to compare –  ilcavero Aug 12 '10 at 16:31
    
mv common-auth.original common-auth solved the issue, I lost some distro customizations but at least I can login now. –  ilcavero Aug 12 '10 at 17:14

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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