Password not working for sudo ("Authentication failure")
Andrew Mclaughlin
Before I mention anything further, DO NOT give me a response saying that terminal won't show password input. I'm AWARE of that.
I'm typing my user password in (not a capslock issue), and for some reason it still says 'Authentication Failure'.
Is there some other password (one I'm not aware of) I'm supposed to be using other than my user password? I've had this ubuntu before, on another hard drive and I didn't have this problem. (And it was the same ubuntu, ubuntu 12.04 LTS)
ai@AiNekoYokai:~$ groups
ai adm cdrom sudo dip plugdev lpadmin sambashare
ai@AiNekoYokai:~$ lsb_release -rd
Description: Ubuntu 12.04 LTS
Release: 12.04
ai@AiNekoYokai:~$ pkexec cat /etc/sudoers
#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults env_reset
Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
# Host alias specification
# User alias specification
# Cmnd alias specification
# User privilege specification
root ALL=(ALL:ALL) ALL
# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL
# Allow members of group sudo to execute any command
%sudo ALL=(ALL:ALL) ALL
# See sudoers(5) for more information on "#include" directives:
#includedir /etc/sudoers.dI can log in with my password, but it's not accepted as valid for authentication <-- That is pretty much my issue. (Although, I haven't gone into recovery mode.)
I've ran:
ai@AiNekoYokai:~$ ls /etc/sudoers.d
READMEAnd also reinstalled sudo with:
pkexec apt-get update
pkexec apt-get --purge --reinstall install sudopkexec usermod -a -G admin $USER <- Says admin does not exist
su $USER <- worked for me, however, my password still does not do much (in sense of not working for other things)
I changed my password with pkexec passwd $USER. I was able to change it no problem.
gksudo xclock was something I was able to get into, no problem. (Clock showed)
ai@AiNekoYokai:~$ gksudo xclock 1 4 Answers
I had this problem when I was using a special keyboard layout (Bépo). The terminal was not recognizing the special characters. Maybe this is your problem too ?
How to change the keyboard-layout in the console, with special characters?
2Run pkexec passwd $USER to change password. Then retry.
If it doesn't work, there are other troubleshooting things you can do (detailed in the question above).
2I had this problem today. My password was the same but when I entered it for sudo it no longer worked. I am slightly concerned that I have been hacked, but that would be difficult because two firewalls would have to be compromised, and no one in the household would know how to change a passwd but me, so I am assuming that is not the issue, but I changed both user and root passwds as a precaution. Still not sure as to cause.
Method:
alt-ctrl-f2moves to a console. This does not work in a terminal or via su- Login as root You need to have root's password, which is not the same as sudo.
- Execute command
passwd USERNAMEwith your user name substituting for 'USERNAME' - Enter a new password and confirm. Logout.
alt-ctrl-f7brings you back to your desktop.- close all open terminals
- Open a new terminal and test with
sudo ls.
This worked for me anyway. I was locked out of my account for 8 minutes because of fails, but I think this reset that timer. Anyway you might need to wait a few minutes or type 'man passwdand look up how to unlock the user from thealt-ctrl-f2` root account.
This will work even if you are at a desktop manager login screen, and you cannot login to your DM, as the alt-ctl-f2 console does not depend on the GUI at all.
Why dont you add (to be more explicit)
# User privilege specification
root ALL=(ALL:ALL) ALL
ai ALL=(ALL:ALL) ALL