When I ssh into my CentOS 7 machine and try to use
sudo, I'm unable to submit my password.
$ sudo ls [sudo] password for edwardloveall:
Then I type my password, hit Enter, and nothing happens. No, command is run (seemingly), no "Sorry, try again.", no nothing. I am forced to Ctrl+C out of the prompt and do something else. This failure also happens when entering an ssh key password.
Return is accepted for other non-
sudo commands and prompts. This behavior used to work, and as far as I know the system was not updated.
How can I fix or troubleshoot this?
Edit: Some more output to debug with:
$ id uid=1000(edwardloveall) gid=1000(edwardloveall) groups=1000(edwardloveall),10(wheel) $ ls -l /etc/sudoers -r--r-----. 1 root root 4188 Mar 31 2016 /etc/sudoers
su -c date, attempted to enter a password (not sure if I had the right one) but the same thing happened: no response at the prompt.
More debug info:
$ hostname portfolio $ cat /etc/hosts ... snip comments ... 127.0.0.1 portfolio portfolio 127.0.0.1 localhost.localdomain localhost 127.0.0.1 localhost4.localdomain4 localhost4 # The following lines are desirable for IPv6 capable hosts ::1 portfolio portfolio ::1 localhost.localdomain localhost ::1 localhost6.localdomain6 localhost6
I did find a workaround, if i hit Ctrl+D after entering my password it seems to let
sudo work. I'd rather have Enter work however.
I found a better work around.
If I edit my
/etc/sudoers configuration (via
visudo) and change
* appear when I'm typing my password, and enter works! Changing it back has the same enter-not-allowed effect as before. If anyone knows why this works, I'd love to know.