8

I am using Ubuntu 16.04

Whenever I use sudo and have to type in my password, the password shows in the terminal screen as I type, only hiding the first character. For example, if my password were "password", as I type the password in the terminal, it would show: $ assword (only hiding the character "p")

I want to hide all the characters as I type (I don't need Ubuntu to show asterisks instead, I want it to show exactly nothing)

How do I achieve that?

For those who think my question is a possible duplicate of another question on "how to make terminal password visible", I want to clarify that it's not the same. It's simply the opposite, and the answers in the other post did not help me solve my problem.

  • 3
    What you are asking for is normal functionality for sudo. Have you, by any chance, been playing with stty commands or similar in .profile or .bashrc ? – Soren A Feb 10 '17 at 10:19
  • I notice that in the beginning when I just finished installing Ubuntu, that's how it was. But now it's not applying that default behavior anymore. Maybe it's like you said - that I have messed something up. But I don't remember anything in particular... – Tran Triet Feb 10 '17 at 10:20
  • Check history for previously used commands to see if there is one that would suggest you edited it into some file. But bashrc and profile would be my first idea too. Did it also happen when you start another shell? – Rinzwind Feb 10 '17 at 10:27
  • 1
    Possible duplicate of How to make `sudo` command password to visible? – Thomas Feb 10 '17 at 10:52
  • @Rinzwind yes. It happens in all terminals I run. Also, this has been going for over a week now, so I don't think history would help... But if it was the bashrc and profile, how do I re-modify it? – Tran Triet Feb 10 '17 at 11:43
3

Check the /etc/sudoers.d folder if pwfeedback file is present. If it is, remove it.

Also check this link.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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