Incorrect Password Sudeo Cant Type Again
Showtime... A Probable Workaround
It's likely you can work effectually this problem until it'southward solved by using pkexec
in place of sudo
when you want to run a command as root. Run into "Maybe sudo is Cleaved" below for details.
It'due south not definite that this will work. If not, one of the other solutions or workarounds hither might. If non, this volition probably even so help you gather information almost the trouble, which y'all tin can add together to your question.
(People with this trouble other than the asker of this question tin create a new question with information about what happened when they tried the techniques here.)
The Basics of This Situation
Most of the time, when people report they cannot effectively enter their password for sudo
in a terminal, but tin authenticate with information technology graphically at least some of the time, information technology is because they don't realize that no placeholder characters (like *
) are supposed to appear. Here, it seems that is non the case. If yous entered your countersign correctly and in full earlier pressing Enter, there actually is some problem.
To effigy out what it is, more data is necessary. Here are some possible causes of sudo
not accepting the password in the terminal fifty-fifty though you tin enter it graphically to install software.
1. Maybe the Password is Blank
Suggested by Bruno Pereira.
If your countersign is blank, i.east., zero characters long, i.east., you but press Enter when asked for your password, modify information technology to something that is not blank.
Information technology'south likely you lot can change your password in Arrangement Settings (since you can perform at least some authoritative tasks graphically). If that doesn't work, and you can install software, y'all tin can install gnome-admin-tools , run users-admin
(another graphical utility), and change your password that way.
If that doesn't piece of work, try running pkexec passwd $USER
. (pkexec
volition prompt graphically for your password if a GUI is available and working, even when used to run CLI commands.)
If that doesn't work, try whatever of these methods; if that doesn't work, try this method.
two. Peradventure the Password Contains Weird Characters
If your password contains characters other than the numerals (0-9), capital (A-Z) and lower-example (a-z) letters with no accent marks, and punctuation that appear on a Usa/English keyboard, change it and so it does. If you're using a different locale, then to be safe, you can (temporarily) alter your locale as well.
Spaces are ordinarily fine in passwords but as you're having bug information technology makes sense to try it without them. They're relatively uncommon, so there could exist an undiscovered issues triggered by a combination of having a countersign with spaces in it and some other condition.
3. Peradventure the Password is Perfectly Ordinary, But Was Stored Wrong
Even if all one or more characters of your password are commonly used, it's still a good thought to alter your password to come across if it solves the problem. Also, if yous change your password and it does not solve your problem, that is another important piece of information.
I've talked to people in this situation, where changing the countersign fixed the trouble, even though there was nothing particularly wrong with or strange about it originally. I doubtable that the problem might take to do with how the password is stored, but it could be that the underlying crusade is coincidentally corrected by setting the password, or that the situation was (albeit repeatedly by different people) misreported to me, or that I misunderstood.
4. Maybe You lot're Not Typing What Y'all Recall You Are
Make sure your keyboard layout is what you think it is when you put in your password.
five. Perhaps Your Terminal is Misinterpreting Input
Mayhap the countersign that is being seen is not what you're actually entering. To see if this is the case:
-
Enter information technology in the terminal when non entering your countersign (don't "run" it, and yet don't tell united states what it is).
-
Endeavour it in a different last application. You lot're using Last; try xterm. (Press Alt+F2 and run
xterm
.) -
Endeavour it on a virtual console. Press Ctrl+Alt+F1 and see if yous can log in. Like when running
sudo
, information technology'south normal for yous non to see anything happening equally you enter your password. Merely type information technology in and printing Enter when you lot're done.Whether that succeeds or fails, knowing if information technology worked provides useful information.
Then try actually running
sudo
.To get back to the GUI, press Alt+F7.
6. Maybe sudo Works, Just Not when Invoked from the Command Line
To cheque this, run gksudo xclock
. You'll be prompted graphically for your password, only sudo
volition be used "nether the hood."
If that works--that is, if a unproblematic graphical clock application appears--then sudo
works, but (assuming it also failed when yous tried running it in another terminal app and in a virtual console), something is wrong with the way it is taking input from command-line interfaces.
7. Maybe CLI Password Authentication is Broken
This could occur if at that place is a common trouble preventing sudo
and other, dissimilar ways of request for passwords on the command line, from working right.
Run su $USER -c 'echo Success'
. You'll be prompted for your password. Type it in (again, it'southward normal to accept cypher appear on the screen as you do), press Enter, and see if Success
appears.
If you were unable to get past authentication there, then the problem affects both terminal-based sudo
and terminal-based su
.
8. Maybe sudo is Cleaved
Try running a command with PolicyKit: pkexec echo Success
A GUI window should come upwards and ask yous for your password; if authentication succeeds, Success
volition appear in the last.
If this works, you have a workaround for the problem: use pkexec
instead of sudo
.
If sudo
is broken, yous might be able to set up it, depending on what is wrong with sudo
:
viii.1. Mayhap the installation is messed upwards.
Effort reinstalling sudo
with:
pkexec apt-get update && pkexec apt-get --purge --reinstall sudo
That may fix a corrupted or misconfigured installation.
8.2. Maybe sudo
is misconfigured in /etc/sudoers
.
For misconfigurations relating to unexplained password authentication failures, check the Defaults
lines in /etc/sudoers
by running:
pkexec grep Defaults /etc/sudoers
In Ubuntu the output is normally:
Defaults env_reset Defaults secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
If you run across rootpw
, runaspw
, or targetpw
, this means sudo
is non necessarily asking for your password.
This is peculiarly likely if you are prompted [sudo] password for root:
or [sudo] password for some-other-username
instead of [sudo] password for your-username
. Only it's worth checking for in any instance (equally it'southward easy to check).
Fifty-fifty if you don't see any of those 3 ...pw
terms, you yet might come across something wrong; if your output of pkexec grep Defaults /etc/sudoers
is non the aforementioned equally what's shown above, you should look into that (for example, you tin can include it when you edit your question to provide details nearly what happened when you tried all these techniques).
If this doesn't reveal anything, accept a look at all of /etc/sudoers
. You can utilize pkexec less /etc/sudoers
or open the file in an editor with pkexec visudo
. If yous don't encounter annihilation incorrect, I recommend still posting the contents of the file in your question.
If you find a problem in /etc/sudoers
and know what has to exist changed, you tin edit it using pkexec visudo
.
eight.3. Peradventure sudo
is misconfigured in /etc/sudo.conf
.
Unremarkably on Ubuntu, /etc/sudo.conf
does not exist. And that is good--it works normally in that situation. If /etc/sudo.conf
does exist, sudo
may be configured to work in a radically different way. (Or it might be configured to work exactly the same mode, and accept nothing to practise with your problem. Or anything in betwixt.)
If this file exists, regardless of what's in it, delight provide its complete contents.
If /etc/sudo.conf
exists, by default the only uncommented lines (i.e., the just lines that don't showtime with #
) are:
Plugin sudoers_policy sudoers.so Plugin sudoers_io sudoers.so
This uses the sudoers
module to control the security policy and interface of sudo
. If whatever other module is used, things tin be quite different, so that's very relevant information.
viii.4. Maybe this is a PAM trouble, presenting unusually.
This is kind of a stretch, but possibly sudo
is configured to use pluggable hallmark modules and its PAM configuration has a problem.
- This is a stretch because usually you are not asked to enter a password at all when this happens.
To cheque, run:
ls -ld /etc/pam.d ls -50 /etc/pam.d/sudo cat /etc/pam.d/sudo
The text in the last should look similar this:
$ ls -ld /etc/pam.d drwxr-xr-x 2 root root 4096 January sixteen 01:44 /etc/pam.d $ ls -l /etc/pam.d/sudo -rw-r--r-- ane root root 239 May 31 2012 /etc/pam.d/sudo $ cat /etc/pam.d/sudo #%PAM-1.0 auth required pam_env.then readenv=1 user_readenv=0 auth required pam_env.so readenv=1 envfile=/etc/default/locale user_readenv=0 @include common-auth @include common-account @include common-session-noninteractive
If whatever of the bold text differs at all, that suggests a problem.
I got this thought from the upstream sudo
troubleshooting page (merely that folio does not propose the trouble will happen this style).
ix. Mayhap Information technology'southward Something Else
Possibly none of the situations covers your problem. Or maybe the trouble is that sudo
is broken, but none of the sub-situations for that utilise.
If that'due south the case, don't surrender! (Unless you want to.)
Simply provide as much more data as possible, including what happened when you tried each technique or diagnostic step. This volition likely shed lite on the problem.
This respond is moved, with slight modification, from this question (where it didn't actually belong, as information technology'south not articulate the OP there really has this problem). Thank you to gertvdijk for helping me recognize the ambiguity there and suggesting this be posted elsewhere instead. (He is not responsible for whatever errors here, however.)
Source: https://askubuntu.com/questions/248853/graphical-authentication-works-why-does-sudo-say-my-password-is-wrong
0 Response to "Incorrect Password Sudeo Cant Type Again"
Post a Comment